extern void __VERIFIER_error() __attribute__ ((__noreturn__)); /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef unsigned char __u8; typedef short __s16; typedef unsigned short __u16; typedef int __s32; typedef unsigned int __u32; typedef unsigned long long __u64; typedef signed char s8; typedef unsigned char u8; typedef short s16; typedef unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_time_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef __u16 __be16; typedef __u32 __be32; typedef __u64 __be64; typedef __u32 __wsum; struct kernel_symbol { unsigned long value ; char const *name ; }; struct module; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef unsigned short umode_t; typedef __kernel_pid_t pid_t; typedef __kernel_clockid_t clockid_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_time_t time_t; typedef __s32 int32_t; typedef __u8 uint8_t; typedef __u16 uint16_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef unsigned long sector_t; typedef unsigned long blkcnt_t; typedef u64 dma_addr_t; typedef unsigned int gfp_t; typedef unsigned int fmode_t; typedef unsigned int oom_flags_t; typedef u64 phys_addr_t; typedef phys_addr_t resource_size_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct callback_head { struct callback_head *next ; void (*func)(struct callback_head * ) ; }; struct pt_regs { unsigned long r15 ; unsigned long r14 ; unsigned long r13 ; unsigned long r12 ; unsigned long bp ; unsigned long bx ; unsigned long r11 ; unsigned long r10 ; unsigned long r9 ; unsigned long r8 ; unsigned long ax ; unsigned long cx ; unsigned long dx ; unsigned long si ; unsigned long di ; unsigned long orig_ax ; unsigned long ip ; unsigned long cs ; unsigned long flags ; unsigned long sp ; unsigned long ss ; }; struct __anonstruct____missing_field_name_9 { unsigned int a ; unsigned int b ; }; struct __anonstruct____missing_field_name_10 { u16 limit0 ; u16 base0 ; unsigned char base1 ; unsigned char type : 4 ; unsigned char s : 1 ; unsigned char dpl : 2 ; unsigned char p : 1 ; unsigned char limit : 4 ; unsigned char avl : 1 ; unsigned char l : 1 ; unsigned char d : 1 ; unsigned char g : 1 ; unsigned char base2 ; }; union __anonunion____missing_field_name_8 { struct __anonstruct____missing_field_name_9 __annonCompField4 ; struct __anonstruct____missing_field_name_10 __annonCompField5 ; }; struct desc_struct { union __anonunion____missing_field_name_8 __annonCompField6 ; }; typedef unsigned long pteval_t; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct __anonstruct_pte_t_11 { pteval_t pte ; }; typedef struct __anonstruct_pte_t_11 pte_t; struct pgprot { pgprotval_t pgprot ; }; typedef struct pgprot pgprot_t; struct __anonstruct_pgd_t_12 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_12 pgd_t; struct page; typedef struct page *pgtable_t; struct file; struct seq_file; struct thread_struct; struct mm_struct; struct task_struct; struct cpumask; struct qspinlock { atomic_t val ; }; typedef struct qspinlock arch_spinlock_t; struct qrwlock { atomic_t cnts ; arch_spinlock_t lock ; }; typedef struct qrwlock arch_rwlock_t; typedef void (*ctor_fn_t)(void); struct device; struct net_device; struct file_operations; struct completion; struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; struct timespec; struct compat_timespec; struct __anonstruct_futex_16 { u32 *uaddr ; u32 val ; u32 flags ; u32 bitset ; u64 time ; u32 *uaddr2 ; }; struct __anonstruct_nanosleep_17 { clockid_t clockid ; struct timespec *rmtp ; struct compat_timespec *compat_rmtp ; u64 expires ; }; struct pollfd; struct __anonstruct_poll_18 { struct pollfd *ufds ; int nfds ; int has_timeout ; unsigned long tv_sec ; unsigned long tv_nsec ; }; union __anonunion____missing_field_name_15 { struct __anonstruct_futex_16 futex ; struct __anonstruct_nanosleep_17 nanosleep ; struct __anonstruct_poll_18 poll ; }; struct restart_block { long (*fn)(struct restart_block * ) ; union __anonunion____missing_field_name_15 __annonCompField7 ; }; struct kernel_vm86_regs { struct pt_regs pt ; unsigned short es ; unsigned short __esh ; unsigned short ds ; unsigned short __dsh ; unsigned short fs ; unsigned short __fsh ; unsigned short gs ; unsigned short __gsh ; }; union __anonunion____missing_field_name_19 { struct pt_regs *regs ; struct kernel_vm86_regs *vm86 ; }; struct math_emu_info { long ___orig_eip ; union __anonunion____missing_field_name_19 __annonCompField8 ; }; struct cpumask { unsigned long bits[128U] ; }; typedef struct cpumask cpumask_t; typedef struct cpumask *cpumask_var_t; struct fregs_state { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u32 status ; }; struct __anonstruct____missing_field_name_29 { u64 rip ; u64 rdp ; }; struct __anonstruct____missing_field_name_30 { u32 fip ; u32 fcs ; u32 foo ; u32 fos ; }; union __anonunion____missing_field_name_28 { struct __anonstruct____missing_field_name_29 __annonCompField12 ; struct __anonstruct____missing_field_name_30 __annonCompField13 ; }; union __anonunion____missing_field_name_31 { u32 padding1[12U] ; u32 sw_reserved[12U] ; }; struct fxregs_state { u16 cwd ; u16 swd ; u16 twd ; u16 fop ; union __anonunion____missing_field_name_28 __annonCompField14 ; u32 mxcsr ; u32 mxcsr_mask ; u32 st_space[32U] ; u32 xmm_space[64U] ; u32 padding[12U] ; union __anonunion____missing_field_name_31 __annonCompField15 ; }; struct swregs_state { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u8 ftop ; u8 changed ; u8 lookahead ; u8 no_update ; u8 rm ; u8 alimit ; struct math_emu_info *info ; u32 entry_eip ; }; struct xstate_header { u64 xfeatures ; u64 xcomp_bv ; u64 reserved[6U] ; }; struct xregs_state { struct fxregs_state i387 ; struct xstate_header header ; u8 __reserved[464U] ; }; union fpregs_state { struct fregs_state fsave ; struct fxregs_state fxsave ; struct swregs_state soft ; struct xregs_state xsave ; }; struct fpu { union fpregs_state state ; unsigned int last_cpu ; unsigned char fpstate_active ; unsigned char fpregs_active ; unsigned char counter ; }; struct seq_operations; struct perf_event; struct thread_struct { struct desc_struct tls_array[3U] ; unsigned long sp0 ; unsigned long sp ; unsigned short es ; unsigned short ds ; unsigned short fsindex ; unsigned short gsindex ; unsigned long fs ; unsigned long gs ; struct fpu fpu ; struct perf_event *ptrace_bps[4U] ; unsigned long debugreg6 ; unsigned long ptrace_dr7 ; unsigned long cr2 ; unsigned long trap_nr ; unsigned long error_code ; unsigned long *io_bitmap_ptr ; unsigned long iopl ; unsigned int io_bitmap_max ; }; typedef atomic64_t atomic_long_t; typedef int pao_T__; typedef int pao_T_____0; struct lockdep_map; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct held_lock { u64 prev_chain_key ; unsigned long acquire_ip ; struct lockdep_map *instance ; struct lockdep_map *nest_lock ; u64 waittime_stamp ; u64 holdtime_stamp ; unsigned short class_idx : 13 ; unsigned char irq_context : 2 ; unsigned char trylock : 1 ; unsigned char read : 2 ; unsigned char check : 1 ; unsigned char hardirqs_off : 1 ; unsigned short references : 12 ; unsigned int pin_count ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct____missing_field_name_35 { u8 __padding[24U] ; struct lockdep_map dep_map ; }; union __anonunion____missing_field_name_34 { struct raw_spinlock rlock ; struct __anonstruct____missing_field_name_35 __annonCompField17 ; }; struct spinlock { union __anonunion____missing_field_name_34 __annonCompField18 ; }; typedef struct spinlock spinlock_t; struct __anonstruct_rwlock_t_36 { arch_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_36 rwlock_t; struct seqcount { unsigned int sequence ; struct lockdep_map dep_map ; }; typedef struct seqcount seqcount_t; struct __anonstruct_seqlock_t_45 { struct seqcount seqcount ; spinlock_t lock ; }; typedef struct __anonstruct_seqlock_t_45 seqlock_t; struct timespec { __kernel_time_t tv_sec ; long tv_nsec ; }; struct user_namespace; struct __anonstruct_kuid_t_46 { uid_t val ; }; typedef struct __anonstruct_kuid_t_46 kuid_t; struct __anonstruct_kgid_t_47 { gid_t val ; }; typedef struct __anonstruct_kgid_t_47 kgid_t; struct kstat { u64 ino ; dev_t dev ; umode_t mode ; unsigned int nlink ; kuid_t uid ; kgid_t gid ; dev_t rdev ; loff_t size ; struct timespec atime ; struct timespec mtime ; struct timespec ctime ; unsigned long blksize ; unsigned long long blocks ; }; struct vm_area_struct; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct __anonstruct_nodemask_t_48 { unsigned long bits[16U] ; }; typedef struct __anonstruct_nodemask_t_48 nodemask_t; struct optimistic_spin_queue { atomic_t tail ; }; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; void *magic ; struct lockdep_map dep_map ; }; struct mutex_waiter { struct list_head list ; struct task_struct *task ; void *magic ; }; struct rw_semaphore; struct rw_semaphore { long count ; struct list_head wait_list ; raw_spinlock_t wait_lock ; struct optimistic_spin_queue osq ; struct task_struct *owner ; struct lockdep_map dep_map ; }; struct completion { unsigned int done ; wait_queue_head_t wait ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct notifier_block; struct timer_list { struct hlist_node entry ; unsigned long expires ; void (*function)(unsigned long ) ; unsigned long data ; u32 flags ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct hrtimer; enum hrtimer_restart; struct rb_node { unsigned long __rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; struct ctl_table; struct nsproxy; struct ctl_table_root; struct ctl_table_header; struct ctl_dir; typedef int proc_handler(struct ctl_table * , int , void * , size_t * , loff_t * ); struct ctl_table_poll { atomic_t event ; wait_queue_head_t wait ; }; struct ctl_table { char const *procname ; void *data ; int maxlen ; umode_t mode ; struct ctl_table *child ; proc_handler *proc_handler ; struct ctl_table_poll *poll ; void *extra1 ; void *extra2 ; }; struct ctl_node { struct rb_node node ; struct ctl_table_header *header ; }; struct __anonstruct____missing_field_name_50 { struct ctl_table *ctl_table ; int used ; int count ; int nreg ; }; union __anonunion____missing_field_name_49 { struct __anonstruct____missing_field_name_50 __annonCompField19 ; struct callback_head rcu ; }; struct ctl_table_set; struct ctl_table_header { union __anonunion____missing_field_name_49 __annonCompField20 ; struct completion *unregistering ; struct ctl_table *ctl_table_arg ; struct ctl_table_root *root ; struct ctl_table_set *set ; struct ctl_dir *parent ; struct ctl_node *node ; }; struct ctl_dir { struct ctl_table_header header ; struct rb_root root ; }; struct ctl_table_set { int (*is_seen)(struct ctl_table_set * ) ; struct ctl_dir dir ; }; struct ctl_table_root { struct ctl_table_set default_set ; struct ctl_table_set *(*lookup)(struct ctl_table_root * , struct nsproxy * ) ; int (*permissions)(struct ctl_table_header * , struct ctl_table * ) ; }; struct workqueue_struct; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct delayed_work { struct work_struct work ; struct timer_list timer ; struct workqueue_struct *wq ; int cpu ; }; struct notifier_block { int (*notifier_call)(struct notifier_block * , unsigned long , void * ) ; struct notifier_block *next ; int priority ; }; struct resource { resource_size_t start ; resource_size_t end ; char const *name ; unsigned long flags ; struct resource *parent ; struct resource *sibling ; struct resource *child ; }; struct pci_dev; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_late)(struct device * ) ; int (*resume_early)(struct device * ) ; int (*freeze_late)(struct device * ) ; int (*thaw_early)(struct device * ) ; int (*poweroff_late)(struct device * ) ; int (*restore_early)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct wake_irq; struct pm_subsys_data { spinlock_t lock ; unsigned int refcount ; struct list_head clock_list ; }; struct dev_pm_qos; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char async_suspend : 1 ; bool is_prepared ; bool is_suspended ; bool is_noirq_suspended ; bool is_late_suspended ; bool ignore_children ; bool early_init ; bool direct_complete ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; bool wakeup_path ; bool syscore ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; struct wake_irq *wakeirq ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; unsigned char no_callbacks : 1 ; unsigned char irq_safe : 1 ; unsigned char use_autosuspend : 1 ; unsigned char timer_autosuspends : 1 ; unsigned char memalloc_noio : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; int autosuspend_delay ; unsigned long last_busy ; unsigned long active_jiffies ; unsigned long suspended_jiffies ; unsigned long accounting_timestamp ; struct pm_subsys_data *subsys_data ; void (*set_latency_tolerance)(struct device * , s32 ) ; struct dev_pm_qos *qos ; }; struct dev_pm_domain { struct dev_pm_ops ops ; void (*detach)(struct device * , bool ) ; int (*activate)(struct device * ) ; void (*sync)(struct device * ) ; void (*dismiss)(struct device * ) ; }; struct pci_bus; struct __anonstruct_mm_context_t_115 { void *ldt ; int size ; unsigned short ia32_compat ; struct mutex lock ; void *vdso ; atomic_t perf_rdpmc_allowed ; }; typedef struct __anonstruct_mm_context_t_115 mm_context_t; struct bio_vec; struct llist_node; struct llist_node { struct llist_node *next ; }; struct cred; struct inode; struct arch_uprobe_task { unsigned long saved_scratch_register ; unsigned int saved_trap_nr ; unsigned int saved_tf ; }; enum uprobe_task_state { UTASK_RUNNING = 0, UTASK_SSTEP = 1, UTASK_SSTEP_ACK = 2, UTASK_SSTEP_TRAPPED = 3 } ; struct __anonstruct____missing_field_name_148 { struct arch_uprobe_task autask ; unsigned long vaddr ; }; struct __anonstruct____missing_field_name_149 { struct callback_head dup_xol_work ; unsigned long dup_xol_addr ; }; union __anonunion____missing_field_name_147 { struct __anonstruct____missing_field_name_148 __annonCompField33 ; struct __anonstruct____missing_field_name_149 __annonCompField34 ; }; struct uprobe; struct return_instance; struct uprobe_task { enum uprobe_task_state state ; union __anonunion____missing_field_name_147 __annonCompField35 ; struct uprobe *active_uprobe ; unsigned long xol_vaddr ; struct return_instance *return_instances ; unsigned int depth ; }; struct xol_area; struct uprobes_state { struct xol_area *xol_area ; }; struct address_space; struct mem_cgroup; typedef void compound_page_dtor(struct page * ); union __anonunion____missing_field_name_150 { struct address_space *mapping ; void *s_mem ; }; union __anonunion____missing_field_name_152 { unsigned long index ; void *freelist ; bool pfmemalloc ; }; struct __anonstruct____missing_field_name_156 { unsigned short inuse ; unsigned short objects : 15 ; unsigned char frozen : 1 ; }; union __anonunion____missing_field_name_155 { atomic_t _mapcount ; struct __anonstruct____missing_field_name_156 __annonCompField38 ; int units ; }; struct __anonstruct____missing_field_name_154 { union __anonunion____missing_field_name_155 __annonCompField39 ; atomic_t _count ; }; union __anonunion____missing_field_name_153 { unsigned long counters ; struct __anonstruct____missing_field_name_154 __annonCompField40 ; unsigned int active ; }; struct __anonstruct____missing_field_name_151 { union __anonunion____missing_field_name_152 __annonCompField37 ; union __anonunion____missing_field_name_153 __annonCompField41 ; }; struct __anonstruct____missing_field_name_158 { struct page *next ; int pages ; int pobjects ; }; struct slab; struct __anonstruct____missing_field_name_159 { compound_page_dtor *compound_dtor ; unsigned long compound_order ; }; union __anonunion____missing_field_name_157 { struct list_head lru ; struct __anonstruct____missing_field_name_158 __annonCompField43 ; struct slab *slab_page ; struct callback_head callback_head ; struct __anonstruct____missing_field_name_159 __annonCompField44 ; pgtable_t pmd_huge_pte ; }; struct kmem_cache; union __anonunion____missing_field_name_160 { unsigned long private ; spinlock_t *ptl ; struct kmem_cache *slab_cache ; struct page *first_page ; }; struct page { unsigned long flags ; union __anonunion____missing_field_name_150 __annonCompField36 ; struct __anonstruct____missing_field_name_151 __annonCompField42 ; union __anonunion____missing_field_name_157 __annonCompField45 ; union __anonunion____missing_field_name_160 __annonCompField46 ; struct mem_cgroup *mem_cgroup ; }; struct page_frag { struct page *page ; __u32 offset ; __u32 size ; }; struct __anonstruct_shared_161 { struct rb_node rb ; unsigned long rb_subtree_last ; }; struct anon_vma; struct vm_operations_struct; struct mempolicy; struct vm_area_struct { unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; struct vm_area_struct *vm_prev ; struct rb_node vm_rb ; unsigned long rb_subtree_gap ; struct mm_struct *vm_mm ; pgprot_t vm_page_prot ; unsigned long vm_flags ; struct __anonstruct_shared_161 shared ; struct list_head anon_vma_chain ; struct anon_vma *anon_vma ; struct vm_operations_struct const *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; struct mempolicy *vm_policy ; }; struct core_thread { struct task_struct *task ; struct core_thread *next ; }; struct core_state { atomic_t nr_threads ; struct core_thread dumper ; struct completion startup ; }; struct task_rss_stat { int events ; int count[3U] ; }; struct mm_rss_stat { atomic_long_t count[3U] ; }; struct kioctx_table; struct linux_binfmt; struct mmu_notifier_mm; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; u32 vmacache_seqnum ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; unsigned long mmap_base ; unsigned long mmap_legacy_base ; unsigned long task_size ; unsigned long highest_vm_end ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; atomic_long_t nr_ptes ; atomic_long_t nr_pmds ; int map_count ; spinlock_t page_table_lock ; struct rw_semaphore mmap_sem ; struct list_head mmlist ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long pinned_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long def_flags ; unsigned long start_code ; unsigned long end_code ; unsigned long start_data ; unsigned long end_data ; unsigned long start_brk ; unsigned long brk ; unsigned long start_stack ; unsigned long arg_start ; unsigned long arg_end ; unsigned long env_start ; unsigned long env_end ; unsigned long saved_auxv[46U] ; struct mm_rss_stat rss_stat ; struct linux_binfmt *binfmt ; cpumask_var_t cpu_vm_mask_var ; mm_context_t context ; unsigned long flags ; struct core_state *core_state ; spinlock_t ioctx_lock ; struct kioctx_table *ioctx_table ; struct task_struct *owner ; struct file *exe_file ; struct mmu_notifier_mm *mmu_notifier_mm ; struct cpumask cpumask_allocation ; unsigned long numa_next_scan ; unsigned long numa_scan_offset ; int numa_scan_seq ; bool tlb_flush_pending ; struct uprobes_state uprobes_state ; void *bd_addr ; }; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; union __anonunion____missing_field_name_166 { unsigned long bitmap[4U] ; struct callback_head callback_head ; }; struct idr_layer { int prefix ; int layer ; struct idr_layer *ary[256U] ; int count ; union __anonunion____missing_field_name_166 __annonCompField47 ; }; struct idr { struct idr_layer *hint ; struct idr_layer *top ; int layers ; int cur ; spinlock_t lock ; int id_free_cnt ; struct idr_layer *id_free ; }; struct ida_bitmap { long nr_busy ; unsigned long bitmap[15U] ; }; struct ida { struct idr idr ; struct ida_bitmap *free_bitmap ; }; struct dentry; struct iattr; struct super_block; struct file_system_type; struct kernfs_open_node; struct kernfs_iattrs; struct kernfs_root; struct kernfs_elem_dir { unsigned long subdirs ; struct rb_root children ; struct kernfs_root *root ; }; struct kernfs_node; struct kernfs_elem_symlink { struct kernfs_node *target_kn ; }; struct kernfs_ops; struct kernfs_elem_attr { struct kernfs_ops const *ops ; struct kernfs_open_node *open ; loff_t size ; struct kernfs_node *notify_next ; }; union __anonunion____missing_field_name_171 { struct kernfs_elem_dir dir ; struct kernfs_elem_symlink symlink ; struct kernfs_elem_attr attr ; }; struct kernfs_node { atomic_t count ; atomic_t active ; struct lockdep_map dep_map ; struct kernfs_node *parent ; char const *name ; struct rb_node rb ; void const *ns ; unsigned int hash ; union __anonunion____missing_field_name_171 __annonCompField48 ; void *priv ; unsigned short flags ; umode_t mode ; unsigned int ino ; struct kernfs_iattrs *iattr ; }; struct kernfs_syscall_ops { int (*remount_fs)(struct kernfs_root * , int * , char * ) ; int (*show_options)(struct seq_file * , struct kernfs_root * ) ; int (*mkdir)(struct kernfs_node * , char const * , umode_t ) ; int (*rmdir)(struct kernfs_node * ) ; int (*rename)(struct kernfs_node * , struct kernfs_node * , char const * ) ; }; struct kernfs_root { struct kernfs_node *kn ; unsigned int flags ; struct ida ino_ida ; struct kernfs_syscall_ops *syscall_ops ; struct list_head supers ; wait_queue_head_t deactivate_waitq ; }; struct kernfs_open_file { struct kernfs_node *kn ; struct file *file ; void *priv ; struct mutex mutex ; int event ; struct list_head list ; char *prealloc_buf ; size_t atomic_write_len ; bool mmapped ; struct vm_operations_struct const *vm_ops ; }; struct kernfs_ops { int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; ssize_t (*read)(struct kernfs_open_file * , char * , size_t , loff_t ) ; size_t atomic_write_len ; bool prealloc ; ssize_t (*write)(struct kernfs_open_file * , char * , size_t , loff_t ) ; int (*mmap)(struct kernfs_open_file * , struct vm_area_struct * ) ; struct lock_class_key lockdep_key ; }; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; bool (*current_may_mount)(void) ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct bin_attribute; struct attribute { char const *name ; umode_t mode ; bool ignore_lockdep ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; umode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; struct bin_attribute **bin_attrs ; }; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(struct file * , struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; }; struct kref { atomic_t refcount ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct kernfs_node *sd ; struct kref kref ; struct delayed_work release ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *argv[3U] ; char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct kernel_param; struct kernel_param_ops { unsigned int flags ; int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion____missing_field_name_172 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct module *mod ; struct kernel_param_ops const *ops ; u16 const perm ; s8 level ; u8 flags ; union __anonunion____missing_field_name_172 __annonCompField49 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct latch_tree_node { struct rb_node node[2U] ; }; struct mod_arch_specific { }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; struct completion *kobj_completion ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct exception_table_entry; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2, MODULE_STATE_UNFORMED = 3 } ; struct mod_tree_node { struct module *mod ; struct latch_tree_node node ; }; struct module_sect_attrs; struct module_notes_attrs; struct tracepoint; struct trace_event_call; struct trace_enum_map; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct mutex param_lock ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; bool sig_ok ; bool async_probe_requested ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; struct mod_tree_node mtn_core ; struct mod_tree_node mtn_init ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; char *args ; void *percpu ; unsigned int percpu_size ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct trace_event_call **trace_events ; unsigned int num_trace_events ; struct trace_enum_map **trace_enums ; unsigned int num_trace_enums ; unsigned int num_ftrace_callsites ; unsigned long *ftrace_callsites ; bool klp_alive ; struct list_head source_list ; struct list_head target_list ; void (*exit)(void) ; atomic_t refcnt ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct kernel_cap_struct { __u32 cap[2U] ; }; typedef struct kernel_cap_struct kernel_cap_t; struct plist_node { int prio ; struct list_head prio_list ; struct list_head node_list ; }; typedef unsigned long cputime_t; struct sem_undo_list; struct sysv_sem { struct sem_undo_list *undo_list ; }; struct user_struct; struct sysv_shm { struct list_head shm_clist ; }; struct __anonstruct_sigset_t_180 { unsigned long sig[1U] ; }; typedef struct __anonstruct_sigset_t_180 sigset_t; struct siginfo; typedef void __signalfn_t(int ); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; union sigval { int sival_int ; void *sival_ptr ; }; typedef union sigval sigval_t; struct __anonstruct__kill_182 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; }; struct __anonstruct__timer_183 { __kernel_timer_t _tid ; int _overrun ; char _pad[0U] ; sigval_t _sigval ; int _sys_private ; }; struct __anonstruct__rt_184 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; sigval_t _sigval ; }; struct __anonstruct__sigchld_185 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; int _status ; __kernel_clock_t _utime ; __kernel_clock_t _stime ; }; struct __anonstruct__addr_bnd_187 { void *_lower ; void *_upper ; }; struct __anonstruct__sigfault_186 { void *_addr ; short _addr_lsb ; struct __anonstruct__addr_bnd_187 _addr_bnd ; }; struct __anonstruct__sigpoll_188 { long _band ; int _fd ; }; struct __anonstruct__sigsys_189 { void *_call_addr ; int _syscall ; unsigned int _arch ; }; union __anonunion__sifields_181 { int _pad[28U] ; struct __anonstruct__kill_182 _kill ; struct __anonstruct__timer_183 _timer ; struct __anonstruct__rt_184 _rt ; struct __anonstruct__sigchld_185 _sigchld ; struct __anonstruct__sigfault_186 _sigfault ; struct __anonstruct__sigpoll_188 _sigpoll ; struct __anonstruct__sigsys_189 _sigsys ; }; struct siginfo { int si_signo ; int si_errno ; int si_code ; union __anonunion__sifields_181 _sifields ; }; typedef struct siginfo siginfo_t; struct sigpending { struct list_head list ; sigset_t signal ; }; struct sigaction { __sighandler_t sa_handler ; unsigned long sa_flags ; __sigrestore_t sa_restorer ; sigset_t sa_mask ; }; struct k_sigaction { struct sigaction sa ; }; enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; unsigned int level ; struct hlist_head tasks[3U] ; struct callback_head rcu ; struct upid numbers[1U] ; }; struct pid_link { struct hlist_node node ; struct pid *pid ; }; struct percpu_counter { raw_spinlock_t lock ; s64 count ; struct list_head list ; s32 *counters ; }; struct seccomp_filter; struct seccomp { int mode ; struct seccomp_filter *filter ; }; struct rt_mutex_waiter; struct rlimit { __kernel_ulong_t rlim_cur ; __kernel_ulong_t rlim_max ; }; struct timerqueue_node { struct rb_node node ; ktime_t expires ; }; struct timerqueue_head { struct rb_root head ; struct timerqueue_node *next ; }; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; struct hrtimer { struct timerqueue_node node ; ktime_t _softexpires ; enum hrtimer_restart (*function)(struct hrtimer * ) ; struct hrtimer_clock_base *base ; unsigned long state ; int start_pid ; void *start_site ; char start_comm[16U] ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; int index ; clockid_t clockid ; struct timerqueue_head active ; ktime_t (*get_time)(void) ; ktime_t offset ; }; struct hrtimer_cpu_base { raw_spinlock_t lock ; seqcount_t seq ; struct hrtimer *running ; unsigned int cpu ; unsigned int active_bases ; unsigned int clock_was_set_seq ; bool migration_enabled ; bool nohz_active ; unsigned char in_hrtirq : 1 ; unsigned char hres_active : 1 ; unsigned char hang_detected : 1 ; ktime_t expires_next ; struct hrtimer *next_timer ; unsigned int nr_events ; unsigned int nr_retries ; unsigned int nr_hangs ; unsigned int max_hang_time ; struct hrtimer_clock_base clock_base[4U] ; }; struct task_io_accounting { u64 rchar ; u64 wchar ; u64 syscr ; u64 syscw ; u64 read_bytes ; u64 write_bytes ; u64 cancelled_write_bytes ; }; struct latency_record { unsigned long backtrace[12U] ; unsigned int count ; unsigned long time ; unsigned long max ; }; struct assoc_array_ptr; struct assoc_array { struct assoc_array_ptr *root ; unsigned long nr_leaves_on_tree ; }; typedef int32_t key_serial_t; typedef uint32_t key_perm_t; struct key; struct signal_struct; struct key_type; struct keyring_index_key { struct key_type *type ; char const *description ; size_t desc_len ; }; union __anonunion____missing_field_name_196 { struct list_head graveyard_link ; struct rb_node serial_node ; }; struct key_user; union __anonunion____missing_field_name_197 { time_t expiry ; time_t revoked_at ; }; struct __anonstruct____missing_field_name_199 { struct key_type *type ; char *description ; }; union __anonunion____missing_field_name_198 { struct keyring_index_key index_key ; struct __anonstruct____missing_field_name_199 __annonCompField52 ; }; union __anonunion_type_data_200 { struct list_head link ; unsigned long x[2U] ; void *p[2U] ; int reject_error ; }; union __anonunion_payload_202 { unsigned long value ; void *rcudata ; void *data ; void *data2[2U] ; }; union __anonunion____missing_field_name_201 { union __anonunion_payload_202 payload ; struct assoc_array keys ; }; struct key { atomic_t usage ; key_serial_t serial ; union __anonunion____missing_field_name_196 __annonCompField50 ; struct rw_semaphore sem ; struct key_user *user ; void *security ; union __anonunion____missing_field_name_197 __annonCompField51 ; time_t last_used_at ; kuid_t uid ; kgid_t gid ; key_perm_t perm ; unsigned short quotalen ; unsigned short datalen ; unsigned long flags ; union __anonunion____missing_field_name_198 __annonCompField53 ; union __anonunion_type_data_200 type_data ; union __anonunion____missing_field_name_201 __annonCompField54 ; }; struct audit_context; struct group_info { atomic_t usage ; int ngroups ; int nblocks ; kgid_t small_block[32U] ; kgid_t *blocks[0U] ; }; struct cred { atomic_t usage ; atomic_t subscribers ; void *put_addr ; unsigned int magic ; kuid_t uid ; kgid_t gid ; kuid_t suid ; kgid_t sgid ; kuid_t euid ; kgid_t egid ; kuid_t fsuid ; kgid_t fsgid ; unsigned int securebits ; kernel_cap_t cap_inheritable ; kernel_cap_t cap_permitted ; kernel_cap_t cap_effective ; kernel_cap_t cap_bset ; unsigned char jit_keyring ; struct key *session_keyring ; struct key *process_keyring ; struct key *thread_keyring ; struct key *request_key_auth ; void *security ; struct user_struct *user ; struct user_namespace *user_ns ; struct group_info *group_info ; struct callback_head rcu ; }; struct percpu_ref; typedef void percpu_ref_func_t(struct percpu_ref * ); struct percpu_ref { atomic_long_t count ; unsigned long percpu_count_ptr ; percpu_ref_func_t *release ; percpu_ref_func_t *confirm_switch ; bool force_atomic ; struct callback_head rcu ; }; struct cgroup; struct cgroup_root; struct cgroup_subsys; struct cgroup_taskset; struct cgroup_subsys_state { struct cgroup *cgroup ; struct cgroup_subsys *ss ; struct percpu_ref refcnt ; struct cgroup_subsys_state *parent ; struct list_head sibling ; struct list_head children ; int id ; unsigned int flags ; u64 serial_nr ; struct callback_head callback_head ; struct work_struct destroy_work ; }; struct css_set { atomic_t refcount ; struct hlist_node hlist ; struct list_head tasks ; struct list_head mg_tasks ; struct list_head cgrp_links ; struct cgroup *dfl_cgrp ; struct cgroup_subsys_state *subsys[12U] ; struct list_head mg_preload_node ; struct list_head mg_node ; struct cgroup *mg_src_cgrp ; struct css_set *mg_dst_cset ; struct list_head e_cset_node[12U] ; struct callback_head callback_head ; }; struct cgroup { struct cgroup_subsys_state self ; unsigned long flags ; int id ; int populated_cnt ; struct kernfs_node *kn ; struct kernfs_node *procs_kn ; struct kernfs_node *populated_kn ; unsigned int subtree_control ; unsigned int child_subsys_mask ; struct cgroup_subsys_state *subsys[12U] ; struct cgroup_root *root ; struct list_head cset_links ; struct list_head e_csets[12U] ; struct list_head pidlists ; struct mutex pidlist_mutex ; wait_queue_head_t offline_waitq ; struct work_struct release_agent_work ; }; struct cgroup_root { struct kernfs_root *kf_root ; unsigned int subsys_mask ; int hierarchy_id ; struct cgroup cgrp ; atomic_t nr_cgrps ; struct list_head root_list ; unsigned int flags ; struct idr cgroup_idr ; char release_agent_path[4096U] ; char name[64U] ; }; struct cftype { char name[64U] ; int private ; umode_t mode ; size_t max_write_len ; unsigned int flags ; struct cgroup_subsys *ss ; struct list_head node ; struct kernfs_ops *kf_ops ; u64 (*read_u64)(struct cgroup_subsys_state * , struct cftype * ) ; s64 (*read_s64)(struct cgroup_subsys_state * , struct cftype * ) ; int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; int (*write_u64)(struct cgroup_subsys_state * , struct cftype * , u64 ) ; int (*write_s64)(struct cgroup_subsys_state * , struct cftype * , s64 ) ; ssize_t (*write)(struct kernfs_open_file * , char * , size_t , loff_t ) ; struct lock_class_key lockdep_key ; }; struct cgroup_subsys { struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state * ) ; int (*css_online)(struct cgroup_subsys_state * ) ; void (*css_offline)(struct cgroup_subsys_state * ) ; void (*css_released)(struct cgroup_subsys_state * ) ; void (*css_free)(struct cgroup_subsys_state * ) ; void (*css_reset)(struct cgroup_subsys_state * ) ; void (*css_e_css_changed)(struct cgroup_subsys_state * ) ; int (*can_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*cancel_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*fork)(struct task_struct * ) ; void (*exit)(struct cgroup_subsys_state * , struct cgroup_subsys_state * , struct task_struct * ) ; void (*bind)(struct cgroup_subsys_state * ) ; int disabled ; int early_init ; bool broken_hierarchy ; bool warned_broken_hierarchy ; int id ; char const *name ; struct cgroup_root *root ; struct idr css_idr ; struct list_head cfts ; struct cftype *dfl_cftypes ; struct cftype *legacy_cftypes ; unsigned int depends_on ; }; struct futex_pi_state; struct robust_list_head; struct bio_list; struct fs_struct; struct perf_event_context; struct blk_plug; struct nameidata; struct cfs_rq; struct task_group; struct sighand_struct { atomic_t count ; struct k_sigaction action[64U] ; spinlock_t siglock ; wait_queue_head_t signalfd_wqh ; }; struct pacct_struct { int ac_flag ; long ac_exitcode ; unsigned long ac_mem ; cputime_t ac_utime ; cputime_t ac_stime ; unsigned long ac_minflt ; unsigned long ac_majflt ; }; struct cpu_itimer { cputime_t expires ; cputime_t incr ; u32 error ; u32 incr_error ; }; struct cputime { cputime_t utime ; cputime_t stime ; }; struct task_cputime { cputime_t utime ; cputime_t stime ; unsigned long long sum_exec_runtime ; }; struct task_cputime_atomic { atomic64_t utime ; atomic64_t stime ; atomic64_t sum_exec_runtime ; }; struct thread_group_cputimer { struct task_cputime_atomic cputime_atomic ; int running ; }; struct autogroup; struct tty_struct; struct taskstats; struct tty_audit_buf; struct signal_struct { atomic_t sigcnt ; atomic_t live ; int nr_threads ; struct list_head thread_head ; wait_queue_head_t wait_chldexit ; struct task_struct *curr_target ; struct sigpending shared_pending ; int group_exit_code ; int notify_count ; struct task_struct *group_exit_task ; int group_stop_count ; unsigned int flags ; unsigned char is_child_subreaper : 1 ; unsigned char has_child_subreaper : 1 ; int posix_timer_id ; struct list_head posix_timers ; struct hrtimer real_timer ; struct pid *leader_pid ; ktime_t it_real_incr ; struct cpu_itimer it[2U] ; struct thread_group_cputimer cputimer ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct pid *tty_old_pgrp ; int leader ; struct tty_struct *tty ; struct autogroup *autogroup ; seqlock_t stats_lock ; cputime_t utime ; cputime_t stime ; cputime_t cutime ; cputime_t cstime ; cputime_t gtime ; cputime_t cgtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; unsigned long cnvcsw ; unsigned long cnivcsw ; unsigned long min_flt ; unsigned long maj_flt ; unsigned long cmin_flt ; unsigned long cmaj_flt ; unsigned long inblock ; unsigned long oublock ; unsigned long cinblock ; unsigned long coublock ; unsigned long maxrss ; unsigned long cmaxrss ; struct task_io_accounting ioac ; unsigned long long sum_sched_runtime ; struct rlimit rlim[16U] ; struct pacct_struct pacct ; struct taskstats *stats ; unsigned int audit_tty ; unsigned int audit_tty_log_passwd ; struct tty_audit_buf *tty_audit_buf ; oom_flags_t oom_flags ; short oom_score_adj ; short oom_score_adj_min ; struct mutex cred_guard_mutex ; }; struct user_struct { atomic_t __count ; atomic_t processes ; atomic_t sigpending ; atomic_t inotify_watches ; atomic_t inotify_devs ; atomic_t fanotify_listeners ; atomic_long_t epoll_watches ; unsigned long mq_bytes ; unsigned long locked_shm ; struct key *uid_keyring ; struct key *session_keyring ; struct hlist_node uidhash_node ; kuid_t uid ; atomic_long_t locked_vm ; }; struct backing_dev_info; struct reclaim_state; struct sched_info { unsigned long pcount ; unsigned long long run_delay ; unsigned long long last_arrival ; unsigned long long last_queued ; }; struct task_delay_info { spinlock_t lock ; unsigned int flags ; u64 blkio_start ; u64 blkio_delay ; u64 swapin_delay ; u32 blkio_count ; u32 swapin_count ; u64 freepages_start ; u64 freepages_delay ; u32 freepages_count ; }; struct wake_q_node { struct wake_q_node *next ; }; struct io_context; struct pipe_inode_info; struct uts_namespace; struct load_weight { unsigned long weight ; u32 inv_weight ; }; struct sched_avg { u64 last_runnable_update ; s64 decay_count ; unsigned long load_avg_contrib ; unsigned long utilization_avg_contrib ; u32 runnable_avg_sum ; u32 avg_period ; u32 running_avg_sum ; }; struct sched_statistics { u64 wait_start ; u64 wait_max ; u64 wait_count ; u64 wait_sum ; u64 iowait_count ; u64 iowait_sum ; u64 sleep_start ; u64 sleep_max ; s64 sum_sleep_runtime ; u64 block_start ; u64 block_max ; u64 exec_max ; u64 slice_max ; u64 nr_migrations_cold ; u64 nr_failed_migrations_affine ; u64 nr_failed_migrations_running ; u64 nr_failed_migrations_hot ; u64 nr_forced_migrations ; u64 nr_wakeups ; u64 nr_wakeups_sync ; u64 nr_wakeups_migrate ; u64 nr_wakeups_local ; u64 nr_wakeups_remote ; u64 nr_wakeups_affine ; u64 nr_wakeups_affine_attempts ; u64 nr_wakeups_passive ; u64 nr_wakeups_idle ; }; struct sched_entity { struct load_weight load ; struct rb_node run_node ; struct list_head group_node ; unsigned int on_rq ; u64 exec_start ; u64 sum_exec_runtime ; u64 vruntime ; u64 prev_sum_exec_runtime ; u64 nr_migrations ; struct sched_statistics statistics ; int depth ; struct sched_entity *parent ; struct cfs_rq *cfs_rq ; struct cfs_rq *my_q ; struct sched_avg avg ; }; struct rt_rq; struct sched_rt_entity { struct list_head run_list ; unsigned long timeout ; unsigned long watchdog_stamp ; unsigned int time_slice ; struct sched_rt_entity *back ; struct sched_rt_entity *parent ; struct rt_rq *rt_rq ; struct rt_rq *my_q ; }; struct sched_dl_entity { struct rb_node rb_node ; u64 dl_runtime ; u64 dl_deadline ; u64 dl_period ; u64 dl_bw ; s64 runtime ; u64 deadline ; unsigned int flags ; int dl_throttled ; int dl_new ; int dl_boosted ; int dl_yielded ; struct hrtimer dl_timer ; }; struct memcg_oom_info { struct mem_cgroup *memcg ; gfp_t gfp_mask ; int order ; unsigned char may_oom : 1 ; }; struct sched_class; struct files_struct; struct compat_robust_list_head; struct numa_group; struct ftrace_ret_stack; struct task_struct { long volatile state ; void *stack ; atomic_t usage ; unsigned int flags ; unsigned int ptrace ; struct llist_node wake_entry ; int on_cpu ; struct task_struct *last_wakee ; unsigned long wakee_flips ; unsigned long wakee_flip_decay_ts ; int wake_cpu ; int on_rq ; int prio ; int static_prio ; int normal_prio ; unsigned int rt_priority ; struct sched_class const *sched_class ; struct sched_entity se ; struct sched_rt_entity rt ; struct task_group *sched_task_group ; struct sched_dl_entity dl ; struct hlist_head preempt_notifiers ; unsigned int btrace_seq ; unsigned int policy ; int nr_cpus_allowed ; cpumask_t cpus_allowed ; unsigned long rcu_tasks_nvcsw ; bool rcu_tasks_holdout ; struct list_head rcu_tasks_holdout_list ; int rcu_tasks_idle_cpu ; struct sched_info sched_info ; struct list_head tasks ; struct plist_node pushable_tasks ; struct rb_node pushable_dl_tasks ; struct mm_struct *mm ; struct mm_struct *active_mm ; u32 vmacache_seqnum ; struct vm_area_struct *vmacache[4U] ; struct task_rss_stat rss_stat ; int exit_state ; int exit_code ; int exit_signal ; int pdeath_signal ; unsigned long jobctl ; unsigned int personality ; unsigned char in_execve : 1 ; unsigned char in_iowait : 1 ; unsigned char sched_reset_on_fork : 1 ; unsigned char sched_contributes_to_load : 1 ; unsigned char sched_migrated : 1 ; unsigned char memcg_kmem_skip_account : 1 ; unsigned char brk_randomized : 1 ; unsigned long atomic_flags ; struct restart_block restart_block ; pid_t pid ; pid_t tgid ; struct task_struct *real_parent ; struct task_struct *parent ; struct list_head children ; struct list_head sibling ; struct task_struct *group_leader ; struct list_head ptraced ; struct list_head ptrace_entry ; struct pid_link pids[3U] ; struct list_head thread_group ; struct list_head thread_node ; struct completion *vfork_done ; int *set_child_tid ; int *clear_child_tid ; cputime_t utime ; cputime_t stime ; cputime_t utimescaled ; cputime_t stimescaled ; cputime_t gtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; u64 start_time ; u64 real_start_time ; unsigned long min_flt ; unsigned long maj_flt ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct cred const *real_cred ; struct cred const *cred ; char comm[16U] ; struct nameidata *nameidata ; struct sysv_sem sysvsem ; struct sysv_shm sysvshm ; unsigned long last_switch_count ; struct thread_struct thread ; struct fs_struct *fs ; struct files_struct *files ; struct nsproxy *nsproxy ; struct signal_struct *signal ; struct sighand_struct *sighand ; sigset_t blocked ; sigset_t real_blocked ; sigset_t saved_sigmask ; struct sigpending pending ; unsigned long sas_ss_sp ; size_t sas_ss_size ; int (*notifier)(void * ) ; void *notifier_data ; sigset_t *notifier_mask ; struct callback_head *task_works ; struct audit_context *audit_context ; kuid_t loginuid ; unsigned int sessionid ; struct seccomp seccomp ; u32 parent_exec_id ; u32 self_exec_id ; spinlock_t alloc_lock ; raw_spinlock_t pi_lock ; struct wake_q_node wake_q ; struct rb_root pi_waiters ; struct rb_node *pi_waiters_leftmost ; struct rt_mutex_waiter *pi_blocked_on ; struct mutex_waiter *blocked_on ; unsigned int irq_events ; unsigned long hardirq_enable_ip ; unsigned long hardirq_disable_ip ; unsigned int hardirq_enable_event ; unsigned int hardirq_disable_event ; int hardirqs_enabled ; int hardirq_context ; unsigned long softirq_disable_ip ; unsigned long softirq_enable_ip ; unsigned int softirq_disable_event ; unsigned int softirq_enable_event ; int softirqs_enabled ; int softirq_context ; u64 curr_chain_key ; int lockdep_depth ; unsigned int lockdep_recursion ; struct held_lock held_locks[48U] ; gfp_t lockdep_reclaim_gfp ; void *journal_info ; struct bio_list *bio_list ; struct blk_plug *plug ; struct reclaim_state *reclaim_state ; struct backing_dev_info *backing_dev_info ; struct io_context *io_context ; unsigned long ptrace_message ; siginfo_t *last_siginfo ; struct task_io_accounting ioac ; u64 acct_rss_mem1 ; u64 acct_vm_mem1 ; cputime_t acct_timexpd ; nodemask_t mems_allowed ; seqcount_t mems_allowed_seq ; int cpuset_mem_spread_rotor ; int cpuset_slab_spread_rotor ; struct css_set *cgroups ; struct list_head cg_list ; struct robust_list_head *robust_list ; struct compat_robust_list_head *compat_robust_list ; struct list_head pi_state_list ; struct futex_pi_state *pi_state_cache ; struct perf_event_context *perf_event_ctxp[2U] ; struct mutex perf_event_mutex ; struct list_head perf_event_list ; struct mempolicy *mempolicy ; short il_next ; short pref_node_fork ; int numa_scan_seq ; unsigned int numa_scan_period ; unsigned int numa_scan_period_max ; int numa_preferred_nid ; unsigned long numa_migrate_retry ; u64 node_stamp ; u64 last_task_numa_placement ; u64 last_sum_exec_runtime ; struct callback_head numa_work ; struct list_head numa_entry ; struct numa_group *numa_group ; unsigned long *numa_faults ; unsigned long total_numa_faults ; unsigned long numa_faults_locality[3U] ; unsigned long numa_pages_migrated ; struct callback_head rcu ; struct pipe_inode_info *splice_pipe ; struct page_frag task_frag ; struct task_delay_info *delays ; int make_it_fail ; int nr_dirtied ; int nr_dirtied_pause ; unsigned long dirty_paused_when ; int latency_record_count ; struct latency_record latency_record[32U] ; unsigned long timer_slack_ns ; unsigned long default_timer_slack_ns ; unsigned int kasan_depth ; int curr_ret_stack ; struct ftrace_ret_stack *ret_stack ; unsigned long long ftrace_timestamp ; atomic_t trace_overrun ; atomic_t tracing_graph_pause ; unsigned long trace ; unsigned long trace_recursion ; struct memcg_oom_info memcg_oom ; struct uprobe_task *utask ; unsigned int sequential_io ; unsigned int sequential_io_avg ; unsigned long task_state_change ; int pagefault_disabled ; }; enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED = 1, IRQ_WAKE_THREAD = 2 } ; typedef enum irqreturn irqreturn_t; struct ethtool_pauseparam; struct ethtool_ringparam; struct ieee_ets; struct ethtool_eeprom; struct ethtool_cmd; struct ieee_pfc; struct ethtool_coalesce; struct dcb_app; struct hlist_bl_node; struct hlist_bl_head { struct hlist_bl_node *first ; }; struct hlist_bl_node { struct hlist_bl_node *next ; struct hlist_bl_node **pprev ; }; struct __anonstruct____missing_field_name_220 { spinlock_t lock ; int count ; }; union __anonunion____missing_field_name_219 { struct __anonstruct____missing_field_name_220 __annonCompField58 ; }; struct lockref { union __anonunion____missing_field_name_219 __annonCompField59 ; }; struct path; struct vfsmount; struct __anonstruct____missing_field_name_222 { u32 hash ; u32 len ; }; union __anonunion____missing_field_name_221 { struct __anonstruct____missing_field_name_222 __annonCompField60 ; u64 hash_len ; }; struct qstr { union __anonunion____missing_field_name_221 __annonCompField61 ; unsigned char const *name ; }; struct dentry_operations; union __anonunion_d_u_223 { struct hlist_node d_alias ; struct callback_head d_rcu ; }; struct dentry { unsigned int d_flags ; seqcount_t d_seq ; struct hlist_bl_node d_hash ; struct dentry *d_parent ; struct qstr d_name ; struct inode *d_inode ; unsigned char d_iname[32U] ; struct lockref d_lockref ; struct dentry_operations const *d_op ; struct super_block *d_sb ; unsigned long d_time ; void *d_fsdata ; struct list_head d_lru ; struct list_head d_child ; struct list_head d_subdirs ; union __anonunion_d_u_223 d_u ; }; struct dentry_operations { int (*d_revalidate)(struct dentry * , unsigned int ) ; int (*d_weak_revalidate)(struct dentry * , unsigned int ) ; int (*d_hash)(struct dentry const * , struct qstr * ) ; int (*d_compare)(struct dentry const * , struct dentry const * , unsigned int , char const * , struct qstr const * ) ; int (*d_delete)(struct dentry const * ) ; void (*d_release)(struct dentry * ) ; void (*d_prune)(struct dentry * ) ; void (*d_iput)(struct dentry * , struct inode * ) ; char *(*d_dname)(struct dentry * , char * , int ) ; struct vfsmount *(*d_automount)(struct path * ) ; int (*d_manage)(struct dentry * , bool ) ; struct inode *(*d_select_inode)(struct dentry * , unsigned int ) ; }; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct shrink_control { gfp_t gfp_mask ; unsigned long nr_to_scan ; int nid ; struct mem_cgroup *memcg ; }; struct shrinker { unsigned long (*count_objects)(struct shrinker * , struct shrink_control * ) ; unsigned long (*scan_objects)(struct shrinker * , struct shrink_control * ) ; int seeks ; long batch ; unsigned long flags ; struct list_head list ; atomic_long_t *nr_deferred ; }; struct list_lru_one { struct list_head list ; long nr_items ; }; struct list_lru_memcg { struct list_lru_one *lru[0U] ; }; struct list_lru_node { spinlock_t lock ; struct list_lru_one lru ; struct list_lru_memcg *memcg_lrus ; }; struct list_lru { struct list_lru_node *node ; struct list_head list ; }; struct __anonstruct____missing_field_name_227 { struct radix_tree_node *parent ; void *private_data ; }; union __anonunion____missing_field_name_226 { struct __anonstruct____missing_field_name_227 __annonCompField62 ; struct callback_head callback_head ; }; struct radix_tree_node { unsigned int path ; unsigned int count ; union __anonunion____missing_field_name_226 __annonCompField63 ; struct list_head private_list ; void *slots[64U] ; unsigned long tags[3U][1U] ; }; struct radix_tree_root { unsigned int height ; gfp_t gfp_mask ; struct radix_tree_node *rnode ; }; struct semaphore { raw_spinlock_t lock ; unsigned int count ; struct list_head wait_list ; }; struct fiemap_extent { __u64 fe_logical ; __u64 fe_physical ; __u64 fe_length ; __u64 fe_reserved64[2U] ; __u32 fe_flags ; __u32 fe_reserved[3U] ; }; enum migrate_mode { MIGRATE_ASYNC = 0, MIGRATE_SYNC_LIGHT = 1, MIGRATE_SYNC = 2 } ; struct block_device; struct bio_vec { struct page *bv_page ; unsigned int bv_len ; unsigned int bv_offset ; }; struct bdi_writeback; struct export_operations; struct iovec; struct kiocb; struct poll_table_struct; struct kstatfs; struct swap_info_struct; struct iov_iter; struct vm_fault; struct iattr { unsigned int ia_valid ; umode_t ia_mode ; kuid_t ia_uid ; kgid_t ia_gid ; loff_t ia_size ; struct timespec ia_atime ; struct timespec ia_mtime ; struct timespec ia_ctime ; struct file *ia_file ; }; struct dquot; typedef __kernel_uid32_t projid_t; struct __anonstruct_kprojid_t_231 { projid_t val ; }; typedef struct __anonstruct_kprojid_t_231 kprojid_t; enum quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 } ; typedef long long qsize_t; union __anonunion____missing_field_name_232 { kuid_t uid ; kgid_t gid ; kprojid_t projid ; }; struct kqid { union __anonunion____missing_field_name_232 __annonCompField65 ; enum quota_type type ; }; struct mem_dqblk { qsize_t dqb_bhardlimit ; qsize_t dqb_bsoftlimit ; qsize_t dqb_curspace ; qsize_t dqb_rsvspace ; qsize_t dqb_ihardlimit ; qsize_t dqb_isoftlimit ; qsize_t dqb_curinodes ; time_t dqb_btime ; time_t dqb_itime ; }; struct quota_format_type; struct mem_dqinfo { struct quota_format_type *dqi_format ; int dqi_fmt_id ; struct list_head dqi_dirty_list ; unsigned long dqi_flags ; unsigned int dqi_bgrace ; unsigned int dqi_igrace ; qsize_t dqi_max_spc_limit ; qsize_t dqi_max_ino_limit ; void *dqi_priv ; }; struct dquot { struct hlist_node dq_hash ; struct list_head dq_inuse ; struct list_head dq_free ; struct list_head dq_dirty ; struct mutex dq_lock ; atomic_t dq_count ; wait_queue_head_t dq_wait_unused ; struct super_block *dq_sb ; struct kqid dq_id ; loff_t dq_off ; unsigned long dq_flags ; struct mem_dqblk dq_dqb ; }; struct quota_format_ops { int (*check_quota_file)(struct super_block * , int ) ; int (*read_file_info)(struct super_block * , int ) ; int (*write_file_info)(struct super_block * , int ) ; int (*free_file_info)(struct super_block * , int ) ; int (*read_dqblk)(struct dquot * ) ; int (*commit_dqblk)(struct dquot * ) ; int (*release_dqblk)(struct dquot * ) ; }; struct dquot_operations { int (*write_dquot)(struct dquot * ) ; struct dquot *(*alloc_dquot)(struct super_block * , int ) ; void (*destroy_dquot)(struct dquot * ) ; int (*acquire_dquot)(struct dquot * ) ; int (*release_dquot)(struct dquot * ) ; int (*mark_dirty)(struct dquot * ) ; int (*write_info)(struct super_block * , int ) ; qsize_t *(*get_reserved_space)(struct inode * ) ; int (*get_projid)(struct inode * , kprojid_t * ) ; }; struct qc_dqblk { int d_fieldmask ; u64 d_spc_hardlimit ; u64 d_spc_softlimit ; u64 d_ino_hardlimit ; u64 d_ino_softlimit ; u64 d_space ; u64 d_ino_count ; s64 d_ino_timer ; s64 d_spc_timer ; int d_ino_warns ; int d_spc_warns ; u64 d_rt_spc_hardlimit ; u64 d_rt_spc_softlimit ; u64 d_rt_space ; s64 d_rt_spc_timer ; int d_rt_spc_warns ; }; struct qc_type_state { unsigned int flags ; unsigned int spc_timelimit ; unsigned int ino_timelimit ; unsigned int rt_spc_timelimit ; unsigned int spc_warnlimit ; unsigned int ino_warnlimit ; unsigned int rt_spc_warnlimit ; unsigned long long ino ; blkcnt_t blocks ; blkcnt_t nextents ; }; struct qc_state { unsigned int s_incoredqs ; struct qc_type_state s_state[3U] ; }; struct qc_info { int i_fieldmask ; unsigned int i_flags ; unsigned int i_spc_timelimit ; unsigned int i_ino_timelimit ; unsigned int i_rt_spc_timelimit ; unsigned int i_spc_warnlimit ; unsigned int i_ino_warnlimit ; unsigned int i_rt_spc_warnlimit ; }; struct quotactl_ops { int (*quota_on)(struct super_block * , int , int , struct path * ) ; int (*quota_off)(struct super_block * , int ) ; int (*quota_enable)(struct super_block * , unsigned int ) ; int (*quota_disable)(struct super_block * , unsigned int ) ; int (*quota_sync)(struct super_block * , int ) ; int (*set_info)(struct super_block * , int , struct qc_info * ) ; int (*get_dqblk)(struct super_block * , struct kqid , struct qc_dqblk * ) ; int (*set_dqblk)(struct super_block * , struct kqid , struct qc_dqblk * ) ; int (*get_state)(struct super_block * , struct qc_state * ) ; int (*rm_xquota)(struct super_block * , unsigned int ) ; }; struct quota_format_type { int qf_fmt_id ; struct quota_format_ops const *qf_ops ; struct module *qf_owner ; struct quota_format_type *qf_next ; }; struct quota_info { unsigned int flags ; struct mutex dqio_mutex ; struct mutex dqonoff_mutex ; struct inode *files[3U] ; struct mem_dqinfo info[3U] ; struct quota_format_ops const *ops[3U] ; }; struct writeback_control; struct kiocb { struct file *ki_filp ; loff_t ki_pos ; void (*ki_complete)(struct kiocb * , long , long ) ; void *private ; int ki_flags ; }; struct address_space_operations { int (*writepage)(struct page * , struct writeback_control * ) ; int (*readpage)(struct file * , struct page * ) ; int (*writepages)(struct address_space * , struct writeback_control * ) ; int (*set_page_dirty)(struct page * ) ; int (*readpages)(struct file * , struct address_space * , struct list_head * , unsigned int ) ; int (*write_begin)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page ** , void ** ) ; int (*write_end)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page * , void * ) ; sector_t (*bmap)(struct address_space * , sector_t ) ; void (*invalidatepage)(struct page * , unsigned int , unsigned int ) ; int (*releasepage)(struct page * , gfp_t ) ; void (*freepage)(struct page * ) ; ssize_t (*direct_IO)(struct kiocb * , struct iov_iter * , loff_t ) ; int (*migratepage)(struct address_space * , struct page * , struct page * , enum migrate_mode ) ; int (*launder_page)(struct page * ) ; int (*is_partially_uptodate)(struct page * , unsigned long , unsigned long ) ; void (*is_dirty_writeback)(struct page * , bool * , bool * ) ; int (*error_remove_page)(struct address_space * , struct page * ) ; int (*swap_activate)(struct swap_info_struct * , struct file * , sector_t * ) ; void (*swap_deactivate)(struct file * ) ; }; struct address_space { struct inode *host ; struct radix_tree_root page_tree ; spinlock_t tree_lock ; atomic_t i_mmap_writable ; struct rb_root i_mmap ; struct rw_semaphore i_mmap_rwsem ; unsigned long nrpages ; unsigned long nrshadows ; unsigned long writeback_index ; struct address_space_operations const *a_ops ; unsigned long flags ; spinlock_t private_lock ; struct list_head private_list ; void *private_data ; }; struct request_queue; struct hd_struct; struct gendisk; struct block_device { dev_t bd_dev ; int bd_openers ; struct inode *bd_inode ; struct super_block *bd_super ; struct mutex bd_mutex ; struct list_head bd_inodes ; void *bd_claiming ; void *bd_holder ; int bd_holders ; bool bd_write_holder ; struct list_head bd_holder_disks ; struct block_device *bd_contains ; unsigned int bd_block_size ; struct hd_struct *bd_part ; unsigned int bd_part_count ; int bd_invalidated ; struct gendisk *bd_disk ; struct request_queue *bd_queue ; struct list_head bd_list ; unsigned long bd_private ; int bd_fsfreeze_count ; struct mutex bd_fsfreeze_mutex ; }; struct posix_acl; struct inode_operations; union __anonunion____missing_field_name_235 { unsigned int const i_nlink ; unsigned int __i_nlink ; }; union __anonunion____missing_field_name_236 { struct hlist_head i_dentry ; struct callback_head i_rcu ; }; struct file_lock_context; struct cdev; union __anonunion____missing_field_name_237 { struct pipe_inode_info *i_pipe ; struct block_device *i_bdev ; struct cdev *i_cdev ; char *i_link ; }; struct inode { umode_t i_mode ; unsigned short i_opflags ; kuid_t i_uid ; kgid_t i_gid ; unsigned int i_flags ; struct posix_acl *i_acl ; struct posix_acl *i_default_acl ; struct inode_operations const *i_op ; struct super_block *i_sb ; struct address_space *i_mapping ; void *i_security ; unsigned long i_ino ; union __anonunion____missing_field_name_235 __annonCompField66 ; dev_t i_rdev ; loff_t i_size ; struct timespec i_atime ; struct timespec i_mtime ; struct timespec i_ctime ; spinlock_t i_lock ; unsigned short i_bytes ; unsigned int i_blkbits ; blkcnt_t i_blocks ; unsigned long i_state ; struct mutex i_mutex ; unsigned long dirtied_when ; unsigned long dirtied_time_when ; struct hlist_node i_hash ; struct list_head i_wb_list ; struct bdi_writeback *i_wb ; int i_wb_frn_winner ; u16 i_wb_frn_avg_time ; u16 i_wb_frn_history ; struct list_head i_lru ; struct list_head i_sb_list ; union __anonunion____missing_field_name_236 __annonCompField67 ; u64 i_version ; atomic_t i_count ; atomic_t i_dio_count ; atomic_t i_writecount ; atomic_t i_readcount ; struct file_operations const *i_fop ; struct file_lock_context *i_flctx ; struct address_space i_data ; struct list_head i_devices ; union __anonunion____missing_field_name_237 __annonCompField68 ; __u32 i_generation ; __u32 i_fsnotify_mask ; struct hlist_head i_fsnotify_marks ; void *i_private ; }; struct fown_struct { rwlock_t lock ; struct pid *pid ; enum pid_type pid_type ; kuid_t uid ; kuid_t euid ; int signum ; }; struct file_ra_state { unsigned long start ; unsigned int size ; unsigned int async_size ; unsigned int ra_pages ; unsigned int mmap_miss ; loff_t prev_pos ; }; union __anonunion_f_u_238 { struct llist_node fu_llist ; struct callback_head fu_rcuhead ; }; struct file { union __anonunion_f_u_238 f_u ; struct path f_path ; struct inode *f_inode ; struct file_operations const *f_op ; spinlock_t f_lock ; atomic_long_t f_count ; unsigned int f_flags ; fmode_t f_mode ; struct mutex f_pos_lock ; loff_t f_pos ; struct fown_struct f_owner ; struct cred const *f_cred ; struct file_ra_state f_ra ; u64 f_version ; void *f_security ; void *private_data ; struct list_head f_ep_links ; struct list_head f_tfile_llink ; struct address_space *f_mapping ; }; typedef void *fl_owner_t; struct file_lock; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; }; struct lock_manager_operations { int (*lm_compare_owner)(struct file_lock * , struct file_lock * ) ; unsigned long (*lm_owner_key)(struct file_lock * ) ; fl_owner_t (*lm_get_owner)(fl_owner_t ) ; void (*lm_put_owner)(fl_owner_t ) ; void (*lm_notify)(struct file_lock * ) ; int (*lm_grant)(struct file_lock * , int ) ; bool (*lm_break)(struct file_lock * ) ; int (*lm_change)(struct file_lock * , int , struct list_head * ) ; void (*lm_setup)(struct file_lock * , void ** ) ; }; struct net; struct nlm_lockowner; struct nfs_lock_info { u32 state ; struct nlm_lockowner *owner ; struct list_head list ; }; struct nfs4_lock_state; struct nfs4_lock_info { struct nfs4_lock_state *owner ; }; struct fasync_struct; struct __anonstruct_afs_240 { struct list_head link ; int state ; }; union __anonunion_fl_u_239 { struct nfs_lock_info nfs_fl ; struct nfs4_lock_info nfs4_fl ; struct __anonstruct_afs_240 afs ; }; struct file_lock { struct file_lock *fl_next ; struct list_head fl_list ; struct hlist_node fl_link ; struct list_head fl_block ; fl_owner_t fl_owner ; unsigned int fl_flags ; unsigned char fl_type ; unsigned int fl_pid ; int fl_link_cpu ; struct pid *fl_nspid ; wait_queue_head_t fl_wait ; struct file *fl_file ; loff_t fl_start ; loff_t fl_end ; struct fasync_struct *fl_fasync ; unsigned long fl_break_time ; unsigned long fl_downgrade_time ; struct file_lock_operations const *fl_ops ; struct lock_manager_operations const *fl_lmops ; union __anonunion_fl_u_239 fl_u ; }; struct file_lock_context { spinlock_t flc_lock ; struct list_head flc_flock ; struct list_head flc_posix ; struct list_head flc_lease ; }; struct fasync_struct { spinlock_t fa_lock ; int magic ; int fa_fd ; struct fasync_struct *fa_next ; struct file *fa_file ; struct callback_head fa_rcu ; }; struct sb_writers { struct percpu_counter counter[3U] ; wait_queue_head_t wait ; int frozen ; wait_queue_head_t wait_unfrozen ; struct lockdep_map lock_map[3U] ; }; struct super_operations; struct xattr_handler; struct mtd_info; struct super_block { struct list_head s_list ; dev_t s_dev ; unsigned char s_blocksize_bits ; unsigned long s_blocksize ; loff_t s_maxbytes ; struct file_system_type *s_type ; struct super_operations const *s_op ; struct dquot_operations const *dq_op ; struct quotactl_ops const *s_qcop ; struct export_operations const *s_export_op ; unsigned long s_flags ; unsigned long s_iflags ; unsigned long s_magic ; struct dentry *s_root ; struct rw_semaphore s_umount ; int s_count ; atomic_t s_active ; void *s_security ; struct xattr_handler const **s_xattr ; struct list_head s_inodes ; struct hlist_bl_head s_anon ; struct list_head s_mounts ; struct block_device *s_bdev ; struct backing_dev_info *s_bdi ; struct mtd_info *s_mtd ; struct hlist_node s_instances ; unsigned int s_quota_types ; struct quota_info s_dquot ; struct sb_writers s_writers ; char s_id[32U] ; u8 s_uuid[16U] ; void *s_fs_info ; unsigned int s_max_links ; fmode_t s_mode ; u32 s_time_gran ; struct mutex s_vfs_rename_mutex ; char *s_subtype ; char *s_options ; struct dentry_operations const *s_d_op ; int cleancache_poolid ; struct shrinker s_shrink ; atomic_long_t s_remove_count ; int s_readonly_remount ; struct workqueue_struct *s_dio_done_wq ; struct hlist_head s_pins ; struct list_lru s_dentry_lru ; struct list_lru s_inode_lru ; struct callback_head rcu ; int s_stack_depth ; }; struct fiemap_extent_info { unsigned int fi_flags ; unsigned int fi_extents_mapped ; unsigned int fi_extents_max ; struct fiemap_extent *fi_extents_start ; }; struct dir_context; struct dir_context { int (*actor)(struct dir_context * , char const * , int , loff_t , u64 , unsigned int ) ; loff_t pos ; }; struct file_operations { struct module *owner ; loff_t (*llseek)(struct file * , loff_t , int ) ; ssize_t (*read)(struct file * , char * , size_t , loff_t * ) ; ssize_t (*write)(struct file * , char const * , size_t , loff_t * ) ; ssize_t (*read_iter)(struct kiocb * , struct iov_iter * ) ; ssize_t (*write_iter)(struct kiocb * , struct iov_iter * ) ; int (*iterate)(struct file * , struct dir_context * ) ; unsigned int (*poll)(struct file * , struct poll_table_struct * ) ; long (*unlocked_ioctl)(struct file * , unsigned int , unsigned long ) ; long (*compat_ioctl)(struct file * , unsigned int , unsigned long ) ; int (*mmap)(struct file * , struct vm_area_struct * ) ; int (*mremap)(struct file * , struct vm_area_struct * ) ; int (*open)(struct inode * , struct file * ) ; int (*flush)(struct file * , fl_owner_t ) ; int (*release)(struct inode * , struct file * ) ; int (*fsync)(struct file * , loff_t , loff_t , int ) ; int (*aio_fsync)(struct kiocb * , int ) ; int (*fasync)(int , struct file * , int ) ; int (*lock)(struct file * , int , struct file_lock * ) ; ssize_t (*sendpage)(struct file * , struct page * , int , size_t , loff_t * , int ) ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; int (*check_flags)(int ) ; int (*flock)(struct file * , int , struct file_lock * ) ; ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t , unsigned int ) ; ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*setlease)(struct file * , long , struct file_lock ** , void ** ) ; long (*fallocate)(struct file * , int , loff_t , loff_t ) ; void (*show_fdinfo)(struct seq_file * , struct file * ) ; }; struct inode_operations { struct dentry *(*lookup)(struct inode * , struct dentry * , unsigned int ) ; char const *(*follow_link)(struct dentry * , void ** ) ; int (*permission)(struct inode * , int ) ; struct posix_acl *(*get_acl)(struct inode * , int ) ; int (*readlink)(struct dentry * , char * , int ) ; void (*put_link)(struct inode * , void * ) ; int (*create)(struct inode * , struct dentry * , umode_t , bool ) ; int (*link)(struct dentry * , struct inode * , struct dentry * ) ; int (*unlink)(struct inode * , struct dentry * ) ; int (*symlink)(struct inode * , struct dentry * , char const * ) ; int (*mkdir)(struct inode * , struct dentry * , umode_t ) ; int (*rmdir)(struct inode * , struct dentry * ) ; int (*mknod)(struct inode * , struct dentry * , umode_t , dev_t ) ; int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ; int (*rename2)(struct inode * , struct dentry * , struct inode * , struct dentry * , unsigned int ) ; int (*setattr)(struct dentry * , struct iattr * ) ; int (*getattr)(struct vfsmount * , struct dentry * , struct kstat * ) ; int (*setxattr)(struct dentry * , char const * , void const * , size_t , int ) ; ssize_t (*getxattr)(struct dentry * , char const * , void * , size_t ) ; ssize_t (*listxattr)(struct dentry * , char * , size_t ) ; int (*removexattr)(struct dentry * , char const * ) ; int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64 , u64 ) ; int (*update_time)(struct inode * , struct timespec * , int ) ; int (*atomic_open)(struct inode * , struct dentry * , struct file * , unsigned int , umode_t , int * ) ; int (*tmpfile)(struct inode * , struct dentry * , umode_t ) ; int (*set_acl)(struct inode * , struct posix_acl * , int ) ; }; struct super_operations { struct inode *(*alloc_inode)(struct super_block * ) ; void (*destroy_inode)(struct inode * ) ; void (*dirty_inode)(struct inode * , int ) ; int (*write_inode)(struct inode * , struct writeback_control * ) ; int (*drop_inode)(struct inode * ) ; void (*evict_inode)(struct inode * ) ; void (*put_super)(struct super_block * ) ; int (*sync_fs)(struct super_block * , int ) ; int (*freeze_super)(struct super_block * ) ; int (*freeze_fs)(struct super_block * ) ; int (*thaw_super)(struct super_block * ) ; int (*unfreeze_fs)(struct super_block * ) ; int (*statfs)(struct dentry * , struct kstatfs * ) ; int (*remount_fs)(struct super_block * , int * , char * ) ; void (*umount_begin)(struct super_block * ) ; int (*show_options)(struct seq_file * , struct dentry * ) ; int (*show_devname)(struct seq_file * , struct dentry * ) ; int (*show_path)(struct seq_file * , struct dentry * ) ; int (*show_stats)(struct seq_file * , struct dentry * ) ; ssize_t (*quota_read)(struct super_block * , int , char * , size_t , loff_t ) ; ssize_t (*quota_write)(struct super_block * , int , char const * , size_t , loff_t ) ; struct dquot **(*get_dquots)(struct inode * ) ; int (*bdev_try_to_free_page)(struct super_block * , struct page * , gfp_t ) ; long (*nr_cached_objects)(struct super_block * , struct shrink_control * ) ; long (*free_cached_objects)(struct super_block * , struct shrink_control * ) ; }; struct file_system_type { char const *name ; int fs_flags ; struct dentry *(*mount)(struct file_system_type * , int , char const * , void * ) ; void (*kill_sb)(struct super_block * ) ; struct module *owner ; struct file_system_type *next ; struct hlist_head fs_supers ; struct lock_class_key s_lock_key ; struct lock_class_key s_umount_key ; struct lock_class_key s_vfs_rename_key ; struct lock_class_key s_writers_key[3U] ; struct lock_class_key i_lock_key ; struct lock_class_key i_mutex_key ; struct lock_class_key i_mutex_dir_key ; }; struct seq_file { char *buf ; size_t size ; size_t from ; size_t count ; size_t pad_until ; loff_t index ; loff_t read_pos ; u64 version ; struct mutex lock ; struct seq_operations const *op ; int poll_event ; struct user_namespace *user_ns ; void *private ; }; struct seq_operations { void *(*start)(struct seq_file * , loff_t * ) ; void (*stop)(struct seq_file * , void * ) ; void *(*next)(struct seq_file * , void * , loff_t * ) ; int (*show)(struct seq_file * , void * ) ; }; struct iovec { void *iov_base ; __kernel_size_t iov_len ; }; struct kvec { void *iov_base ; size_t iov_len ; }; union __anonunion____missing_field_name_241 { struct iovec const *iov ; struct kvec const *kvec ; struct bio_vec const *bvec ; }; struct iov_iter { int type ; size_t iov_offset ; size_t count ; union __anonunion____missing_field_name_241 __annonCompField69 ; unsigned long nr_segs ; }; typedef unsigned short __kernel_sa_family_t; typedef __kernel_sa_family_t sa_family_t; struct sockaddr { sa_family_t sa_family ; char sa_data[14U] ; }; struct msghdr { void *msg_name ; int msg_namelen ; struct iov_iter msg_iter ; void *msg_control ; __kernel_size_t msg_controllen ; unsigned int msg_flags ; struct kiocb *msg_iocb ; }; enum ldv_19832 { SS_FREE = 0, SS_UNCONNECTED = 1, SS_CONNECTING = 2, SS_CONNECTED = 3, SS_DISCONNECTING = 4 } ; typedef enum ldv_19832 socket_state; struct socket_wq { wait_queue_head_t wait ; struct fasync_struct *fasync_list ; struct callback_head rcu ; }; struct proto_ops; struct socket { socket_state state ; short type ; unsigned long flags ; struct socket_wq *wq ; struct file *file ; struct sock *sk ; struct proto_ops const *ops ; }; struct proto_ops { int family ; struct module *owner ; int (*release)(struct socket * ) ; int (*bind)(struct socket * , struct sockaddr * , int ) ; int (*connect)(struct socket * , struct sockaddr * , int , int ) ; int (*socketpair)(struct socket * , struct socket * ) ; int (*accept)(struct socket * , struct socket * , int ) ; int (*getname)(struct socket * , struct sockaddr * , int * , int ) ; unsigned int (*poll)(struct file * , struct socket * , struct poll_table_struct * ) ; int (*ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*listen)(struct socket * , int ) ; int (*shutdown)(struct socket * , int ) ; int (*setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct socket * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct socket * , int , int , char * , int * ) ; int (*sendmsg)(struct socket * , struct msghdr * , size_t ) ; int (*recvmsg)(struct socket * , struct msghdr * , size_t , int ) ; int (*mmap)(struct file * , struct socket * , struct vm_area_struct * ) ; ssize_t (*sendpage)(struct socket * , struct page * , int , size_t , int ) ; ssize_t (*splice_read)(struct socket * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*set_peek_off)(struct sock * , int ) ; }; struct exception_table_entry { int insn ; int fixup ; }; struct in6_addr; struct sk_buff; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct pinctrl; struct pinctrl_state; struct dev_pin_info { struct pinctrl *p ; struct pinctrl_state *default_state ; struct pinctrl_state *sleep_state ; struct pinctrl_state *idle_state ; }; struct dma_map_ops; struct dev_archdata { struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct device_node; struct fwnode_handle; struct iommu_ops; struct iommu_group; struct device_attribute; struct bus_type { char const *name ; char const *dev_name ; struct device *dev_root ; struct device_attribute *dev_attrs ; struct attribute_group const **bus_groups ; struct attribute_group const **dev_groups ; struct attribute_group const **drv_groups ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*online)(struct device * ) ; int (*offline)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct iommu_ops const *iommu_ops ; struct subsys_private *p ; struct lock_class_key lock_key ; }; struct device_type; enum probe_type { PROBE_DEFAULT_STRATEGY = 0, PROBE_PREFER_ASYNCHRONOUS = 1, PROBE_FORCE_SYNCHRONOUS = 2 } ; struct of_device_id; struct acpi_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; enum probe_type probe_type ; struct of_device_id const *of_match_table ; struct acpi_device_id const *acpi_match_table ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct attribute_group const **dev_groups ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * , kuid_t * , kgid_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct cma; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; void *driver_data ; struct dev_pm_info power ; struct dev_pm_domain *pm_domain ; struct dev_pin_info *pins ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; unsigned long dma_pfn_offset ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct cma *cma_area ; struct dev_archdata archdata ; struct device_node *of_node ; struct fwnode_handle *fwnode ; dev_t devt ; u32 id ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; struct iommu_group *iommu_group ; bool offline_disabled ; bool offline ; }; struct wakeup_source { char const *name ; struct list_head entry ; spinlock_t lock ; struct wake_irq *wakeirq ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; ktime_t start_prevent_time ; ktime_t prevent_sleep_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long expire_count ; unsigned long wakeup_count ; bool active ; bool autosleep_enabled ; }; struct dma_attrs { unsigned long flags[1U] ; }; enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *cow_page ; struct page *page ; unsigned long max_pgoff ; pte_t *pte ; }; struct vm_operations_struct { void (*open)(struct vm_area_struct * ) ; void (*close)(struct vm_area_struct * ) ; int (*fault)(struct vm_area_struct * , struct vm_fault * ) ; void (*map_pages)(struct vm_area_struct * , struct vm_fault * ) ; int (*page_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*pfn_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*access)(struct vm_area_struct * , unsigned long , void * , int , int ) ; char const *(*name)(struct vm_area_struct * ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; struct page *(*find_special_page)(struct vm_area_struct * , unsigned long ) ; }; struct scatterlist { unsigned long sg_magic ; unsigned long page_link ; unsigned int offset ; unsigned int length ; dma_addr_t dma_address ; unsigned int dma_length ; }; struct sg_table { struct scatterlist *sgl ; unsigned int nents ; unsigned int orig_nents ; }; struct dma_map_ops { void *(*alloc)(struct device * , size_t , dma_addr_t * , gfp_t , struct dma_attrs * ) ; void (*free)(struct device * , size_t , void * , dma_addr_t , struct dma_attrs * ) ; int (*mmap)(struct device * , struct vm_area_struct * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; int (*get_sgtable)(struct device * , struct sg_table * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; dma_addr_t (*map_page)(struct device * , struct page * , unsigned long , size_t , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_page)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ) ; int (*map_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*sync_single_for_cpu)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_for_device)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; void (*sync_sg_for_device)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; int (*mapping_error)(struct device * , dma_addr_t ) ; int (*dma_supported)(struct device * , u64 ) ; int (*set_dma_mask)(struct device * , u64 ) ; int is_phys ; }; typedef u64 netdev_features_t; union __anonunion_in6_u_242 { __u8 u6_addr8[16U] ; __be16 u6_addr16[8U] ; __be32 u6_addr32[4U] ; }; struct in6_addr { union __anonunion_in6_u_242 in6_u ; }; struct ethhdr { unsigned char h_dest[6U] ; unsigned char h_source[6U] ; __be16 h_proto ; }; struct pipe_buf_operations; struct pipe_buffer { struct page *page ; unsigned int offset ; unsigned int len ; struct pipe_buf_operations const *ops ; unsigned int flags ; unsigned long private ; }; struct pipe_inode_info { struct mutex mutex ; wait_queue_head_t wait ; unsigned int nrbufs ; unsigned int curbuf ; unsigned int buffers ; unsigned int readers ; unsigned int writers ; unsigned int files ; unsigned int waiting_writers ; unsigned int r_counter ; unsigned int w_counter ; struct page *tmp_page ; struct fasync_struct *fasync_readers ; struct fasync_struct *fasync_writers ; struct pipe_buffer *bufs ; }; struct pipe_buf_operations { int can_merge ; int (*confirm)(struct pipe_inode_info * , struct pipe_buffer * ) ; void (*release)(struct pipe_inode_info * , struct pipe_buffer * ) ; int (*steal)(struct pipe_inode_info * , struct pipe_buffer * ) ; void (*get)(struct pipe_inode_info * , struct pipe_buffer * ) ; }; struct napi_struct; struct nf_conntrack { atomic_t use ; }; union __anonunion____missing_field_name_247 { struct net_device *physoutdev ; char neigh_header[8U] ; }; union __anonunion____missing_field_name_248 { __be32 ipv4_daddr ; struct in6_addr ipv6_daddr ; }; struct nf_bridge_info { atomic_t use ; unsigned char orig_proto ; bool pkt_otherhost ; __u16 frag_max_size ; unsigned int mask ; struct net_device *physindev ; union __anonunion____missing_field_name_247 __annonCompField73 ; union __anonunion____missing_field_name_248 __annonCompField74 ; }; struct sk_buff_head { struct sk_buff *next ; struct sk_buff *prev ; __u32 qlen ; spinlock_t lock ; }; typedef unsigned int sk_buff_data_t; struct __anonstruct____missing_field_name_251 { u32 stamp_us ; u32 stamp_jiffies ; }; union __anonunion____missing_field_name_250 { u64 v64 ; struct __anonstruct____missing_field_name_251 __annonCompField75 ; }; struct skb_mstamp { union __anonunion____missing_field_name_250 __annonCompField76 ; }; union __anonunion____missing_field_name_254 { ktime_t tstamp ; struct skb_mstamp skb_mstamp ; }; struct __anonstruct____missing_field_name_253 { struct sk_buff *next ; struct sk_buff *prev ; union __anonunion____missing_field_name_254 __annonCompField77 ; }; union __anonunion____missing_field_name_252 { struct __anonstruct____missing_field_name_253 __annonCompField78 ; struct rb_node rbnode ; }; struct sec_path; struct __anonstruct____missing_field_name_256 { __u16 csum_start ; __u16 csum_offset ; }; union __anonunion____missing_field_name_255 { __wsum csum ; struct __anonstruct____missing_field_name_256 __annonCompField80 ; }; union __anonunion____missing_field_name_257 { unsigned int napi_id ; unsigned int sender_cpu ; }; union __anonunion____missing_field_name_258 { __u32 mark ; __u32 reserved_tailroom ; }; union __anonunion____missing_field_name_259 { __be16 inner_protocol ; __u8 inner_ipproto ; }; struct sk_buff { union __anonunion____missing_field_name_252 __annonCompField79 ; struct sock *sk ; struct net_device *dev ; char cb[48U] ; unsigned long _skb_refdst ; void (*destructor)(struct sk_buff * ) ; struct sec_path *sp ; struct nf_conntrack *nfct ; struct nf_bridge_info *nf_bridge ; unsigned int len ; unsigned int data_len ; __u16 mac_len ; __u16 hdr_len ; __u16 queue_mapping ; unsigned char cloned : 1 ; unsigned char nohdr : 1 ; unsigned char fclone : 2 ; unsigned char peeked : 1 ; unsigned char head_frag : 1 ; unsigned char xmit_more : 1 ; __u32 headers_start[0U] ; __u8 __pkt_type_offset[0U] ; unsigned char pkt_type : 3 ; unsigned char pfmemalloc : 1 ; unsigned char ignore_df : 1 ; unsigned char nfctinfo : 3 ; unsigned char nf_trace : 1 ; unsigned char ip_summed : 2 ; unsigned char ooo_okay : 1 ; unsigned char l4_hash : 1 ; unsigned char sw_hash : 1 ; unsigned char wifi_acked_valid : 1 ; unsigned char wifi_acked : 1 ; unsigned char no_fcs : 1 ; unsigned char encapsulation : 1 ; unsigned char encap_hdr_csum : 1 ; unsigned char csum_valid : 1 ; unsigned char csum_complete_sw : 1 ; unsigned char csum_level : 2 ; unsigned char csum_bad : 1 ; unsigned char ndisc_nodetype : 2 ; unsigned char ipvs_property : 1 ; unsigned char inner_protocol_type : 1 ; unsigned char remcsum_offload : 1 ; __u16 tc_index ; __u16 tc_verd ; union __anonunion____missing_field_name_255 __annonCompField81 ; __u32 priority ; int skb_iif ; __u32 hash ; __be16 vlan_proto ; __u16 vlan_tci ; union __anonunion____missing_field_name_257 __annonCompField82 ; __u32 secmark ; union __anonunion____missing_field_name_258 __annonCompField83 ; union __anonunion____missing_field_name_259 __annonCompField84 ; __u16 inner_transport_header ; __u16 inner_network_header ; __u16 inner_mac_header ; __be16 protocol ; __u16 transport_header ; __u16 network_header ; __u16 mac_header ; __u32 headers_end[0U] ; sk_buff_data_t tail ; sk_buff_data_t end ; unsigned char *head ; unsigned char *data ; unsigned int truesize ; atomic_t users ; }; struct dst_entry; struct rtable; struct dql { unsigned int num_queued ; unsigned int adj_limit ; unsigned int last_obj_cnt ; unsigned int limit ; unsigned int num_completed ; unsigned int prev_ovlimit ; unsigned int prev_num_queued ; unsigned int prev_last_obj_cnt ; unsigned int lowest_slack ; unsigned long slack_start_time ; unsigned int max_limit ; unsigned int min_limit ; unsigned int slack_hold_time ; }; struct __anonstruct_sync_serial_settings_261 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; }; typedef struct __anonstruct_sync_serial_settings_261 sync_serial_settings; struct __anonstruct_te1_settings_262 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; unsigned int slot_map ; }; typedef struct __anonstruct_te1_settings_262 te1_settings; struct __anonstruct_raw_hdlc_proto_263 { unsigned short encoding ; unsigned short parity ; }; typedef struct __anonstruct_raw_hdlc_proto_263 raw_hdlc_proto; struct __anonstruct_fr_proto_264 { unsigned int t391 ; unsigned int t392 ; unsigned int n391 ; unsigned int n392 ; unsigned int n393 ; unsigned short lmi ; unsigned short dce ; }; typedef struct __anonstruct_fr_proto_264 fr_proto; struct __anonstruct_fr_proto_pvc_265 { unsigned int dlci ; }; typedef struct __anonstruct_fr_proto_pvc_265 fr_proto_pvc; struct __anonstruct_fr_proto_pvc_info_266 { unsigned int dlci ; char master[16U] ; }; typedef struct __anonstruct_fr_proto_pvc_info_266 fr_proto_pvc_info; struct __anonstruct_cisco_proto_267 { unsigned int interval ; unsigned int timeout ; }; typedef struct __anonstruct_cisco_proto_267 cisco_proto; struct ifmap { unsigned long mem_start ; unsigned long mem_end ; unsigned short base_addr ; unsigned char irq ; unsigned char dma ; unsigned char port ; }; union __anonunion_ifs_ifsu_268 { raw_hdlc_proto *raw_hdlc ; cisco_proto *cisco ; fr_proto *fr ; fr_proto_pvc *fr_pvc ; fr_proto_pvc_info *fr_pvc_info ; sync_serial_settings *sync ; te1_settings *te1 ; }; struct if_settings { unsigned int type ; unsigned int size ; union __anonunion_ifs_ifsu_268 ifs_ifsu ; }; union __anonunion_ifr_ifrn_269 { char ifrn_name[16U] ; }; union __anonunion_ifr_ifru_270 { struct sockaddr ifru_addr ; struct sockaddr ifru_dstaddr ; struct sockaddr ifru_broadaddr ; struct sockaddr ifru_netmask ; struct sockaddr ifru_hwaddr ; short ifru_flags ; int ifru_ivalue ; int ifru_mtu ; struct ifmap ifru_map ; char ifru_slave[16U] ; char ifru_newname[16U] ; void *ifru_data ; struct if_settings ifru_settings ; }; struct ifreq { union __anonunion_ifr_ifrn_269 ifr_ifrn ; union __anonunion_ifr_ifru_270 ifr_ifru ; }; typedef s32 compat_time_t; typedef s32 compat_long_t; typedef u32 compat_uptr_t; struct compat_timespec { compat_time_t tv_sec ; s32 tv_nsec ; }; struct compat_robust_list { compat_uptr_t next ; }; struct compat_robust_list_head { struct compat_robust_list list ; compat_long_t futex_offset ; compat_uptr_t list_op_pending ; }; struct ethtool_cmd { __u32 cmd ; __u32 supported ; __u32 advertising ; __u16 speed ; __u8 duplex ; __u8 port ; __u8 phy_address ; __u8 transceiver ; __u8 autoneg ; __u8 mdio_support ; __u32 maxtxpkt ; __u32 maxrxpkt ; __u16 speed_hi ; __u8 eth_tp_mdix ; __u8 eth_tp_mdix_ctrl ; __u32 lp_advertising ; __u32 reserved[2U] ; }; struct ethtool_drvinfo { __u32 cmd ; char driver[32U] ; char version[32U] ; char fw_version[32U] ; char bus_info[32U] ; char erom_version[32U] ; char reserved2[12U] ; __u32 n_priv_flags ; __u32 n_stats ; __u32 testinfo_len ; __u32 eedump_len ; __u32 regdump_len ; }; struct ethtool_wolinfo { __u32 cmd ; __u32 supported ; __u32 wolopts ; __u8 sopass[6U] ; }; struct ethtool_tunable { __u32 cmd ; __u32 id ; __u32 type_id ; __u32 len ; void *data[0U] ; }; struct ethtool_regs { __u32 cmd ; __u32 version ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eeprom { __u32 cmd ; __u32 magic ; __u32 offset ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eee { __u32 cmd ; __u32 supported ; __u32 advertised ; __u32 lp_advertised ; __u32 eee_active ; __u32 eee_enabled ; __u32 tx_lpi_enabled ; __u32 tx_lpi_timer ; __u32 reserved[2U] ; }; struct ethtool_modinfo { __u32 cmd ; __u32 type ; __u32 eeprom_len ; __u32 reserved[8U] ; }; struct ethtool_coalesce { __u32 cmd ; __u32 rx_coalesce_usecs ; __u32 rx_max_coalesced_frames ; __u32 rx_coalesce_usecs_irq ; __u32 rx_max_coalesced_frames_irq ; __u32 tx_coalesce_usecs ; __u32 tx_max_coalesced_frames ; __u32 tx_coalesce_usecs_irq ; __u32 tx_max_coalesced_frames_irq ; __u32 stats_block_coalesce_usecs ; __u32 use_adaptive_rx_coalesce ; __u32 use_adaptive_tx_coalesce ; __u32 pkt_rate_low ; __u32 rx_coalesce_usecs_low ; __u32 rx_max_coalesced_frames_low ; __u32 tx_coalesce_usecs_low ; __u32 tx_max_coalesced_frames_low ; __u32 pkt_rate_high ; __u32 rx_coalesce_usecs_high ; __u32 rx_max_coalesced_frames_high ; __u32 tx_coalesce_usecs_high ; __u32 tx_max_coalesced_frames_high ; __u32 rate_sample_interval ; }; struct ethtool_ringparam { __u32 cmd ; __u32 rx_max_pending ; __u32 rx_mini_max_pending ; __u32 rx_jumbo_max_pending ; __u32 tx_max_pending ; __u32 rx_pending ; __u32 rx_mini_pending ; __u32 rx_jumbo_pending ; __u32 tx_pending ; }; struct ethtool_channels { __u32 cmd ; __u32 max_rx ; __u32 max_tx ; __u32 max_other ; __u32 max_combined ; __u32 rx_count ; __u32 tx_count ; __u32 other_count ; __u32 combined_count ; }; struct ethtool_pauseparam { __u32 cmd ; __u32 autoneg ; __u32 rx_pause ; __u32 tx_pause ; }; struct ethtool_test { __u32 cmd ; __u32 flags ; __u32 reserved ; __u32 len ; __u64 data[0U] ; }; struct ethtool_stats { __u32 cmd ; __u32 n_stats ; __u64 data[0U] ; }; struct ethtool_tcpip4_spec { __be32 ip4src ; __be32 ip4dst ; __be16 psrc ; __be16 pdst ; __u8 tos ; }; struct ethtool_ah_espip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 spi ; __u8 tos ; }; struct ethtool_usrip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 l4_4_bytes ; __u8 tos ; __u8 ip_ver ; __u8 proto ; }; union ethtool_flow_union { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; struct ethhdr ether_spec ; __u8 hdata[52U] ; }; struct ethtool_flow_ext { __u8 padding[2U] ; unsigned char h_dest[6U] ; __be16 vlan_etype ; __be16 vlan_tci ; __be32 data[2U] ; }; struct ethtool_rx_flow_spec { __u32 flow_type ; union ethtool_flow_union h_u ; struct ethtool_flow_ext h_ext ; union ethtool_flow_union m_u ; struct ethtool_flow_ext m_ext ; __u64 ring_cookie ; __u32 location ; }; struct ethtool_rxnfc { __u32 cmd ; __u32 flow_type ; __u64 data ; struct ethtool_rx_flow_spec fs ; __u32 rule_cnt ; __u32 rule_locs[0U] ; }; struct ethtool_flash { __u32 cmd ; __u32 region ; char data[128U] ; }; struct ethtool_dump { __u32 cmd ; __u32 version ; __u32 flag ; __u32 len ; __u8 data[0U] ; }; struct ethtool_ts_info { __u32 cmd ; __u32 so_timestamping ; __s32 phc_index ; __u32 tx_types ; __u32 tx_reserved[3U] ; __u32 rx_filters ; __u32 rx_reserved[3U] ; }; enum ethtool_phys_id_state { ETHTOOL_ID_INACTIVE = 0, ETHTOOL_ID_ACTIVE = 1, ETHTOOL_ID_ON = 2, ETHTOOL_ID_OFF = 3 } ; struct ethtool_ops { int (*get_settings)(struct net_device * , struct ethtool_cmd * ) ; int (*set_settings)(struct net_device * , struct ethtool_cmd * ) ; void (*get_drvinfo)(struct net_device * , struct ethtool_drvinfo * ) ; int (*get_regs_len)(struct net_device * ) ; void (*get_regs)(struct net_device * , struct ethtool_regs * , void * ) ; void (*get_wol)(struct net_device * , struct ethtool_wolinfo * ) ; int (*set_wol)(struct net_device * , struct ethtool_wolinfo * ) ; u32 (*get_msglevel)(struct net_device * ) ; void (*set_msglevel)(struct net_device * , u32 ) ; int (*nway_reset)(struct net_device * ) ; u32 (*get_link)(struct net_device * ) ; int (*get_eeprom_len)(struct net_device * ) ; int (*get_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; int (*set_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; void (*get_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; int (*set_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; void (*get_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; int (*set_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; void (*self_test)(struct net_device * , struct ethtool_test * , u64 * ) ; void (*get_strings)(struct net_device * , u32 , u8 * ) ; int (*set_phys_id)(struct net_device * , enum ethtool_phys_id_state ) ; void (*get_ethtool_stats)(struct net_device * , struct ethtool_stats * , u64 * ) ; int (*begin)(struct net_device * ) ; void (*complete)(struct net_device * ) ; u32 (*get_priv_flags)(struct net_device * ) ; int (*set_priv_flags)(struct net_device * , u32 ) ; int (*get_sset_count)(struct net_device * , int ) ; int (*get_rxnfc)(struct net_device * , struct ethtool_rxnfc * , u32 * ) ; int (*set_rxnfc)(struct net_device * , struct ethtool_rxnfc * ) ; int (*flash_device)(struct net_device * , struct ethtool_flash * ) ; int (*reset)(struct net_device * , u32 * ) ; u32 (*get_rxfh_key_size)(struct net_device * ) ; u32 (*get_rxfh_indir_size)(struct net_device * ) ; int (*get_rxfh)(struct net_device * , u32 * , u8 * , u8 * ) ; int (*set_rxfh)(struct net_device * , u32 const * , u8 const * , u8 const ) ; void (*get_channels)(struct net_device * , struct ethtool_channels * ) ; int (*set_channels)(struct net_device * , struct ethtool_channels * ) ; int (*get_dump_flag)(struct net_device * , struct ethtool_dump * ) ; int (*get_dump_data)(struct net_device * , struct ethtool_dump * , void * ) ; int (*set_dump)(struct net_device * , struct ethtool_dump * ) ; int (*get_ts_info)(struct net_device * , struct ethtool_ts_info * ) ; int (*get_module_info)(struct net_device * , struct ethtool_modinfo * ) ; int (*get_module_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_eee)(struct net_device * , struct ethtool_eee * ) ; int (*set_eee)(struct net_device * , struct ethtool_eee * ) ; int (*get_tunable)(struct net_device * , struct ethtool_tunable const * , void * ) ; int (*set_tunable)(struct net_device * , struct ethtool_tunable const * , void const * ) ; }; struct prot_inuse; struct netns_core { struct ctl_table_header *sysctl_hdr ; int sysctl_somaxconn ; struct prot_inuse *inuse ; }; struct u64_stats_sync { }; struct ipstats_mib { u64 mibs[36U] ; struct u64_stats_sync syncp ; }; struct icmp_mib { unsigned long mibs[28U] ; }; struct icmpmsg_mib { atomic_long_t mibs[512U] ; }; struct icmpv6_mib { unsigned long mibs[6U] ; }; struct icmpv6_mib_device { atomic_long_t mibs[6U] ; }; struct icmpv6msg_mib { atomic_long_t mibs[512U] ; }; struct icmpv6msg_mib_device { atomic_long_t mibs[512U] ; }; struct tcp_mib { unsigned long mibs[16U] ; }; struct udp_mib { unsigned long mibs[9U] ; }; struct linux_mib { unsigned long mibs[115U] ; }; struct linux_xfrm_mib { unsigned long mibs[29U] ; }; struct proc_dir_entry; struct netns_mib { struct tcp_mib *tcp_statistics ; struct ipstats_mib *ip_statistics ; struct linux_mib *net_statistics ; struct udp_mib *udp_statistics ; struct udp_mib *udplite_statistics ; struct icmp_mib *icmp_statistics ; struct icmpmsg_mib *icmpmsg_statistics ; struct proc_dir_entry *proc_net_devsnmp6 ; struct udp_mib *udp_stats_in6 ; struct udp_mib *udplite_stats_in6 ; struct ipstats_mib *ipv6_statistics ; struct icmpv6_mib *icmpv6_statistics ; struct icmpv6msg_mib *icmpv6msg_statistics ; struct linux_xfrm_mib *xfrm_statistics ; }; struct netns_unix { int sysctl_max_dgram_qlen ; struct ctl_table_header *ctl ; }; struct netns_packet { struct mutex sklist_lock ; struct hlist_head sklist ; }; struct netns_frags { struct percpu_counter mem ; int timeout ; int high_thresh ; int low_thresh ; }; struct ipv4_devconf; struct fib_rules_ops; struct fib_table; struct local_ports { seqlock_t lock ; int range[2U] ; bool warned ; }; struct ping_group_range { seqlock_t lock ; kgid_t range[2U] ; }; struct inet_peer_base; struct xt_table; struct netns_ipv4 { struct ctl_table_header *forw_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *ipv4_hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *xfrm4_hdr ; struct ipv4_devconf *devconf_all ; struct ipv4_devconf *devconf_dflt ; struct fib_rules_ops *rules_ops ; bool fib_has_custom_rules ; struct fib_table *fib_local ; struct fib_table *fib_main ; struct fib_table *fib_default ; int fib_num_tclassid_users ; struct hlist_head *fib_table_hash ; bool fib_offload_disabled ; struct sock *fibnl ; struct sock **icmp_sk ; struct sock *mc_autojoin_sk ; struct inet_peer_base *peers ; struct sock **tcp_sk ; struct netns_frags frags ; struct xt_table *iptable_filter ; struct xt_table *iptable_mangle ; struct xt_table *iptable_raw ; struct xt_table *arptable_filter ; struct xt_table *iptable_security ; struct xt_table *nat_table ; int sysctl_icmp_echo_ignore_all ; int sysctl_icmp_echo_ignore_broadcasts ; int sysctl_icmp_ignore_bogus_error_responses ; int sysctl_icmp_ratelimit ; int sysctl_icmp_ratemask ; int sysctl_icmp_errors_use_inbound_ifaddr ; struct local_ports ip_local_ports ; int sysctl_tcp_ecn ; int sysctl_tcp_ecn_fallback ; int sysctl_ip_no_pmtu_disc ; int sysctl_ip_fwd_use_pmtu ; int sysctl_ip_nonlocal_bind ; int sysctl_fwmark_reflect ; int sysctl_tcp_fwmark_accept ; int sysctl_tcp_mtu_probing ; int sysctl_tcp_base_mss ; int sysctl_tcp_probe_threshold ; u32 sysctl_tcp_probe_interval ; struct ping_group_range ping_group_range ; atomic_t dev_addr_genid ; unsigned long *sysctl_local_reserved_ports ; struct list_head mr_tables ; struct fib_rules_ops *mr_rules_ops ; atomic_t rt_genid ; }; struct neighbour; struct dst_ops { unsigned short family ; unsigned int gc_thresh ; int (*gc)(struct dst_ops * ) ; struct dst_entry *(*check)(struct dst_entry * , __u32 ) ; unsigned int (*default_advmss)(struct dst_entry const * ) ; unsigned int (*mtu)(struct dst_entry const * ) ; u32 *(*cow_metrics)(struct dst_entry * , unsigned long ) ; void (*destroy)(struct dst_entry * ) ; void (*ifdown)(struct dst_entry * , struct net_device * , int ) ; struct dst_entry *(*negative_advice)(struct dst_entry * ) ; void (*link_failure)(struct sk_buff * ) ; void (*update_pmtu)(struct dst_entry * , struct sock * , struct sk_buff * , u32 ) ; void (*redirect)(struct dst_entry * , struct sock * , struct sk_buff * ) ; int (*local_out)(struct sk_buff * ) ; struct neighbour *(*neigh_lookup)(struct dst_entry const * , struct sk_buff * , void const * ) ; struct kmem_cache *kmem_cachep ; struct percpu_counter pcpuc_entries ; }; struct netns_sysctl_ipv6 { struct ctl_table_header *hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *icmp_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *xfrm6_hdr ; int bindv6only ; int flush_delay ; int ip6_rt_max_size ; int ip6_rt_gc_min_interval ; int ip6_rt_gc_timeout ; int ip6_rt_gc_interval ; int ip6_rt_gc_elasticity ; int ip6_rt_mtu_expires ; int ip6_rt_min_advmss ; int flowlabel_consistency ; int auto_flowlabels ; int icmpv6_time ; int anycast_src_echo_reply ; int fwmark_reflect ; int idgen_retries ; int idgen_delay ; int flowlabel_state_ranges ; }; struct ipv6_devconf; struct rt6_info; struct rt6_statistics; struct fib6_table; struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl ; struct ipv6_devconf *devconf_all ; struct ipv6_devconf *devconf_dflt ; struct inet_peer_base *peers ; struct netns_frags frags ; struct xt_table *ip6table_filter ; struct xt_table *ip6table_mangle ; struct xt_table *ip6table_raw ; struct xt_table *ip6table_security ; struct xt_table *ip6table_nat ; struct rt6_info *ip6_null_entry ; struct rt6_statistics *rt6_stats ; struct timer_list ip6_fib_timer ; struct hlist_head *fib_table_hash ; struct fib6_table *fib6_main_tbl ; struct dst_ops ip6_dst_ops ; unsigned int ip6_rt_gc_expire ; unsigned long ip6_rt_last_gc ; struct rt6_info *ip6_prohibit_entry ; struct rt6_info *ip6_blk_hole_entry ; struct fib6_table *fib6_local_tbl ; struct fib_rules_ops *fib6_rules_ops ; struct sock **icmp_sk ; struct sock *ndisc_sk ; struct sock *tcp_sk ; struct sock *igmp_sk ; struct sock *mc_autojoin_sk ; struct list_head mr6_tables ; struct fib_rules_ops *mr6_rules_ops ; atomic_t dev_addr_genid ; atomic_t fib6_sernum ; }; struct netns_nf_frag { struct netns_sysctl_ipv6 sysctl ; struct netns_frags frags ; }; struct netns_sysctl_lowpan { struct ctl_table_header *frags_hdr ; }; struct netns_ieee802154_lowpan { struct netns_sysctl_lowpan sysctl ; struct netns_frags frags ; }; struct sctp_mib; struct netns_sctp { struct sctp_mib *sctp_statistics ; struct proc_dir_entry *proc_net_sctp ; struct ctl_table_header *sysctl_header ; struct sock *ctl_sock ; struct list_head local_addr_list ; struct list_head addr_waitq ; struct timer_list addr_wq_timer ; struct list_head auto_asconf_splist ; spinlock_t addr_wq_lock ; spinlock_t local_addr_lock ; unsigned int rto_initial ; unsigned int rto_min ; unsigned int rto_max ; int rto_alpha ; int rto_beta ; int max_burst ; int cookie_preserve_enable ; char *sctp_hmac_alg ; unsigned int valid_cookie_life ; unsigned int sack_timeout ; unsigned int hb_interval ; int max_retrans_association ; int max_retrans_path ; int max_retrans_init ; int pf_retrans ; int sndbuf_policy ; int rcvbuf_policy ; int default_auto_asconf ; int addip_enable ; int addip_noauth ; int prsctp_enable ; int auth_enable ; int scope_policy ; int rwnd_upd_shift ; unsigned long max_autoclose ; }; struct netns_dccp { struct sock *v4_ctl_sk ; struct sock *v6_ctl_sk ; }; struct in_addr { __be32 s_addr ; }; struct nf_logger; struct netns_nf { struct proc_dir_entry *proc_netfilter ; struct nf_logger const *nf_loggers[13U] ; struct ctl_table_header *nf_log_dir_header ; }; struct ebt_table; struct netns_xt { struct list_head tables[13U] ; bool notrack_deprecated_warning ; bool clusterip_deprecated_warning ; struct ebt_table *broute_table ; struct ebt_table *frame_filter ; struct ebt_table *frame_nat ; }; struct hlist_nulls_node; struct hlist_nulls_head { struct hlist_nulls_node *first ; }; struct hlist_nulls_node { struct hlist_nulls_node *next ; struct hlist_nulls_node **pprev ; }; struct nf_proto_net { struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; struct ctl_table_header *ctl_compat_header ; struct ctl_table *ctl_compat_table ; unsigned int users ; }; struct nf_generic_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_tcp_net { struct nf_proto_net pn ; unsigned int timeouts[14U] ; unsigned int tcp_loose ; unsigned int tcp_be_liberal ; unsigned int tcp_max_retrans ; }; struct nf_udp_net { struct nf_proto_net pn ; unsigned int timeouts[2U] ; }; struct nf_icmp_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_ip_net { struct nf_generic_net generic ; struct nf_tcp_net tcp ; struct nf_udp_net udp ; struct nf_icmp_net icmp ; struct nf_icmp_net icmpv6 ; struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; }; struct ct_pcpu { spinlock_t lock ; struct hlist_nulls_head unconfirmed ; struct hlist_nulls_head dying ; struct hlist_nulls_head tmpl ; }; struct ip_conntrack_stat; struct nf_ct_event_notifier; struct nf_exp_event_notifier; struct netns_ct { atomic_t count ; unsigned int expect_count ; struct delayed_work ecache_dwork ; bool ecache_dwork_pending ; struct ctl_table_header *sysctl_header ; struct ctl_table_header *acct_sysctl_header ; struct ctl_table_header *tstamp_sysctl_header ; struct ctl_table_header *event_sysctl_header ; struct ctl_table_header *helper_sysctl_header ; char *slabname ; unsigned int sysctl_log_invalid ; int sysctl_events ; int sysctl_acct ; int sysctl_auto_assign_helper ; bool auto_assign_helper_warned ; int sysctl_tstamp ; int sysctl_checksum ; unsigned int htable_size ; seqcount_t generation ; struct kmem_cache *nf_conntrack_cachep ; struct hlist_nulls_head *hash ; struct hlist_head *expect_hash ; struct ct_pcpu *pcpu_lists ; struct ip_conntrack_stat *stat ; struct nf_ct_event_notifier *nf_conntrack_event_cb ; struct nf_exp_event_notifier *nf_expect_event_cb ; struct nf_ip_net nf_ct_proto ; unsigned int labels_used ; u8 label_words ; struct hlist_head *nat_bysource ; unsigned int nat_htable_size ; }; struct nft_af_info; struct netns_nftables { struct list_head af_info ; struct list_head commit_list ; struct nft_af_info *ipv4 ; struct nft_af_info *ipv6 ; struct nft_af_info *inet ; struct nft_af_info *arp ; struct nft_af_info *bridge ; struct nft_af_info *netdev ; unsigned int base_seq ; u8 gencursor ; }; typedef irqreturn_t (*irq_handler_t)(int , void * ); struct tasklet_struct { struct tasklet_struct *next ; unsigned long state ; atomic_t count ; void (*func)(unsigned long ) ; unsigned long data ; }; struct flow_cache_percpu { struct hlist_head *hash_table ; int hash_count ; u32 hash_rnd ; int hash_rnd_recalc ; struct tasklet_struct flush_tasklet ; }; struct flow_cache { u32 hash_shift ; struct flow_cache_percpu *percpu ; struct notifier_block hotcpu_notifier ; int low_watermark ; int high_watermark ; struct timer_list rnd_timer ; }; struct xfrm_policy_hash { struct hlist_head *table ; unsigned int hmask ; u8 dbits4 ; u8 sbits4 ; u8 dbits6 ; u8 sbits6 ; }; struct xfrm_policy_hthresh { struct work_struct work ; seqlock_t lock ; u8 lbits4 ; u8 rbits4 ; u8 lbits6 ; u8 rbits6 ; }; struct netns_xfrm { struct list_head state_all ; struct hlist_head *state_bydst ; struct hlist_head *state_bysrc ; struct hlist_head *state_byspi ; unsigned int state_hmask ; unsigned int state_num ; struct work_struct state_hash_work ; struct hlist_head state_gc_list ; struct work_struct state_gc_work ; struct list_head policy_all ; struct hlist_head *policy_byidx ; unsigned int policy_idx_hmask ; struct hlist_head policy_inexact[3U] ; struct xfrm_policy_hash policy_bydst[3U] ; unsigned int policy_count[6U] ; struct work_struct policy_hash_work ; struct xfrm_policy_hthresh policy_hthresh ; struct sock *nlsk ; struct sock *nlsk_stash ; u32 sysctl_aevent_etime ; u32 sysctl_aevent_rseqth ; int sysctl_larval_drop ; u32 sysctl_acq_expires ; struct ctl_table_header *sysctl_hdr ; struct dst_ops xfrm4_dst_ops ; struct dst_ops xfrm6_dst_ops ; spinlock_t xfrm_state_lock ; rwlock_t xfrm_policy_lock ; struct mutex xfrm_cfg_mutex ; struct flow_cache flow_cache_global ; atomic_t flow_cache_genid ; struct list_head flow_cache_gc_list ; spinlock_t flow_cache_gc_lock ; struct work_struct flow_cache_gc_work ; struct work_struct flow_cache_flush_work ; struct mutex flow_flush_sem ; }; struct mpls_route; struct netns_mpls { size_t platform_labels ; struct mpls_route **platform_label ; struct ctl_table_header *ctl ; }; struct proc_ns_operations; struct ns_common { atomic_long_t stashed ; struct proc_ns_operations const *ops ; unsigned int inum ; }; struct net_generic; struct netns_ipvs; struct net { atomic_t passive ; atomic_t count ; spinlock_t rules_mod_lock ; atomic64_t cookie_gen ; struct list_head list ; struct list_head cleanup_list ; struct list_head exit_list ; struct user_namespace *user_ns ; spinlock_t nsid_lock ; struct idr netns_ids ; struct ns_common ns ; struct proc_dir_entry *proc_net ; struct proc_dir_entry *proc_net_stat ; struct ctl_table_set sysctls ; struct sock *rtnl ; struct sock *genl_sock ; struct list_head dev_base_head ; struct hlist_head *dev_name_head ; struct hlist_head *dev_index_head ; unsigned int dev_base_seq ; int ifindex ; unsigned int dev_unreg_count ; struct list_head rules_ops ; struct net_device *loopback_dev ; struct netns_core core ; struct netns_mib mib ; struct netns_packet packet ; struct netns_unix unx ; struct netns_ipv4 ipv4 ; struct netns_ipv6 ipv6 ; struct netns_ieee802154_lowpan ieee802154_lowpan ; struct netns_sctp sctp ; struct netns_dccp dccp ; struct netns_nf nf ; struct netns_xt xt ; struct netns_ct ct ; struct netns_nftables nft ; struct netns_nf_frag nf_frag ; struct sock *nfnl ; struct sock *nfnl_stash ; struct sk_buff_head wext_nlevents ; struct net_generic *gen ; struct netns_xfrm xfrm ; struct netns_ipvs *ipvs ; struct netns_mpls mpls ; struct sock *diag_nlsk ; atomic_t fnhe_genid ; }; struct __anonstruct_possible_net_t_302 { struct net *net ; }; typedef struct __anonstruct_possible_net_t_302 possible_net_t; typedef unsigned long kernel_ulong_t; struct pci_device_id { __u32 vendor ; __u32 device ; __u32 subvendor ; __u32 subdevice ; __u32 class ; __u32 class_mask ; kernel_ulong_t driver_data ; }; struct acpi_device_id { __u8 id[9U] ; kernel_ulong_t driver_data ; }; struct of_device_id { char name[32U] ; char type[32U] ; char compatible[128U] ; void const *data ; }; enum fwnode_type { FWNODE_INVALID = 0, FWNODE_OF = 1, FWNODE_ACPI = 2, FWNODE_PDATA = 3 } ; struct fwnode_handle { enum fwnode_type type ; struct fwnode_handle *secondary ; }; typedef u32 phandle; struct property { char *name ; int length ; void *value ; struct property *next ; unsigned long _flags ; unsigned int unique_id ; struct bin_attribute attr ; }; struct device_node { char const *name ; char const *type ; phandle phandle ; char const *full_name ; struct fwnode_handle fwnode ; struct property *properties ; struct property *deadprops ; struct device_node *parent ; struct device_node *child ; struct device_node *sibling ; struct kobject kobj ; unsigned long _flags ; void *data ; }; struct mii_ioctl_data { __u16 phy_id ; __u16 reg_num ; __u16 val_in ; __u16 val_out ; }; enum ldv_28040 { PHY_INTERFACE_MODE_NA = 0, PHY_INTERFACE_MODE_MII = 1, PHY_INTERFACE_MODE_GMII = 2, PHY_INTERFACE_MODE_SGMII = 3, PHY_INTERFACE_MODE_TBI = 4, PHY_INTERFACE_MODE_REVMII = 5, PHY_INTERFACE_MODE_RMII = 6, PHY_INTERFACE_MODE_RGMII = 7, PHY_INTERFACE_MODE_RGMII_ID = 8, PHY_INTERFACE_MODE_RGMII_RXID = 9, PHY_INTERFACE_MODE_RGMII_TXID = 10, PHY_INTERFACE_MODE_RTBI = 11, PHY_INTERFACE_MODE_SMII = 12, PHY_INTERFACE_MODE_XGMII = 13, PHY_INTERFACE_MODE_MOCA = 14, PHY_INTERFACE_MODE_QSGMII = 15, PHY_INTERFACE_MODE_MAX = 16 } ; typedef enum ldv_28040 phy_interface_t; enum ldv_28094 { MDIOBUS_ALLOCATED = 1, MDIOBUS_REGISTERED = 2, MDIOBUS_UNREGISTERED = 3, MDIOBUS_RELEASED = 4 } ; struct phy_device; struct mii_bus { char const *name ; char id[17U] ; void *priv ; int (*read)(struct mii_bus * , int , int ) ; int (*write)(struct mii_bus * , int , int , u16 ) ; int (*reset)(struct mii_bus * ) ; struct mutex mdio_lock ; struct device *parent ; enum ldv_28094 state ; struct device dev ; struct phy_device *phy_map[32U] ; u32 phy_mask ; u32 phy_ignore_ta_mask ; int *irq ; }; enum phy_state { PHY_DOWN = 0, PHY_STARTING = 1, PHY_READY = 2, PHY_PENDING = 3, PHY_UP = 4, PHY_AN = 5, PHY_RUNNING = 6, PHY_NOLINK = 7, PHY_FORCING = 8, PHY_CHANGELINK = 9, PHY_HALTED = 10, PHY_RESUMING = 11 } ; struct phy_c45_device_ids { u32 devices_in_package ; u32 device_ids[8U] ; }; struct phy_driver; struct phy_device { struct phy_driver *drv ; struct mii_bus *bus ; struct device dev ; u32 phy_id ; struct phy_c45_device_ids c45_ids ; bool is_c45 ; bool is_internal ; bool has_fixups ; bool suspended ; enum phy_state state ; u32 dev_flags ; phy_interface_t interface ; int addr ; int speed ; int duplex ; int pause ; int asym_pause ; int link ; u32 interrupts ; u32 supported ; u32 advertising ; u32 lp_advertising ; int autoneg ; int link_timeout ; int irq ; void *priv ; struct work_struct phy_queue ; struct delayed_work state_queue ; atomic_t irq_disable ; struct mutex lock ; struct net_device *attached_dev ; void (*adjust_link)(struct net_device * ) ; }; struct phy_driver { u32 phy_id ; char *name ; unsigned int phy_id_mask ; u32 features ; u32 flags ; void const *driver_data ; int (*soft_reset)(struct phy_device * ) ; int (*config_init)(struct phy_device * ) ; int (*probe)(struct phy_device * ) ; int (*suspend)(struct phy_device * ) ; int (*resume)(struct phy_device * ) ; int (*config_aneg)(struct phy_device * ) ; int (*aneg_done)(struct phy_device * ) ; int (*read_status)(struct phy_device * ) ; int (*ack_interrupt)(struct phy_device * ) ; int (*config_intr)(struct phy_device * ) ; int (*did_interrupt)(struct phy_device * ) ; void (*remove)(struct phy_device * ) ; int (*match_phy_device)(struct phy_device * ) ; int (*ts_info)(struct phy_device * , struct ethtool_ts_info * ) ; int (*hwtstamp)(struct phy_device * , struct ifreq * ) ; bool (*rxtstamp)(struct phy_device * , struct sk_buff * , int ) ; void (*txtstamp)(struct phy_device * , struct sk_buff * , int ) ; int (*set_wol)(struct phy_device * , struct ethtool_wolinfo * ) ; void (*get_wol)(struct phy_device * , struct ethtool_wolinfo * ) ; void (*link_change_notify)(struct phy_device * ) ; int (*read_mmd_indirect)(struct phy_device * , int , int , int ) ; void (*write_mmd_indirect)(struct phy_device * , int , int , int , u32 ) ; int (*module_info)(struct phy_device * , struct ethtool_modinfo * ) ; int (*module_eeprom)(struct phy_device * , struct ethtool_eeprom * , u8 * ) ; struct device_driver driver ; }; struct fixed_phy_status { int link ; int speed ; int duplex ; int pause ; int asym_pause ; }; enum dsa_tag_protocol { DSA_TAG_PROTO_NONE = 0, DSA_TAG_PROTO_DSA = 1, DSA_TAG_PROTO_TRAILER = 2, DSA_TAG_PROTO_EDSA = 3, DSA_TAG_PROTO_BRCM = 4 } ; struct dsa_chip_data { struct device *host_dev ; int sw_addr ; int eeprom_len ; struct device_node *of_node ; char *port_names[12U] ; struct device_node *port_dn[12U] ; s8 *rtable ; }; struct dsa_platform_data { struct device *netdev ; struct net_device *of_netdev ; int nr_chips ; struct dsa_chip_data *chip ; }; struct packet_type; struct dsa_switch; struct dsa_switch_tree { struct dsa_platform_data *pd ; struct net_device *master_netdev ; int (*rcv)(struct sk_buff * , struct net_device * , struct packet_type * , struct net_device * ) ; enum dsa_tag_protocol tag_protocol ; s8 cpu_switch ; s8 cpu_port ; int link_poll_needed ; struct work_struct link_poll_work ; struct timer_list link_poll_timer ; struct dsa_switch *ds[4U] ; }; struct dsa_switch_driver; struct dsa_switch { struct dsa_switch_tree *dst ; int index ; enum dsa_tag_protocol tag_protocol ; struct dsa_chip_data *pd ; struct dsa_switch_driver *drv ; struct device *master_dev ; char hwmon_name[24U] ; struct device *hwmon_dev ; u32 dsa_port_mask ; u32 phys_port_mask ; u32 phys_mii_mask ; struct mii_bus *slave_mii_bus ; struct net_device *ports[12U] ; }; struct dsa_switch_driver { struct list_head list ; enum dsa_tag_protocol tag_protocol ; int priv_size ; char *(*probe)(struct device * , int ) ; int (*setup)(struct dsa_switch * ) ; int (*set_addr)(struct dsa_switch * , u8 * ) ; u32 (*get_phy_flags)(struct dsa_switch * , int ) ; int (*phy_read)(struct dsa_switch * , int , int ) ; int (*phy_write)(struct dsa_switch * , int , int , u16 ) ; void (*poll_link)(struct dsa_switch * ) ; void (*adjust_link)(struct dsa_switch * , int , struct phy_device * ) ; void (*fixed_link_update)(struct dsa_switch * , int , struct fixed_phy_status * ) ; void (*get_strings)(struct dsa_switch * , int , uint8_t * ) ; void (*get_ethtool_stats)(struct dsa_switch * , int , uint64_t * ) ; int (*get_sset_count)(struct dsa_switch * ) ; void (*get_wol)(struct dsa_switch * , int , struct ethtool_wolinfo * ) ; int (*set_wol)(struct dsa_switch * , int , struct ethtool_wolinfo * ) ; int (*suspend)(struct dsa_switch * ) ; int (*resume)(struct dsa_switch * ) ; int (*port_enable)(struct dsa_switch * , int , struct phy_device * ) ; void (*port_disable)(struct dsa_switch * , int , struct phy_device * ) ; int (*set_eee)(struct dsa_switch * , int , struct phy_device * , struct ethtool_eee * ) ; int (*get_eee)(struct dsa_switch * , int , struct ethtool_eee * ) ; int (*get_temp)(struct dsa_switch * , int * ) ; int (*get_temp_limit)(struct dsa_switch * , int * ) ; int (*set_temp_limit)(struct dsa_switch * , int ) ; int (*get_temp_alarm)(struct dsa_switch * , bool * ) ; int (*get_eeprom_len)(struct dsa_switch * ) ; int (*get_eeprom)(struct dsa_switch * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct dsa_switch * , struct ethtool_eeprom * , u8 * ) ; int (*get_regs_len)(struct dsa_switch * , int ) ; void (*get_regs)(struct dsa_switch * , int , struct ethtool_regs * , void * ) ; int (*port_join_bridge)(struct dsa_switch * , int , u32 ) ; int (*port_leave_bridge)(struct dsa_switch * , int , u32 ) ; int (*port_stp_update)(struct dsa_switch * , int , u8 ) ; int (*fdb_add)(struct dsa_switch * , int , unsigned char const * , u16 ) ; int (*fdb_del)(struct dsa_switch * , int , unsigned char const * , u16 ) ; int (*fdb_getnext)(struct dsa_switch * , int , unsigned char * , bool * ) ; }; struct ieee_ets { __u8 willing ; __u8 ets_cap ; __u8 cbs ; __u8 tc_tx_bw[8U] ; __u8 tc_rx_bw[8U] ; __u8 tc_tsa[8U] ; __u8 prio_tc[8U] ; __u8 tc_reco_bw[8U] ; __u8 tc_reco_tsa[8U] ; __u8 reco_prio_tc[8U] ; }; struct ieee_maxrate { __u64 tc_maxrate[8U] ; }; struct ieee_qcn { __u8 rpg_enable[8U] ; __u32 rppp_max_rps[8U] ; __u32 rpg_time_reset[8U] ; __u32 rpg_byte_reset[8U] ; __u32 rpg_threshold[8U] ; __u32 rpg_max_rate[8U] ; __u32 rpg_ai_rate[8U] ; __u32 rpg_hai_rate[8U] ; __u32 rpg_gd[8U] ; __u32 rpg_min_dec_fac[8U] ; __u32 rpg_min_rate[8U] ; __u32 cndd_state_machine[8U] ; }; struct ieee_qcn_stats { __u64 rppp_rp_centiseconds[8U] ; __u32 rppp_created_rps[8U] ; }; struct ieee_pfc { __u8 pfc_cap ; __u8 pfc_en ; __u8 mbc ; __u16 delay ; __u64 requests[8U] ; __u64 indications[8U] ; }; struct cee_pg { __u8 willing ; __u8 error ; __u8 pg_en ; __u8 tcs_supported ; __u8 pg_bw[8U] ; __u8 prio_pg[8U] ; }; struct cee_pfc { __u8 willing ; __u8 error ; __u8 pfc_en ; __u8 tcs_supported ; }; struct dcb_app { __u8 selector ; __u8 priority ; __u16 protocol ; }; struct dcb_peer_app_info { __u8 willing ; __u8 error ; }; struct dcbnl_rtnl_ops { int (*ieee_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_setets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_getmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_setmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_getqcn)(struct net_device * , struct ieee_qcn * ) ; int (*ieee_setqcn)(struct net_device * , struct ieee_qcn * ) ; int (*ieee_getqcnstats)(struct net_device * , struct ieee_qcn_stats * ) ; int (*ieee_getpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_setpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_getapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_setapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_delapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_peer_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_peer_getpfc)(struct net_device * , struct ieee_pfc * ) ; u8 (*getstate)(struct net_device * ) ; u8 (*setstate)(struct net_device * , u8 ) ; void (*getpermhwaddr)(struct net_device * , u8 * ) ; void (*setpgtccfgtx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgtx)(struct net_device * , int , u8 ) ; void (*setpgtccfgrx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgrx)(struct net_device * , int , u8 ) ; void (*getpgtccfgtx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgtx)(struct net_device * , int , u8 * ) ; void (*getpgtccfgrx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgrx)(struct net_device * , int , u8 * ) ; void (*setpfccfg)(struct net_device * , int , u8 ) ; void (*getpfccfg)(struct net_device * , int , u8 * ) ; u8 (*setall)(struct net_device * ) ; u8 (*getcap)(struct net_device * , int , u8 * ) ; int (*getnumtcs)(struct net_device * , int , u8 * ) ; int (*setnumtcs)(struct net_device * , int , u8 ) ; u8 (*getpfcstate)(struct net_device * ) ; void (*setpfcstate)(struct net_device * , u8 ) ; void (*getbcncfg)(struct net_device * , int , u32 * ) ; void (*setbcncfg)(struct net_device * , int , u32 ) ; void (*getbcnrp)(struct net_device * , int , u8 * ) ; void (*setbcnrp)(struct net_device * , int , u8 ) ; int (*setapp)(struct net_device * , u8 , u16 , u8 ) ; int (*getapp)(struct net_device * , u8 , u16 ) ; u8 (*getfeatcfg)(struct net_device * , int , u8 * ) ; u8 (*setfeatcfg)(struct net_device * , int , u8 ) ; u8 (*getdcbx)(struct net_device * ) ; u8 (*setdcbx)(struct net_device * , u8 ) ; int (*peer_getappinfo)(struct net_device * , struct dcb_peer_app_info * , u16 * ) ; int (*peer_getapptable)(struct net_device * , struct dcb_app * ) ; int (*cee_peer_getpg)(struct net_device * , struct cee_pg * ) ; int (*cee_peer_getpfc)(struct net_device * , struct cee_pfc * ) ; }; struct taskstats { __u16 version ; __u32 ac_exitcode ; __u8 ac_flag ; __u8 ac_nice ; __u64 cpu_count ; __u64 cpu_delay_total ; __u64 blkio_count ; __u64 blkio_delay_total ; __u64 swapin_count ; __u64 swapin_delay_total ; __u64 cpu_run_real_total ; __u64 cpu_run_virtual_total ; char ac_comm[32U] ; __u8 ac_sched ; __u8 ac_pad[3U] ; __u32 ac_uid ; __u32 ac_gid ; __u32 ac_pid ; __u32 ac_ppid ; __u32 ac_btime ; __u64 ac_etime ; __u64 ac_utime ; __u64 ac_stime ; __u64 ac_minflt ; __u64 ac_majflt ; __u64 coremem ; __u64 virtmem ; __u64 hiwater_rss ; __u64 hiwater_vm ; __u64 read_char ; __u64 write_char ; __u64 read_syscalls ; __u64 write_syscalls ; __u64 read_bytes ; __u64 write_bytes ; __u64 cancelled_write_bytes ; __u64 nvcsw ; __u64 nivcsw ; __u64 ac_utimescaled ; __u64 ac_stimescaled ; __u64 cpu_scaled_run_real_total ; __u64 freepages_count ; __u64 freepages_delay_total ; }; struct netprio_map { struct callback_head rcu ; u32 priomap_len ; u32 priomap[] ; }; struct xfrm_policy; struct xfrm_state; struct request_sock; struct mnt_namespace; struct ipc_namespace; struct nsproxy { atomic_t count ; struct uts_namespace *uts_ns ; struct ipc_namespace *ipc_ns ; struct mnt_namespace *mnt_ns ; struct pid_namespace *pid_ns_for_children ; struct net *net_ns ; }; struct nlmsghdr { __u32 nlmsg_len ; __u16 nlmsg_type ; __u16 nlmsg_flags ; __u32 nlmsg_seq ; __u32 nlmsg_pid ; }; struct nlattr { __u16 nla_len ; __u16 nla_type ; }; struct netlink_callback { struct sk_buff *skb ; struct nlmsghdr const *nlh ; int (*dump)(struct sk_buff * , struct netlink_callback * ) ; int (*done)(struct netlink_callback * ) ; void *data ; struct module *module ; u16 family ; u16 min_dump_alloc ; unsigned int prev_seq ; unsigned int seq ; long args[6U] ; }; struct ndmsg { __u8 ndm_family ; __u8 ndm_pad1 ; __u16 ndm_pad2 ; __s32 ndm_ifindex ; __u16 ndm_state ; __u8 ndm_flags ; __u8 ndm_type ; }; struct rtnl_link_stats64 { __u64 rx_packets ; __u64 tx_packets ; __u64 rx_bytes ; __u64 tx_bytes ; __u64 rx_errors ; __u64 tx_errors ; __u64 rx_dropped ; __u64 tx_dropped ; __u64 multicast ; __u64 collisions ; __u64 rx_length_errors ; __u64 rx_over_errors ; __u64 rx_crc_errors ; __u64 rx_frame_errors ; __u64 rx_fifo_errors ; __u64 rx_missed_errors ; __u64 tx_aborted_errors ; __u64 tx_carrier_errors ; __u64 tx_fifo_errors ; __u64 tx_heartbeat_errors ; __u64 tx_window_errors ; __u64 rx_compressed ; __u64 tx_compressed ; }; struct ifla_vf_stats { __u64 rx_packets ; __u64 tx_packets ; __u64 rx_bytes ; __u64 tx_bytes ; __u64 broadcast ; __u64 multicast ; }; struct ifla_vf_info { __u32 vf ; __u8 mac[32U] ; __u32 vlan ; __u32 qos ; __u32 spoofchk ; __u32 linkstate ; __u32 min_tx_rate ; __u32 max_tx_rate ; __u32 rss_query_en ; }; struct netpoll_info; struct wireless_dev; struct wpan_dev; struct mpls_dev; enum netdev_tx { __NETDEV_TX_MIN = (-0x7FFFFFFF-1), NETDEV_TX_OK = 0, NETDEV_TX_BUSY = 16, NETDEV_TX_LOCKED = 32 } ; typedef enum netdev_tx netdev_tx_t; struct net_device_stats { unsigned long rx_packets ; unsigned long tx_packets ; unsigned long rx_bytes ; unsigned long tx_bytes ; unsigned long rx_errors ; unsigned long tx_errors ; unsigned long rx_dropped ; unsigned long tx_dropped ; unsigned long multicast ; unsigned long collisions ; unsigned long rx_length_errors ; unsigned long rx_over_errors ; unsigned long rx_crc_errors ; unsigned long rx_frame_errors ; unsigned long rx_fifo_errors ; unsigned long rx_missed_errors ; unsigned long tx_aborted_errors ; unsigned long tx_carrier_errors ; unsigned long tx_fifo_errors ; unsigned long tx_heartbeat_errors ; unsigned long tx_window_errors ; unsigned long rx_compressed ; unsigned long tx_compressed ; }; struct neigh_parms; struct netdev_hw_addr { struct list_head list ; unsigned char addr[32U] ; unsigned char type ; bool global_use ; int sync_cnt ; int refcount ; int synced ; struct callback_head callback_head ; }; struct netdev_hw_addr_list { struct list_head list ; int count ; }; struct hh_cache { u16 hh_len ; u16 __pad ; seqlock_t hh_lock ; unsigned long hh_data[16U] ; }; struct header_ops { int (*create)(struct sk_buff * , struct net_device * , unsigned short , void const * , void const * , unsigned int ) ; int (*parse)(struct sk_buff const * , unsigned char * ) ; int (*cache)(struct neighbour const * , struct hh_cache * , __be16 ) ; void (*cache_update)(struct hh_cache * , struct net_device const * , unsigned char const * ) ; }; struct napi_struct { struct list_head poll_list ; unsigned long state ; int weight ; unsigned int gro_count ; int (*poll)(struct napi_struct * , int ) ; spinlock_t poll_lock ; int poll_owner ; struct net_device *dev ; struct sk_buff *gro_list ; struct sk_buff *skb ; struct hrtimer timer ; struct list_head dev_list ; struct hlist_node napi_hash_node ; unsigned int napi_id ; }; enum rx_handler_result { RX_HANDLER_CONSUMED = 0, RX_HANDLER_ANOTHER = 1, RX_HANDLER_EXACT = 2, RX_HANDLER_PASS = 3 } ; typedef enum rx_handler_result rx_handler_result_t; typedef rx_handler_result_t rx_handler_func_t(struct sk_buff ** ); struct Qdisc; struct netdev_queue { struct net_device *dev ; struct Qdisc *qdisc ; struct Qdisc *qdisc_sleeping ; struct kobject kobj ; int numa_node ; spinlock_t _xmit_lock ; int xmit_lock_owner ; unsigned long trans_start ; unsigned long trans_timeout ; unsigned long state ; struct dql dql ; unsigned long tx_maxrate ; }; struct rps_map { unsigned int len ; struct callback_head rcu ; u16 cpus[0U] ; }; struct rps_dev_flow { u16 cpu ; u16 filter ; unsigned int last_qtail ; }; struct rps_dev_flow_table { unsigned int mask ; struct callback_head rcu ; struct rps_dev_flow flows[0U] ; }; struct netdev_rx_queue { struct rps_map *rps_map ; struct rps_dev_flow_table *rps_flow_table ; struct kobject kobj ; struct net_device *dev ; }; struct xps_map { unsigned int len ; unsigned int alloc_len ; struct callback_head rcu ; u16 queues[0U] ; }; struct xps_dev_maps { struct callback_head rcu ; struct xps_map *cpu_map[0U] ; }; struct netdev_tc_txq { u16 count ; u16 offset ; }; struct netdev_fcoe_hbainfo { char manufacturer[64U] ; char serial_number[64U] ; char hardware_version[64U] ; char driver_version[64U] ; char optionrom_version[64U] ; char firmware_version[64U] ; char model[256U] ; char model_description[256U] ; }; struct netdev_phys_item_id { unsigned char id[32U] ; unsigned char id_len ; }; struct net_device_ops { int (*ndo_init)(struct net_device * ) ; void (*ndo_uninit)(struct net_device * ) ; int (*ndo_open)(struct net_device * ) ; int (*ndo_stop)(struct net_device * ) ; netdev_tx_t (*ndo_start_xmit)(struct sk_buff * , struct net_device * ) ; u16 (*ndo_select_queue)(struct net_device * , struct sk_buff * , void * , u16 (*)(struct net_device * , struct sk_buff * ) ) ; void (*ndo_change_rx_flags)(struct net_device * , int ) ; void (*ndo_set_rx_mode)(struct net_device * ) ; int (*ndo_set_mac_address)(struct net_device * , void * ) ; int (*ndo_validate_addr)(struct net_device * ) ; int (*ndo_do_ioctl)(struct net_device * , struct ifreq * , int ) ; int (*ndo_set_config)(struct net_device * , struct ifmap * ) ; int (*ndo_change_mtu)(struct net_device * , int ) ; int (*ndo_neigh_setup)(struct net_device * , struct neigh_parms * ) ; void (*ndo_tx_timeout)(struct net_device * ) ; struct rtnl_link_stats64 *(*ndo_get_stats64)(struct net_device * , struct rtnl_link_stats64 * ) ; struct net_device_stats *(*ndo_get_stats)(struct net_device * ) ; int (*ndo_vlan_rx_add_vid)(struct net_device * , __be16 , u16 ) ; int (*ndo_vlan_rx_kill_vid)(struct net_device * , __be16 , u16 ) ; void (*ndo_poll_controller)(struct net_device * ) ; int (*ndo_netpoll_setup)(struct net_device * , struct netpoll_info * ) ; void (*ndo_netpoll_cleanup)(struct net_device * ) ; int (*ndo_busy_poll)(struct napi_struct * ) ; int (*ndo_set_vf_mac)(struct net_device * , int , u8 * ) ; int (*ndo_set_vf_vlan)(struct net_device * , int , u16 , u8 ) ; int (*ndo_set_vf_rate)(struct net_device * , int , int , int ) ; int (*ndo_set_vf_spoofchk)(struct net_device * , int , bool ) ; int (*ndo_get_vf_config)(struct net_device * , int , struct ifla_vf_info * ) ; int (*ndo_set_vf_link_state)(struct net_device * , int , int ) ; int (*ndo_get_vf_stats)(struct net_device * , int , struct ifla_vf_stats * ) ; int (*ndo_set_vf_port)(struct net_device * , int , struct nlattr ** ) ; int (*ndo_get_vf_port)(struct net_device * , int , struct sk_buff * ) ; int (*ndo_set_vf_rss_query_en)(struct net_device * , int , bool ) ; int (*ndo_setup_tc)(struct net_device * , u8 ) ; int (*ndo_fcoe_enable)(struct net_device * ) ; int (*ndo_fcoe_disable)(struct net_device * ) ; int (*ndo_fcoe_ddp_setup)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_ddp_done)(struct net_device * , u16 ) ; int (*ndo_fcoe_ddp_target)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_get_hbainfo)(struct net_device * , struct netdev_fcoe_hbainfo * ) ; int (*ndo_fcoe_get_wwn)(struct net_device * , u64 * , int ) ; int (*ndo_rx_flow_steer)(struct net_device * , struct sk_buff const * , u16 , u32 ) ; int (*ndo_add_slave)(struct net_device * , struct net_device * ) ; int (*ndo_del_slave)(struct net_device * , struct net_device * ) ; netdev_features_t (*ndo_fix_features)(struct net_device * , netdev_features_t ) ; int (*ndo_set_features)(struct net_device * , netdev_features_t ) ; int (*ndo_neigh_construct)(struct neighbour * ) ; void (*ndo_neigh_destroy)(struct neighbour * ) ; int (*ndo_fdb_add)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * , u16 , u16 ) ; int (*ndo_fdb_del)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * , u16 ) ; int (*ndo_fdb_dump)(struct sk_buff * , struct netlink_callback * , struct net_device * , struct net_device * , int ) ; int (*ndo_bridge_setlink)(struct net_device * , struct nlmsghdr * , u16 ) ; int (*ndo_bridge_getlink)(struct sk_buff * , u32 , u32 , struct net_device * , u32 , int ) ; int (*ndo_bridge_dellink)(struct net_device * , struct nlmsghdr * , u16 ) ; int (*ndo_change_carrier)(struct net_device * , bool ) ; int (*ndo_get_phys_port_id)(struct net_device * , struct netdev_phys_item_id * ) ; int (*ndo_get_phys_port_name)(struct net_device * , char * , size_t ) ; void (*ndo_add_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void (*ndo_del_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void *(*ndo_dfwd_add_station)(struct net_device * , struct net_device * ) ; void (*ndo_dfwd_del_station)(struct net_device * , void * ) ; netdev_tx_t (*ndo_dfwd_start_xmit)(struct sk_buff * , struct net_device * , void * ) ; int (*ndo_get_lock_subclass)(struct net_device * ) ; netdev_features_t (*ndo_features_check)(struct sk_buff * , struct net_device * , netdev_features_t ) ; int (*ndo_set_tx_maxrate)(struct net_device * , int , u32 ) ; int (*ndo_get_iflink)(struct net_device const * ) ; }; struct __anonstruct_adj_list_315 { struct list_head upper ; struct list_head lower ; }; struct __anonstruct_all_adj_list_316 { struct list_head upper ; struct list_head lower ; }; struct iw_handler_def; struct iw_public_data; struct switchdev_ops; struct vlan_info; struct tipc_bearer; struct in_device; struct dn_dev; struct inet6_dev; struct tcf_proto; struct cpu_rmap; struct pcpu_lstats; struct pcpu_sw_netstats; struct pcpu_dstats; struct pcpu_vstats; union __anonunion____missing_field_name_317 { void *ml_priv ; struct pcpu_lstats *lstats ; struct pcpu_sw_netstats *tstats ; struct pcpu_dstats *dstats ; struct pcpu_vstats *vstats ; }; struct garp_port; struct mrp_port; struct rtnl_link_ops; struct net_device { char name[16U] ; struct hlist_node name_hlist ; char *ifalias ; unsigned long mem_end ; unsigned long mem_start ; unsigned long base_addr ; int irq ; atomic_t carrier_changes ; unsigned long state ; struct list_head dev_list ; struct list_head napi_list ; struct list_head unreg_list ; struct list_head close_list ; struct list_head ptype_all ; struct list_head ptype_specific ; struct __anonstruct_adj_list_315 adj_list ; struct __anonstruct_all_adj_list_316 all_adj_list ; netdev_features_t features ; netdev_features_t hw_features ; netdev_features_t wanted_features ; netdev_features_t vlan_features ; netdev_features_t hw_enc_features ; netdev_features_t mpls_features ; int ifindex ; int group ; struct net_device_stats stats ; atomic_long_t rx_dropped ; atomic_long_t tx_dropped ; struct iw_handler_def const *wireless_handlers ; struct iw_public_data *wireless_data ; struct net_device_ops const *netdev_ops ; struct ethtool_ops const *ethtool_ops ; struct switchdev_ops const *switchdev_ops ; struct header_ops const *header_ops ; unsigned int flags ; unsigned int priv_flags ; unsigned short gflags ; unsigned short padded ; unsigned char operstate ; unsigned char link_mode ; unsigned char if_port ; unsigned char dma ; unsigned int mtu ; unsigned short type ; unsigned short hard_header_len ; unsigned short needed_headroom ; unsigned short needed_tailroom ; unsigned char perm_addr[32U] ; unsigned char addr_assign_type ; unsigned char addr_len ; unsigned short neigh_priv_len ; unsigned short dev_id ; unsigned short dev_port ; spinlock_t addr_list_lock ; unsigned char name_assign_type ; bool uc_promisc ; struct netdev_hw_addr_list uc ; struct netdev_hw_addr_list mc ; struct netdev_hw_addr_list dev_addrs ; struct kset *queues_kset ; unsigned int promiscuity ; unsigned int allmulti ; struct vlan_info *vlan_info ; struct dsa_switch_tree *dsa_ptr ; struct tipc_bearer *tipc_ptr ; void *atalk_ptr ; struct in_device *ip_ptr ; struct dn_dev *dn_ptr ; struct inet6_dev *ip6_ptr ; void *ax25_ptr ; struct wireless_dev *ieee80211_ptr ; struct wpan_dev *ieee802154_ptr ; struct mpls_dev *mpls_ptr ; unsigned long last_rx ; unsigned char *dev_addr ; struct netdev_rx_queue *_rx ; unsigned int num_rx_queues ; unsigned int real_num_rx_queues ; unsigned long gro_flush_timeout ; rx_handler_func_t *rx_handler ; void *rx_handler_data ; struct tcf_proto *ingress_cl_list ; struct netdev_queue *ingress_queue ; struct list_head nf_hooks_ingress ; unsigned char broadcast[32U] ; struct cpu_rmap *rx_cpu_rmap ; struct hlist_node index_hlist ; struct netdev_queue *_tx ; unsigned int num_tx_queues ; unsigned int real_num_tx_queues ; struct Qdisc *qdisc ; unsigned long tx_queue_len ; spinlock_t tx_global_lock ; int watchdog_timeo ; struct xps_dev_maps *xps_maps ; unsigned long trans_start ; struct timer_list watchdog_timer ; int *pcpu_refcnt ; struct list_head todo_list ; struct list_head link_watch_list ; unsigned char reg_state ; bool dismantle ; unsigned short rtnl_link_state ; void (*destructor)(struct net_device * ) ; struct netpoll_info *npinfo ; possible_net_t nd_net ; union __anonunion____missing_field_name_317 __annonCompField94 ; struct garp_port *garp_port ; struct mrp_port *mrp_port ; struct device dev ; struct attribute_group const *sysfs_groups[4U] ; struct attribute_group const *sysfs_rx_queue_group ; struct rtnl_link_ops const *rtnl_link_ops ; unsigned int gso_max_size ; u16 gso_max_segs ; u16 gso_min_segs ; struct dcbnl_rtnl_ops const *dcbnl_ops ; u8 num_tc ; struct netdev_tc_txq tc_to_txq[16U] ; u8 prio_tc_map[16U] ; unsigned int fcoe_ddp_xid ; struct netprio_map *priomap ; struct phy_device *phydev ; struct lock_class_key *qdisc_tx_busylock ; }; struct packet_type { __be16 type ; struct net_device *dev ; int (*func)(struct sk_buff * , struct net_device * , struct packet_type * , struct net_device * ) ; bool (*id_match)(struct packet_type * , struct sock * ) ; void *af_packet_priv ; struct list_head list ; }; struct pcpu_sw_netstats { u64 rx_packets ; u64 rx_bytes ; u64 tx_packets ; u64 tx_bytes ; struct u64_stats_sync syncp ; }; struct firmware { size_t size ; u8 const *data ; struct page **pages ; void *priv ; }; struct vlan_ethhdr { unsigned char h_dest[6U] ; unsigned char h_source[6U] ; __be16 h_vlan_proto ; __be16 h_vlan_TCI ; __be16 h_vlan_encapsulated_proto ; }; struct netpoll; struct hotplug_slot; struct pci_slot { struct pci_bus *bus ; struct list_head list ; struct hotplug_slot *hotplug ; unsigned char number ; struct kobject kobj ; }; typedef int pci_power_t; typedef unsigned int pci_channel_state_t; enum pci_channel_state { pci_channel_io_normal = 1, pci_channel_io_frozen = 2, pci_channel_io_perm_failure = 3 } ; typedef unsigned short pci_dev_flags_t; typedef unsigned short pci_bus_flags_t; struct pcie_link_state; struct pci_vpd; struct pci_sriov; struct pci_ats; struct pci_driver; union __anonunion____missing_field_name_330 { struct pci_sriov *sriov ; struct pci_dev *physfn ; }; struct pci_dev { struct list_head bus_list ; struct pci_bus *bus ; struct pci_bus *subordinate ; void *sysdata ; struct proc_dir_entry *procent ; struct pci_slot *slot ; unsigned int devfn ; unsigned short vendor ; unsigned short device ; unsigned short subsystem_vendor ; unsigned short subsystem_device ; unsigned int class ; u8 revision ; u8 hdr_type ; u8 pcie_cap ; u8 msi_cap ; u8 msix_cap ; unsigned char pcie_mpss : 3 ; u8 rom_base_reg ; u8 pin ; u16 pcie_flags_reg ; u8 dma_alias_devfn ; struct pci_driver *driver ; u64 dma_mask ; struct device_dma_parameters dma_parms ; pci_power_t current_state ; u8 pm_cap ; unsigned char pme_support : 5 ; unsigned char pme_interrupt : 1 ; unsigned char pme_poll : 1 ; unsigned char d1_support : 1 ; unsigned char d2_support : 1 ; unsigned char no_d1d2 : 1 ; unsigned char no_d3cold : 1 ; unsigned char d3cold_allowed : 1 ; unsigned char mmio_always_on : 1 ; unsigned char wakeup_prepared : 1 ; unsigned char runtime_d3cold : 1 ; unsigned char ignore_hotplug : 1 ; unsigned int d3_delay ; unsigned int d3cold_delay ; struct pcie_link_state *link_state ; pci_channel_state_t error_state ; struct device dev ; int cfg_size ; unsigned int irq ; struct resource resource[17U] ; bool match_driver ; unsigned char transparent : 1 ; unsigned char multifunction : 1 ; unsigned char is_added : 1 ; unsigned char is_busmaster : 1 ; unsigned char no_msi : 1 ; unsigned char no_64bit_msi : 1 ; unsigned char block_cfg_access : 1 ; unsigned char broken_parity_status : 1 ; unsigned char irq_reroute_variant : 2 ; unsigned char msi_enabled : 1 ; unsigned char msix_enabled : 1 ; unsigned char ari_enabled : 1 ; unsigned char is_managed : 1 ; unsigned char needs_freset : 1 ; unsigned char state_saved : 1 ; unsigned char is_physfn : 1 ; unsigned char is_virtfn : 1 ; unsigned char reset_fn : 1 ; unsigned char is_hotplug_bridge : 1 ; unsigned char __aer_firmware_first_valid : 1 ; unsigned char __aer_firmware_first : 1 ; unsigned char broken_intx_masking : 1 ; unsigned char io_window_1k : 1 ; unsigned char irq_managed : 1 ; unsigned char has_secondary_link : 1 ; pci_dev_flags_t dev_flags ; atomic_t enable_cnt ; u32 saved_config_space[16U] ; struct hlist_head saved_cap_space ; struct bin_attribute *rom_attr ; int rom_attr_enabled ; struct bin_attribute *res_attr[17U] ; struct bin_attribute *res_attr_wc[17U] ; struct list_head msi_list ; struct attribute_group const **msi_irq_groups ; struct pci_vpd *vpd ; union __anonunion____missing_field_name_330 __annonCompField95 ; struct pci_ats *ats ; phys_addr_t rom ; size_t romlen ; char *driver_override ; }; struct pci_ops; struct msi_controller; struct pci_bus { struct list_head node ; struct pci_bus *parent ; struct list_head children ; struct list_head devices ; struct pci_dev *self ; struct list_head slots ; struct resource *resource[4U] ; struct list_head resources ; struct resource busn_res ; struct pci_ops *ops ; struct msi_controller *msi ; void *sysdata ; struct proc_dir_entry *procdir ; unsigned char number ; unsigned char primary ; unsigned char max_bus_speed ; unsigned char cur_bus_speed ; char name[48U] ; unsigned short bridge_ctl ; pci_bus_flags_t bus_flags ; struct device *bridge ; struct device dev ; struct bin_attribute *legacy_io ; struct bin_attribute *legacy_mem ; unsigned char is_added : 1 ; }; struct pci_ops { void *(*map_bus)(struct pci_bus * , unsigned int , int ) ; int (*read)(struct pci_bus * , unsigned int , int , int , u32 * ) ; int (*write)(struct pci_bus * , unsigned int , int , int , u32 ) ; }; struct pci_dynids { spinlock_t lock ; struct list_head list ; }; typedef unsigned int pci_ers_result_t; struct pci_error_handlers { pci_ers_result_t (*error_detected)(struct pci_dev * , enum pci_channel_state ) ; pci_ers_result_t (*mmio_enabled)(struct pci_dev * ) ; pci_ers_result_t (*link_reset)(struct pci_dev * ) ; pci_ers_result_t (*slot_reset)(struct pci_dev * ) ; void (*reset_notify)(struct pci_dev * , bool ) ; void (*resume)(struct pci_dev * ) ; }; struct pci_driver { struct list_head node ; char const *name ; struct pci_device_id const *id_table ; int (*probe)(struct pci_dev * , struct pci_device_id const * ) ; void (*remove)(struct pci_dev * ) ; int (*suspend)(struct pci_dev * , pm_message_t ) ; int (*suspend_late)(struct pci_dev * , pm_message_t ) ; int (*resume_early)(struct pci_dev * ) ; int (*resume)(struct pci_dev * ) ; void (*shutdown)(struct pci_dev * ) ; int (*sriov_configure)(struct pci_dev * , int ) ; struct pci_error_handlers const *err_handler ; struct device_driver driver ; struct pci_dynids dynids ; }; struct msix_entry { u32 vector ; u16 entry ; }; struct nla_policy { u16 type ; u16 len ; }; struct rtnl_link_ops { struct list_head list ; char const *kind ; size_t priv_size ; void (*setup)(struct net_device * ) ; int maxtype ; struct nla_policy const *policy ; int (*validate)(struct nlattr ** , struct nlattr ** ) ; int (*newlink)(struct net * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; int (*changelink)(struct net_device * , struct nlattr ** , struct nlattr ** ) ; void (*dellink)(struct net_device * , struct list_head * ) ; size_t (*get_size)(struct net_device const * ) ; int (*fill_info)(struct sk_buff * , struct net_device const * ) ; size_t (*get_xstats_size)(struct net_device const * ) ; int (*fill_xstats)(struct sk_buff * , struct net_device const * ) ; unsigned int (*get_num_tx_queues)(void) ; unsigned int (*get_num_rx_queues)(void) ; int slave_maxtype ; struct nla_policy const *slave_policy ; int (*slave_validate)(struct nlattr ** , struct nlattr ** ) ; int (*slave_changelink)(struct net_device * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; size_t (*get_slave_size)(struct net_device const * , struct net_device const * ) ; int (*fill_slave_info)(struct sk_buff * , struct net_device const * , struct net_device const * ) ; struct net *(*get_link_net)(struct net_device const * ) ; }; struct neigh_table; struct neigh_parms { possible_net_t net ; struct net_device *dev ; struct list_head list ; int (*neigh_setup)(struct neighbour * ) ; void (*neigh_cleanup)(struct neighbour * ) ; struct neigh_table *tbl ; void *sysctl_table ; int dead ; atomic_t refcnt ; struct callback_head callback_head ; int reachable_time ; int data[13U] ; unsigned long data_state[1U] ; }; struct neigh_statistics { unsigned long allocs ; unsigned long destroys ; unsigned long hash_grows ; unsigned long res_failed ; unsigned long lookups ; unsigned long hits ; unsigned long rcv_probes_mcast ; unsigned long rcv_probes_ucast ; unsigned long periodic_gc_runs ; unsigned long forced_gc_runs ; unsigned long unres_discards ; }; struct neigh_ops; struct neighbour { struct neighbour *next ; struct neigh_table *tbl ; struct neigh_parms *parms ; unsigned long confirmed ; unsigned long updated ; rwlock_t lock ; atomic_t refcnt ; struct sk_buff_head arp_queue ; unsigned int arp_queue_len_bytes ; struct timer_list timer ; unsigned long used ; atomic_t probes ; __u8 flags ; __u8 nud_state ; __u8 type ; __u8 dead ; seqlock_t ha_lock ; unsigned char ha[32U] ; struct hh_cache hh ; int (*output)(struct neighbour * , struct sk_buff * ) ; struct neigh_ops const *ops ; struct callback_head rcu ; struct net_device *dev ; u8 primary_key[0U] ; }; struct neigh_ops { int family ; void (*solicit)(struct neighbour * , struct sk_buff * ) ; void (*error_report)(struct neighbour * , struct sk_buff * ) ; int (*output)(struct neighbour * , struct sk_buff * ) ; int (*connected_output)(struct neighbour * , struct sk_buff * ) ; }; struct pneigh_entry { struct pneigh_entry *next ; possible_net_t net ; struct net_device *dev ; u8 flags ; u8 key[0U] ; }; struct neigh_hash_table { struct neighbour **hash_buckets ; unsigned int hash_shift ; __u32 hash_rnd[4U] ; struct callback_head rcu ; }; struct neigh_table { int family ; int entry_size ; int key_len ; __be16 protocol ; __u32 (*hash)(void const * , struct net_device const * , __u32 * ) ; bool (*key_eq)(struct neighbour const * , void const * ) ; int (*constructor)(struct neighbour * ) ; int (*pconstructor)(struct pneigh_entry * ) ; void (*pdestructor)(struct pneigh_entry * ) ; void (*proxy_redo)(struct sk_buff * ) ; char *id ; struct neigh_parms parms ; struct list_head parms_list ; int gc_interval ; int gc_thresh1 ; int gc_thresh2 ; int gc_thresh3 ; unsigned long last_flush ; struct delayed_work gc_work ; struct timer_list proxy_timer ; struct sk_buff_head proxy_queue ; atomic_t entries ; rwlock_t lock ; unsigned long last_rand ; struct neigh_statistics *stats ; struct neigh_hash_table *nht ; struct pneigh_entry **phash_buckets ; }; struct ipv6_stable_secret { bool initialized ; struct in6_addr secret ; }; struct ipv6_devconf { __s32 forwarding ; __s32 hop_limit ; __s32 mtu6 ; __s32 accept_ra ; __s32 accept_redirects ; __s32 autoconf ; __s32 dad_transmits ; __s32 rtr_solicits ; __s32 rtr_solicit_interval ; __s32 rtr_solicit_delay ; __s32 force_mld_version ; __s32 mldv1_unsolicited_report_interval ; __s32 mldv2_unsolicited_report_interval ; __s32 use_tempaddr ; __s32 temp_valid_lft ; __s32 temp_prefered_lft ; __s32 regen_max_retry ; __s32 max_desync_factor ; __s32 max_addresses ; __s32 accept_ra_defrtr ; __s32 accept_ra_pinfo ; __s32 accept_ra_rtr_pref ; __s32 rtr_probe_interval ; __s32 accept_ra_rt_info_max_plen ; __s32 proxy_ndp ; __s32 accept_source_route ; __s32 accept_ra_from_local ; __s32 optimistic_dad ; __s32 use_optimistic ; __s32 mc_forwarding ; __s32 disable_ipv6 ; __s32 accept_dad ; __s32 force_tllao ; __s32 ndisc_notify ; __s32 suppress_frag_ndisc ; __s32 accept_ra_mtu ; struct ipv6_stable_secret stable_secret ; void *sysctl ; }; struct page_counter { atomic_long_t count ; unsigned long limit ; struct page_counter *parent ; unsigned long watermark ; unsigned long failcnt ; }; struct sock_filter { __u16 code ; __u8 jt ; __u8 jf ; __u32 k ; }; struct bpf_insn { __u8 code ; unsigned char dst_reg : 4 ; unsigned char src_reg : 4 ; __s16 off ; __s32 imm ; }; enum bpf_prog_type { BPF_PROG_TYPE_UNSPEC = 0, BPF_PROG_TYPE_SOCKET_FILTER = 1, BPF_PROG_TYPE_KPROBE = 2, BPF_PROG_TYPE_SCHED_CLS = 3, BPF_PROG_TYPE_SCHED_ACT = 4 } ; struct bpf_prog_aux; struct sock_fprog_kern { u16 len ; struct sock_filter *filter ; }; union __anonunion____missing_field_name_344 { struct sock_filter insns[0U] ; struct bpf_insn insnsi[0U] ; }; struct bpf_prog { u16 pages ; bool jited ; bool gpl_compatible ; u32 len ; enum bpf_prog_type type ; struct bpf_prog_aux *aux ; struct sock_fprog_kern *orig_prog ; unsigned int (*bpf_func)(struct sk_buff const * , struct bpf_insn const * ) ; union __anonunion____missing_field_name_344 __annonCompField100 ; }; struct sk_filter { atomic_t refcnt ; struct callback_head rcu ; struct bpf_prog *prog ; }; struct pollfd { int fd ; short events ; short revents ; }; struct poll_table_struct { void (*_qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ; unsigned long _key ; }; struct dn_route; union __anonunion____missing_field_name_346 { struct dst_entry *next ; struct rtable *rt_next ; struct rt6_info *rt6_next ; struct dn_route *dn_next ; }; struct dst_entry { struct callback_head callback_head ; struct dst_entry *child ; struct net_device *dev ; struct dst_ops *ops ; unsigned long _metrics ; unsigned long expires ; struct dst_entry *path ; struct dst_entry *from ; struct xfrm_state *xfrm ; int (*input)(struct sk_buff * ) ; int (*output)(struct sock * , struct sk_buff * ) ; unsigned short flags ; unsigned short pending_confirm ; short error ; short obsolete ; unsigned short header_len ; unsigned short trailer_len ; __u32 tclassid ; long __pad_to_align_refcnt[2U] ; atomic_t __refcnt ; int __use ; unsigned long lastuse ; union __anonunion____missing_field_name_346 __annonCompField101 ; }; struct __anonstruct_socket_lock_t_347 { spinlock_t slock ; int owned ; wait_queue_head_t wq ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_socket_lock_t_347 socket_lock_t; struct proto; typedef __u32 __portpair; typedef __u64 __addrpair; struct __anonstruct____missing_field_name_349 { __be32 skc_daddr ; __be32 skc_rcv_saddr ; }; union __anonunion____missing_field_name_348 { __addrpair skc_addrpair ; struct __anonstruct____missing_field_name_349 __annonCompField102 ; }; union __anonunion____missing_field_name_350 { unsigned int skc_hash ; __u16 skc_u16hashes[2U] ; }; struct __anonstruct____missing_field_name_352 { __be16 skc_dport ; __u16 skc_num ; }; union __anonunion____missing_field_name_351 { __portpair skc_portpair ; struct __anonstruct____missing_field_name_352 __annonCompField105 ; }; union __anonunion____missing_field_name_353 { struct hlist_node skc_bind_node ; struct hlist_nulls_node skc_portaddr_node ; }; union __anonunion____missing_field_name_354 { struct hlist_node skc_node ; struct hlist_nulls_node skc_nulls_node ; }; struct sock_common { union __anonunion____missing_field_name_348 __annonCompField103 ; union __anonunion____missing_field_name_350 __annonCompField104 ; union __anonunion____missing_field_name_351 __annonCompField106 ; unsigned short skc_family ; unsigned char volatile skc_state ; unsigned char skc_reuse : 4 ; unsigned char skc_reuseport : 1 ; unsigned char skc_ipv6only : 1 ; unsigned char skc_net_refcnt : 1 ; int skc_bound_dev_if ; union __anonunion____missing_field_name_353 __annonCompField107 ; struct proto *skc_prot ; possible_net_t skc_net ; struct in6_addr skc_v6_daddr ; struct in6_addr skc_v6_rcv_saddr ; atomic64_t skc_cookie ; int skc_dontcopy_begin[0U] ; union __anonunion____missing_field_name_354 __annonCompField108 ; int skc_tx_queue_mapping ; atomic_t skc_refcnt ; int skc_dontcopy_end[0U] ; }; struct cg_proto; struct __anonstruct_sk_backlog_355 { atomic_t rmem_alloc ; int len ; struct sk_buff *head ; struct sk_buff *tail ; }; struct sock { struct sock_common __sk_common ; socket_lock_t sk_lock ; struct sk_buff_head sk_receive_queue ; struct __anonstruct_sk_backlog_355 sk_backlog ; int sk_forward_alloc ; __u32 sk_rxhash ; u16 sk_incoming_cpu ; __u32 sk_txhash ; unsigned int sk_napi_id ; unsigned int sk_ll_usec ; atomic_t sk_drops ; int sk_rcvbuf ; struct sk_filter *sk_filter ; struct socket_wq *sk_wq ; struct xfrm_policy *sk_policy[2U] ; unsigned long sk_flags ; struct dst_entry *sk_rx_dst ; struct dst_entry *sk_dst_cache ; spinlock_t sk_dst_lock ; atomic_t sk_wmem_alloc ; atomic_t sk_omem_alloc ; int sk_sndbuf ; struct sk_buff_head sk_write_queue ; unsigned char sk_shutdown : 2 ; unsigned char sk_no_check_tx : 1 ; unsigned char sk_no_check_rx : 1 ; unsigned char sk_userlocks : 4 ; unsigned char sk_protocol ; unsigned short sk_type ; int sk_wmem_queued ; gfp_t sk_allocation ; u32 sk_pacing_rate ; u32 sk_max_pacing_rate ; netdev_features_t sk_route_caps ; netdev_features_t sk_route_nocaps ; int sk_gso_type ; unsigned int sk_gso_max_size ; u16 sk_gso_max_segs ; int sk_rcvlowat ; unsigned long sk_lingertime ; struct sk_buff_head sk_error_queue ; struct proto *sk_prot_creator ; rwlock_t sk_callback_lock ; int sk_err ; int sk_err_soft ; u32 sk_ack_backlog ; u32 sk_max_ack_backlog ; __u32 sk_priority ; __u32 sk_cgrp_prioidx ; struct pid *sk_peer_pid ; struct cred const *sk_peer_cred ; long sk_rcvtimeo ; long sk_sndtimeo ; struct timer_list sk_timer ; ktime_t sk_stamp ; u16 sk_tsflags ; u32 sk_tskey ; struct socket *sk_socket ; void *sk_user_data ; struct page_frag sk_frag ; struct sk_buff *sk_send_head ; __s32 sk_peek_off ; int sk_write_pending ; void *sk_security ; __u32 sk_mark ; u32 sk_classid ; struct cg_proto *sk_cgrp ; void (*sk_state_change)(struct sock * ) ; void (*sk_data_ready)(struct sock * ) ; void (*sk_write_space)(struct sock * ) ; void (*sk_error_report)(struct sock * ) ; int (*sk_backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*sk_destruct)(struct sock * ) ; }; struct request_sock_ops; struct timewait_sock_ops; struct inet_hashinfo; struct raw_hashinfo; struct udp_table; union __anonunion_h_358 { struct inet_hashinfo *hashinfo ; struct udp_table *udp_table ; struct raw_hashinfo *raw_hash ; }; struct proto { void (*close)(struct sock * , long ) ; int (*connect)(struct sock * , struct sockaddr * , int ) ; int (*disconnect)(struct sock * , int ) ; struct sock *(*accept)(struct sock * , int , int * ) ; int (*ioctl)(struct sock * , int , unsigned long ) ; int (*init)(struct sock * ) ; void (*destroy)(struct sock * ) ; void (*shutdown)(struct sock * , int ) ; int (*setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_ioctl)(struct sock * , unsigned int , unsigned long ) ; int (*sendmsg)(struct sock * , struct msghdr * , size_t ) ; int (*recvmsg)(struct sock * , struct msghdr * , size_t , int , int , int * ) ; int (*sendpage)(struct sock * , struct page * , int , size_t , int ) ; int (*bind)(struct sock * , struct sockaddr * , int ) ; int (*backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*release_cb)(struct sock * ) ; void (*hash)(struct sock * ) ; void (*unhash)(struct sock * ) ; void (*rehash)(struct sock * ) ; int (*get_port)(struct sock * , unsigned short ) ; void (*clear_sk)(struct sock * , int ) ; unsigned int inuse_idx ; bool (*stream_memory_free)(struct sock const * ) ; void (*enter_memory_pressure)(struct sock * ) ; atomic_long_t *memory_allocated ; struct percpu_counter *sockets_allocated ; int *memory_pressure ; long *sysctl_mem ; int *sysctl_wmem ; int *sysctl_rmem ; int max_header ; bool no_autobind ; struct kmem_cache *slab ; unsigned int obj_size ; int slab_flags ; struct percpu_counter *orphan_count ; struct request_sock_ops *rsk_prot ; struct timewait_sock_ops *twsk_prot ; union __anonunion_h_358 h ; struct module *owner ; char name[32U] ; struct list_head node ; int (*init_cgroup)(struct mem_cgroup * , struct cgroup_subsys * ) ; void (*destroy_cgroup)(struct mem_cgroup * ) ; struct cg_proto *(*proto_cgroup)(struct mem_cgroup * ) ; }; struct cg_proto { struct page_counter memory_allocated ; struct percpu_counter sockets_allocated ; int memory_pressure ; long sysctl_mem[3U] ; unsigned long flags ; struct mem_cgroup *memcg ; }; struct request_sock_ops { int family ; int obj_size ; struct kmem_cache *slab ; char *slab_name ; int (*rtx_syn_ack)(struct sock * , struct request_sock * ) ; void (*send_ack)(struct sock * , struct sk_buff * , struct request_sock * ) ; void (*send_reset)(struct sock * , struct sk_buff * ) ; void (*destructor)(struct request_sock * ) ; void (*syn_ack_timeout)(struct request_sock const * ) ; }; struct request_sock { struct sock_common __req_common ; struct request_sock *dl_next ; struct sock *rsk_listener ; u16 mss ; u8 num_retrans ; unsigned char cookie_ts : 1 ; unsigned char num_timeout : 7 ; u32 window_clamp ; u32 rcv_wnd ; u32 ts_recent ; struct timer_list rsk_timer ; struct request_sock_ops const *rsk_ops ; struct sock *sk ; u32 *saved_syn ; u32 secid ; u32 peer_secid ; }; struct timewait_sock_ops { struct kmem_cache *twsk_slab ; char *twsk_slab_name ; unsigned int twsk_obj_size ; int (*twsk_unique)(struct sock * , struct sock * , void * ) ; void (*twsk_destructor)(struct sock * ) ; }; struct inet6_ifaddr { struct in6_addr addr ; __u32 prefix_len ; __u32 valid_lft ; __u32 prefered_lft ; atomic_t refcnt ; spinlock_t lock ; int state ; __u32 flags ; __u8 dad_probes ; __u8 stable_privacy_retry ; __u16 scope ; unsigned long cstamp ; unsigned long tstamp ; struct delayed_work dad_work ; struct inet6_dev *idev ; struct rt6_info *rt ; struct hlist_node addr_lst ; struct list_head if_list ; struct list_head tmp_list ; struct inet6_ifaddr *ifpub ; int regen_count ; bool tokenized ; struct callback_head rcu ; struct in6_addr peer_addr ; }; struct ip6_sf_list { struct ip6_sf_list *sf_next ; struct in6_addr sf_addr ; unsigned long sf_count[2U] ; unsigned char sf_gsresp ; unsigned char sf_oldin ; unsigned char sf_crcount ; }; struct ifmcaddr6 { struct in6_addr mca_addr ; struct inet6_dev *idev ; struct ifmcaddr6 *next ; struct ip6_sf_list *mca_sources ; struct ip6_sf_list *mca_tomb ; unsigned int mca_sfmode ; unsigned char mca_crcount ; unsigned long mca_sfcount[2U] ; struct timer_list mca_timer ; unsigned int mca_flags ; int mca_users ; atomic_t mca_refcnt ; spinlock_t mca_lock ; unsigned long mca_cstamp ; unsigned long mca_tstamp ; }; struct ifacaddr6 { struct in6_addr aca_addr ; struct inet6_dev *aca_idev ; struct rt6_info *aca_rt ; struct ifacaddr6 *aca_next ; int aca_users ; atomic_t aca_refcnt ; unsigned long aca_cstamp ; unsigned long aca_tstamp ; }; struct ipv6_devstat { struct proc_dir_entry *proc_dir_entry ; struct ipstats_mib *ipv6 ; struct icmpv6_mib_device *icmpv6dev ; struct icmpv6msg_mib_device *icmpv6msgdev ; }; struct inet6_dev { struct net_device *dev ; struct list_head addr_list ; struct ifmcaddr6 *mc_list ; struct ifmcaddr6 *mc_tomb ; spinlock_t mc_lock ; unsigned char mc_qrv ; unsigned char mc_gq_running ; unsigned char mc_ifc_count ; unsigned char mc_dad_count ; unsigned long mc_v1_seen ; unsigned long mc_qi ; unsigned long mc_qri ; unsigned long mc_maxdelay ; struct timer_list mc_gq_timer ; struct timer_list mc_ifc_timer ; struct timer_list mc_dad_timer ; struct ifacaddr6 *ac_list ; rwlock_t lock ; atomic_t refcnt ; __u32 if_flags ; int dead ; u8 rndid[8U] ; struct timer_list regen_timer ; struct list_head tempaddr_list ; struct in6_addr token ; struct neigh_parms *nd_parms ; struct ipv6_devconf cnf ; struct ipv6_devstat stats ; struct timer_list rs_timer ; __u8 rs_probes ; __u8 addr_gen_mode ; unsigned long tstamp ; struct callback_head rcu ; }; union inet_addr { __u32 all[4U] ; __be32 ip ; __be32 ip6[4U] ; struct in_addr in ; struct in6_addr in6 ; }; struct netpoll { struct net_device *dev ; char dev_name[16U] ; char const *name ; union inet_addr local_ip ; union inet_addr remote_ip ; bool ipv6 ; u16 local_port ; u16 remote_port ; u8 remote_mac[6U] ; struct work_struct cleanup_work ; }; struct netpoll_info { atomic_t refcnt ; struct semaphore dev_lock ; struct sk_buff_head txq ; struct delayed_work tx_work ; struct netpoll *netpoll ; struct callback_head rcu ; }; struct ipv4_devconf { void *sysctl ; int data[29U] ; unsigned long state[1U] ; }; struct in_ifaddr; struct ip_mc_list; struct in_device { struct net_device *dev ; atomic_t refcnt ; int dead ; struct in_ifaddr *ifa_list ; struct ip_mc_list *mc_list ; struct ip_mc_list **mc_hash ; int mc_count ; spinlock_t mc_tomb_lock ; struct ip_mc_list *mc_tomb ; unsigned long mr_v1_seen ; unsigned long mr_v2_seen ; unsigned long mr_maxdelay ; unsigned char mr_qrv ; unsigned char mr_gq_running ; unsigned char mr_ifc_count ; struct timer_list mr_gq_timer ; struct timer_list mr_ifc_timer ; struct neigh_parms *arp_parms ; struct ipv4_devconf cnf ; struct callback_head callback_head ; }; struct in_ifaddr { struct hlist_node hash ; struct in_ifaddr *ifa_next ; struct in_device *ifa_dev ; struct callback_head callback_head ; __be32 ifa_local ; __be32 ifa_address ; __be32 ifa_mask ; __be32 ifa_broadcast ; unsigned char ifa_scope ; unsigned char ifa_prefixlen ; __u32 ifa_flags ; char ifa_label[16U] ; __u32 ifa_valid_lft ; __u32 ifa_preferred_lft ; unsigned long ifa_cstamp ; unsigned long ifa_tstamp ; }; enum pcie_memwin { MEMWIN_NIC = 0, MEMWIN_RSVD1 = 1, MEMWIN_RSVD2 = 2, MEMWIN_RDMA = 3, MEMWIN_RSVD4 = 4, MEMWIN_FOISCSI = 5, MEMWIN_CSIOSTOR = 6, MEMWIN_RSVD7 = 7 } ; struct sge_qstat { __be32 qid ; __be16 cidx ; __be16 pidx ; }; struct serv_entry { void *data ; }; union aopen_entry { void *data ; union aopen_entry *next ; }; struct filter_entry; struct tid_info { void **tid_tab ; unsigned int ntids ; struct serv_entry *stid_tab ; unsigned long *stid_bmap ; unsigned int nstids ; unsigned int stid_base ; union aopen_entry *atid_tab ; unsigned int natids ; unsigned int atid_base ; struct filter_entry *ftid_tab ; unsigned int nftids ; unsigned int ftid_base ; unsigned int aftid_base ; unsigned int aftid_end ; unsigned int sftid_base ; unsigned int nsftids ; spinlock_t atid_lock ; union aopen_entry *afree ; unsigned int atids_in_use ; spinlock_t stid_lock ; unsigned int stids_in_use ; atomic_t tids_in_use ; }; enum cxgb4_uld { CXGB4_ULD_RDMA = 0, CXGB4_ULD_ISCSI = 1, CXGB4_ULD_MAX = 2 } ; enum cxgb4_state { CXGB4_STATE_UP = 0, CXGB4_STATE_START_RECOVERY = 1, CXGB4_STATE_DOWN = 2, CXGB4_STATE_DETACH = 3 } ; enum cxgb4_control { CXGB4_CONTROL_DB_FULL = 0, CXGB4_CONTROL_DB_EMPTY = 1, CXGB4_CONTROL_DB_DROP = 2 } ; struct l2t_data; struct pkt_gl; struct tp_tcp_stats; struct cxgb4_range { unsigned int start ; unsigned int size ; }; struct cxgb4_virt_res { struct cxgb4_range ddp ; struct cxgb4_range iscsi ; struct cxgb4_range stag ; struct cxgb4_range rq ; struct cxgb4_range pbl ; struct cxgb4_range qp ; struct cxgb4_range cq ; struct cxgb4_range ocq ; }; struct cxgb4_lld_info { struct pci_dev *pdev ; struct l2t_data *l2t ; struct tid_info *tids ; struct net_device **ports ; struct cxgb4_virt_res const *vr ; unsigned short const *mtus ; unsigned short const *rxq_ids ; unsigned short const *ciq_ids ; unsigned short nrxq ; unsigned short ntxq ; unsigned short nciq ; unsigned char nchan : 4 ; unsigned char nports : 4 ; unsigned char wr_cred ; unsigned char adapter_type ; unsigned char fw_api_ver ; unsigned int fw_vers ; unsigned int iscsi_iolen ; unsigned int cclk_ps ; unsigned short udb_density ; unsigned short ucq_density ; unsigned short filt_mode ; unsigned short tx_modq[4U] ; void *gts_reg ; void *db_reg ; int dbfifo_int_thresh ; unsigned int sge_ingpadboundary ; unsigned int sge_egrstatuspagesize ; unsigned int sge_pktshift ; unsigned int pf ; bool enable_fw_ofld_conn ; unsigned int max_ordird_qp ; unsigned int max_ird_adapter ; bool ulptx_memwrite_dsgl ; int nodeid ; }; struct cxgb4_uld_info { char const *name ; void *(*add)(struct cxgb4_lld_info const * ) ; int (*rx_handler)(void * , __be64 const * , struct pkt_gl const * ) ; int (*state_change)(void * , enum cxgb4_state ) ; int (*control)(void * , enum cxgb4_control , ...) ; }; enum cxgb4_bar2_qtype { CXGB4_BAR2_QTYPE_EGRESS = 0, CXGB4_BAR2_QTYPE_INGRESS = 1 } ; enum dev_master { MASTER_CANT = 0, MASTER_MAY = 1, MASTER_MUST = 2 } ; enum dev_state { DEV_STATE_UNINIT = 0, DEV_STATE_INIT = 1, DEV_STATE_ERR = 2 } ; struct port_stats { u64 tx_octets ; u64 tx_frames ; u64 tx_bcast_frames ; u64 tx_mcast_frames ; u64 tx_ucast_frames ; u64 tx_error_frames ; u64 tx_frames_64 ; u64 tx_frames_65_127 ; u64 tx_frames_128_255 ; u64 tx_frames_256_511 ; u64 tx_frames_512_1023 ; u64 tx_frames_1024_1518 ; u64 tx_frames_1519_max ; u64 tx_drop ; u64 tx_pause ; u64 tx_ppp0 ; u64 tx_ppp1 ; u64 tx_ppp2 ; u64 tx_ppp3 ; u64 tx_ppp4 ; u64 tx_ppp5 ; u64 tx_ppp6 ; u64 tx_ppp7 ; u64 rx_octets ; u64 rx_frames ; u64 rx_bcast_frames ; u64 rx_mcast_frames ; u64 rx_ucast_frames ; u64 rx_too_long ; u64 rx_jabber ; u64 rx_fcs_err ; u64 rx_len_err ; u64 rx_symbol_err ; u64 rx_runt ; u64 rx_frames_64 ; u64 rx_frames_65_127 ; u64 rx_frames_128_255 ; u64 rx_frames_256_511 ; u64 rx_frames_512_1023 ; u64 rx_frames_1024_1518 ; u64 rx_frames_1519_max ; u64 rx_pause ; u64 rx_ppp0 ; u64 rx_ppp1 ; u64 rx_ppp2 ; u64 rx_ppp3 ; u64 rx_ppp4 ; u64 rx_ppp5 ; u64 rx_ppp6 ; u64 rx_ppp7 ; u64 rx_ovflow0 ; u64 rx_ovflow1 ; u64 rx_ovflow2 ; u64 rx_ovflow3 ; u64 rx_trunc0 ; u64 rx_trunc1 ; u64 rx_trunc2 ; u64 rx_trunc3 ; }; struct tp_tcp_stats { u32 tcp_out_rsts ; u64 tcp_in_segs ; u64 tcp_out_segs ; u64 tcp_retrans_segs ; }; struct sge_params { u32 hps ; u32 eq_qpp ; u32 iq_qpp ; }; struct tp_params { unsigned int tre ; unsigned int la_mask ; unsigned short tx_modq_map ; uint32_t dack_re ; unsigned short tx_modq[4U] ; u32 vlan_pri_map ; u32 ingress_config ; int vlan_shift ; int vnic_shift ; int port_shift ; int protocol_shift ; }; struct vpd_params { unsigned int cclk ; u8 ec[17U] ; u8 sn[25U] ; u8 id[17U] ; u8 pn[17U] ; u8 na[13U] ; }; struct pci_params { unsigned char speed ; unsigned char width ; }; enum chip_type { T4_A1 = 65, T4_A2 = 66, T4_FIRST_REV = 65, T4_LAST_REV = 66, T5_A0 = 80, T5_A1 = 81, T5_FIRST_REV = 80, T5_LAST_REV = 81, T6_A0 = 96, T6_FIRST_REV = 96, T6_LAST_REV = 96 } ; struct devlog_params { u32 memtype ; u32 start ; u32 size ; }; struct arch_specific_params { u8 nchan ; u16 mps_rplc_size ; u16 vfcount ; u32 sge_fl_db ; u16 mps_tcam_size ; }; struct adapter_params { struct sge_params sge ; struct tp_params tp ; struct vpd_params vpd ; struct pci_params pci ; struct devlog_params devlog ; enum pcie_memwin drv_memwin ; unsigned int cim_la_size ; unsigned int sf_size ; unsigned int sf_nsec ; unsigned int sf_fw_start ; unsigned int fw_vers ; unsigned int tp_vers ; u8 api_vers[7U] ; unsigned short mtus[16U] ; unsigned short a_wnd[32U] ; unsigned short b_wnd[32U] ; unsigned char nports ; unsigned char portvec ; enum chip_type chip ; struct arch_specific_params arch ; unsigned char offload ; unsigned char bypass ; unsigned int ofldq_wr_cred ; bool ulptx_memwrite_dsgl ; unsigned int max_ordird_qp ; unsigned int max_ird_adapter ; }; struct sge_idma_monitor_state { unsigned int idma_1s_thresh ; unsigned int idma_stalled[2U] ; unsigned int idma_state[2U] ; unsigned int idma_qid[2U] ; unsigned int idma_warn[2U] ; }; struct fw_filter_wr { __be32 op_pkd ; __be32 len16_pkd ; __be64 r3 ; __be32 tid_to_iq ; __be32 del_filter_to_l2tix ; __be16 ethtype ; __be16 ethtypem ; __u8 frag_to_ovlan_vldm ; __u8 smac_sel ; __be16 rx_chan_rx_rpl_iq ; __be32 maci_to_matchtypem ; __u8 ptcl ; __u8 ptclm ; __u8 ttyp ; __u8 ttypm ; __be16 ivlan ; __be16 ivlanm ; __be16 ovlan ; __be16 ovlanm ; __u8 lip[16U] ; __u8 lipm[16U] ; __u8 fip[16U] ; __u8 fipm[16U] ; __be16 lp ; __be16 lpm ; __be16 fp ; __be16 fpm ; __be16 r7 ; __u8 sma[6U] ; }; struct fw_caps_config_cmd { __be32 op_to_write ; __be32 cfvalid_to_len16 ; __be32 r2 ; __be32 hwmbitmap ; __be16 nbmcaps ; __be16 linkcaps ; __be16 switchcaps ; __be16 r3 ; __be16 niccaps ; __be16 ofldcaps ; __be16 rdmacaps ; __be16 r4 ; __be16 iscsicaps ; __be16 fcoecaps ; __be32 cfcsum ; __be32 finiver ; __be32 finicsum ; }; struct fw_port_l1cfg { __be32 rcap ; __be32 r ; }; struct fw_port_l2cfg { __u8 ctlbf ; __u8 ovlan3_to_ivlan0 ; __be16 ivlantype ; __be16 txipg_force_pinfo ; __be16 mtu ; __be16 ovlan0mask ; __be16 ovlan0type ; __be16 ovlan1mask ; __be16 ovlan1type ; __be16 ovlan2mask ; __be16 ovlan2type ; __be16 ovlan3mask ; __be16 ovlan3type ; }; struct fw_port_info { __be32 lstatus_to_modtype ; __be16 pcap ; __be16 acap ; __be16 mtu ; __u8 cbllen ; __u8 auxlinfo ; __u8 dcbxdis_pkd ; __u8 r8_lo[3U] ; __be64 r9 ; }; struct fw_port_diags { __u8 diagop ; __u8 r[3U] ; __be32 diagval ; }; struct fw_port_dcb_pgid { __u8 type ; __u8 apply_pkd ; __u8 r10_lo[2U] ; __be32 pgid ; __be64 r11 ; }; struct fw_port_dcb_pgrate { __u8 type ; __u8 apply_pkd ; __u8 r10_lo[5U] ; __u8 num_tcs_supported ; __u8 pgrate[8U] ; __u8 tsa[8U] ; }; struct fw_port_dcb_priorate { __u8 type ; __u8 apply_pkd ; __u8 r10_lo[6U] ; __u8 strict_priorate[8U] ; }; struct fw_port_dcb_pfc { __u8 type ; __u8 pfcen ; __u8 r10[5U] ; __u8 max_pfc_tcs ; __be64 r11 ; }; struct fw_port_app_priority { __u8 type ; __u8 r10[2U] ; __u8 idx ; __u8 user_prio_map ; __u8 sel_field ; __be16 protocolid ; __be64 r12 ; }; struct fw_port_dcb_control { __u8 type ; __u8 all_syncd_pkd ; __be16 dcb_version_to_app_state ; __be32 r11 ; __be64 r12 ; }; union fw_port_dcb { struct fw_port_dcb_pgid pgid ; struct fw_port_dcb_pgrate pgrate ; struct fw_port_dcb_priorate priorate ; struct fw_port_dcb_pfc pfc ; struct fw_port_app_priority app_priority ; struct fw_port_dcb_control control ; }; union fw_port { struct fw_port_l1cfg l1cfg ; struct fw_port_l2cfg l2cfg ; struct fw_port_info info ; struct fw_port_diags diags ; union fw_port_dcb dcb ; }; struct fw_port_cmd { __be32 op_to_portid ; __be32 action_to_len16 ; union fw_port u ; }; enum fw_port_type { FW_PORT_TYPE_FIBER_XFI = 0, FW_PORT_TYPE_FIBER_XAUI = 1, FW_PORT_TYPE_BT_SGMII = 2, FW_PORT_TYPE_BT_XFI = 3, FW_PORT_TYPE_BT_XAUI = 4, FW_PORT_TYPE_KX4 = 5, FW_PORT_TYPE_CX4 = 6, FW_PORT_TYPE_KX = 7, FW_PORT_TYPE_KR = 8, FW_PORT_TYPE_SFP = 9, FW_PORT_TYPE_BP_AP = 10, FW_PORT_TYPE_BP4_AP = 11, FW_PORT_TYPE_QSFP_10G = 12, FW_PORT_TYPE_QSA = 13, FW_PORT_TYPE_QSFP = 14, FW_PORT_TYPE_BP40_BA = 15, FW_PORT_TYPE_NONE = 31 } ; struct fw_hdr { u8 ver ; u8 chip ; __be16 len512 ; __be32 fw_ver ; __be32 tp_microcode_ver ; u8 intfver_nic ; u8 intfver_vnic ; u8 intfver_ofld ; u8 intfver_ri ; u8 intfver_iscsipdu ; u8 intfver_iscsi ; u8 intfver_fcoepdu ; u8 intfver_fcoe ; __u32 reserved2 ; __u32 reserved3 ; __u32 reserved4 ; __be32 flags ; __be32 reserved6[23U] ; }; struct fw_info { u8 chip ; char *fs_name ; char *fw_mod_name ; struct fw_hdr fw_hdr ; }; struct link_config { unsigned short supported ; unsigned short advertising ; unsigned short requested_speed ; unsigned short speed ; unsigned char requested_fc ; unsigned char fc ; unsigned char autoneg ; unsigned char link_ok ; }; struct adapter; struct sge_rspq; enum cxgb4_dcb_state { CXGB4_DCB_STATE_START = 0, CXGB4_DCB_STATE_HOST = 1, CXGB4_DCB_STATE_FW_INCOMPLETE = 2, CXGB4_DCB_STATE_FW_ALLSYNCED = 3 } ; enum cxgb4_dcb_state_input { CXGB4_DCB_INPUT_FW_DISABLED = 0, CXGB4_DCB_INPUT_FW_ENABLED = 1, CXGB4_DCB_INPUT_FW_INCOMPLETE = 2, CXGB4_DCB_INPUT_FW_ALLSYNCED = 3 } ; enum cxgb4_dcb_fw_msgs { CXGB4_DCB_FW_PGID = 1, CXGB4_DCB_FW_PGRATE = 2, CXGB4_DCB_FW_PRIORATE = 4, CXGB4_DCB_FW_PFC = 8, CXGB4_DCB_FW_APP_ID = 16 } ; struct app_priority { u8 user_prio_map ; u8 sel_field ; u16 protocolid ; }; struct port_dcb_info { enum cxgb4_dcb_state state ; enum cxgb4_dcb_fw_msgs msgs ; unsigned int supported ; bool enabled ; u32 pgid ; u8 dcb_version ; u8 pfcen ; u8 pg_num_tcs_supported ; u8 pfc_num_tcs_supported ; u8 pgrate[8U] ; u8 priorate[8U] ; u8 tsa[8U] ; struct app_priority app_priority[8U] ; }; struct cxgb_fcoe { u8 flags ; }; struct port_info { struct adapter *adapter ; u16 viid ; s16 xact_addr_filt ; u16 rss_size ; s8 mdio_addr ; enum fw_port_type port_type ; u8 mod_type ; u8 port_id ; u8 tx_chan ; u8 lport ; u8 nqsets ; u8 first_qset ; u8 rss_mode ; struct link_config link_cfg ; u16 *rss ; struct port_stats stats_base ; struct port_dcb_info dcb ; struct cxgb_fcoe fcoe ; }; struct rx_sw_desc; struct sge_fl { unsigned int avail ; unsigned int pend_cred ; unsigned int cidx ; unsigned int pidx ; unsigned long alloc_failed ; unsigned long large_alloc_failed ; unsigned long starving ; unsigned int cntxt_id ; unsigned int size ; struct rx_sw_desc *sdesc ; __be64 *desc ; dma_addr_t addr ; void *bar2_addr ; unsigned int bar2_qid ; }; struct pkt_gl { struct page_frag frags[17U] ; void *va ; unsigned int nfrags ; unsigned int tot_len ; }; struct sge_rspq { struct napi_struct napi ; __be64 const *cur_desc ; unsigned int cidx ; u8 gen ; u8 intr_params ; u8 next_intr_params ; u8 adaptive_rx ; u8 pktcnt_idx ; u8 uld ; u8 idx ; int offset ; u16 cntxt_id ; u16 abs_id ; __be64 *desc ; dma_addr_t phys_addr ; void *bar2_addr ; unsigned int bar2_qid ; unsigned int iqe_len ; unsigned int size ; struct adapter *adap ; struct net_device *netdev ; int (*handler)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ) ; unsigned int bpoll_state ; spinlock_t bpoll_lock ; }; struct sge_eth_stats { unsigned long pkts ; unsigned long lro_pkts ; unsigned long lro_merged ; unsigned long rx_cso ; unsigned long vlan_ex ; unsigned long rx_drops ; }; struct sge_eth_rxq { struct sge_rspq rspq ; struct sge_fl fl ; struct sge_eth_stats stats ; }; struct sge_ofld_stats { unsigned long pkts ; unsigned long imm ; unsigned long an ; unsigned long nomem ; }; struct sge_ofld_rxq { struct sge_rspq rspq ; struct sge_fl fl ; struct sge_ofld_stats stats ; }; struct tx_desc { __be64 flit[8U] ; }; struct tx_sw_desc; struct sge_txq { unsigned int in_use ; unsigned int size ; unsigned int cidx ; unsigned int pidx ; unsigned long stops ; unsigned long restarts ; unsigned int cntxt_id ; struct tx_desc *desc ; struct tx_sw_desc *sdesc ; struct sge_qstat *stat ; dma_addr_t phys_addr ; spinlock_t db_lock ; int db_disabled ; unsigned short db_pidx ; unsigned short db_pidx_inc ; void *bar2_addr ; unsigned int bar2_qid ; }; struct sge_eth_txq { struct sge_txq q ; struct netdev_queue *txq ; u8 dcb_prio ; unsigned long tso ; unsigned long tx_cso ; unsigned long vlan_ins ; unsigned long mapping_err ; }; struct sge_ofld_txq { struct sge_txq q ; struct adapter *adap ; struct sk_buff_head sendq ; struct tasklet_struct qresume_tsk ; u8 full ; unsigned long mapping_err ; }; struct sge_ctrl_txq { struct sge_txq q ; struct adapter *adap ; struct sk_buff_head sendq ; struct tasklet_struct qresume_tsk ; u8 full ; }; struct sge { struct sge_eth_txq ethtxq[32U] ; struct sge_ofld_txq ofldtxq[16U] ; struct sge_ctrl_txq ctrlq[4U] ; struct sge_eth_rxq ethrxq[32U] ; struct sge_ofld_rxq ofldrxq[16U] ; struct sge_ofld_rxq rdmarxq[4U] ; struct sge_ofld_rxq rdmaciq[32U] ; struct sge_rspq fw_evtq ; struct sge_rspq intrq ; spinlock_t intrq_lock ; u16 max_ethqsets ; u16 ethqsets ; u16 ethtxq_rover ; u16 ofldqsets ; u16 rdmaqs ; u16 rdmaciqs ; u16 ofld_rxq[16U] ; u16 rdma_rxq[4U] ; u16 rdma_ciq[32U] ; u16 timer_val[6U] ; u8 counter_val[4U] ; u32 fl_pg_order ; u32 stat_len ; u32 pktshift ; u32 fl_align ; u32 fl_starve_thres ; struct sge_idma_monitor_state idma_monitor ; unsigned int egr_start ; unsigned int egr_sz ; unsigned int ingr_start ; unsigned int ingr_sz ; void **egr_map ; struct sge_rspq **ingr_map ; unsigned long *starving_fl ; unsigned long *txq_maperr ; unsigned long *blocked_fl ; struct timer_list rx_timer ; struct timer_list tx_timer ; }; struct doorbell_stats { u32 db_drop ; u32 db_empty ; u32 db_full ; }; struct __anonstruct_msix_info_384 { unsigned short vec ; char desc[26U] ; }; struct clip_tbl; struct adapter { void *regs ; void *bar2 ; u32 t4_bar0 ; struct pci_dev *pdev ; struct device *pdev_dev ; unsigned int mbox ; unsigned int pf ; unsigned int flags ; enum chip_type chip ; int msg_enable ; struct adapter_params params ; struct cxgb4_virt_res vres ; unsigned int swintr ; struct __anonstruct_msix_info_384 msix_info[91U] ; struct doorbell_stats db_stats ; struct sge sge ; struct net_device *port[4U] ; u8 chan_map[4U] ; u32 filter_mode ; unsigned int l2t_start ; unsigned int l2t_end ; struct l2t_data *l2t ; unsigned int clipt_start ; unsigned int clipt_end ; struct clip_tbl *clipt ; void *uld_handle[2U] ; struct list_head list_node ; struct list_head rcu_node ; struct tid_info tids ; void **tid_release_head ; spinlock_t tid_release_lock ; struct workqueue_struct *workq ; struct work_struct tid_release_task ; struct work_struct db_full_task ; struct work_struct db_drop_task ; bool tid_release_task_busy ; struct dentry *debugfs_root ; spinlock_t stats_lock ; spinlock_t win0_lock ; }; struct ch_filter_tuple { unsigned short ethtype ; unsigned char frag : 1 ; unsigned char ivlan_vld : 1 ; unsigned char ovlan_vld : 1 ; unsigned char pfvf_vld : 1 ; unsigned short macidx : 9 ; unsigned char fcoe : 1 ; unsigned char iport : 3 ; unsigned char matchtype : 3 ; unsigned char proto ; unsigned char tos ; unsigned char pf ; unsigned char vf ; unsigned short ivlan ; unsigned short ovlan ; uint8_t lip[16U] ; uint8_t fip[16U] ; uint16_t lport ; uint16_t fport ; }; struct ch_filter_specification { unsigned char hitcnts : 1 ; unsigned char prio : 1 ; unsigned char type : 1 ; unsigned char action : 2 ; unsigned char rpttid : 1 ; unsigned char dirsteer : 1 ; unsigned short iq : 10 ; unsigned char maskhash : 1 ; unsigned char dirsteerhash : 1 ; unsigned char eport : 2 ; unsigned char newdmac : 1 ; unsigned char newsmac : 1 ; unsigned char newvlan : 2 ; uint8_t dmac[6U] ; uint8_t smac[6U] ; uint16_t vlan ; struct ch_filter_tuple val ; struct ch_filter_tuple mask ; }; enum t4_bar2_qtype { T4_BAR2_QTYPE_EGRESS = 0, T4_BAR2_QTYPE_INGRESS = 1 } ; union opcode_tid { __be32 opcode_tid ; u8 opcode ; }; struct rss_header { u8 opcode ; unsigned char channel : 2 ; unsigned char filter_hit : 1 ; unsigned char filter_tid : 1 ; unsigned char hash_type : 2 ; unsigned char ipv6 : 1 ; unsigned char send2fw : 1 ; __be16 qid ; __be32 hash_val ; }; struct work_request_hdr { __be32 wr_hi ; __be32 wr_mid ; __be64 wr_lo ; }; struct cpl_pass_open_req { struct work_request_hdr wr ; union opcode_tid ot ; __be16 local_port ; __be16 peer_port ; __be32 local_ip ; __be32 peer_ip ; __be64 opt0 ; __be64 opt1 ; }; struct cpl_pass_open_req6 { struct work_request_hdr wr ; union opcode_tid ot ; __be16 local_port ; __be16 peer_port ; __be64 local_ip_hi ; __be64 local_ip_lo ; __be64 peer_ip_hi ; __be64 peer_ip_lo ; __be64 opt0 ; __be64 opt1 ; }; struct cpl_set_tcb_rpl { union opcode_tid ot ; __be16 rsvd ; u8 cookie ; u8 status ; __be64 oldval ; }; struct cpl_close_listsvr_req { struct work_request_hdr wr ; union opcode_tid ot ; __be16 reply_ctrl ; __be16 rsvd ; }; struct cpl_tid_release { struct work_request_hdr wr ; union opcode_tid ot ; __be32 rsvd ; }; struct cpl_l2t_write_rpl { union opcode_tid ot ; u8 status ; u8 rsvd[3U] ; }; struct cpl_sge_egr_update { __be32 opcode_qid ; __be16 cidx ; __be16 pidx ; }; struct cpl_fw4_msg { u8 opcode ; u8 type ; __be16 rsvd0 ; __be32 rsvd1 ; __be64 data[2U] ; }; struct cpl_fw6_msg { u8 opcode ; u8 type ; __be16 rsvd0 ; __be32 rsvd1 ; __be64 data[4U] ; }; struct clip_tbl { unsigned int clipt_start ; unsigned int clipt_size ; rwlock_t lock ; atomic_t nfree ; struct list_head ce_free_head ; void *cl_list ; struct list_head hash_list[0U] ; }; struct l2t_entry { u16 state ; u16 idx ; u32 addr[4U] ; int ifindex ; struct neighbour *neigh ; struct l2t_entry *first ; struct l2t_entry *next ; struct sk_buff *arpq_head ; struct sk_buff *arpq_tail ; spinlock_t lock ; atomic_t refcnt ; u16 hash ; u16 vlan ; u8 v6 ; u8 lport ; u8 dmac[6U] ; }; struct filter_entry { unsigned char valid : 1 ; unsigned char locked : 1 ; unsigned char pending : 1 ; unsigned char smtidx ; struct l2t_entry *l2t ; struct ch_filter_specification fs ; }; struct info_10gbt_phy_fw { unsigned int phy_fw_id ; char *phy_fw_file ; int (*phy_fw_version)(u8 const * , size_t ) ; int phy_flash ; }; union __anonunion_last_393 { __be32 word ; char buf[4U] ; }; typedef bool ldv_func_ret_type; typedef bool ldv_func_ret_type___0; typedef bool ldv_func_ret_type___1; typedef bool ldv_func_ret_type___2; typedef int ldv_func_ret_type___3; typedef int ldv_func_ret_type___4; typedef int ldv_func_ret_type___5; typedef int ldv_func_ret_type___6; typedef int ldv_func_ret_type___7; typedef int ldv_func_ret_type___8; typedef int ldv_func_ret_type___9; typedef bool ldv_func_ret_type___10; typedef bool ldv_func_ret_type___11; typedef bool ldv_func_ret_type___12; typedef int ldv_func_ret_type___13; typedef int ldv_func_ret_type___14; enum hrtimer_restart; struct l2t_skb_cb { void *handle ; void (*arp_err_handler)(void * , struct sk_buff * ) ; }; struct cpl_l2t_write_req { struct work_request_hdr wr ; union opcode_tid ot ; __be16 params ; __be16 l2t_idx ; __be16 vlan ; u8 dst_mac[6U] ; }; struct l2t_data { rwlock_t lock ; atomic_t nfree ; struct l2t_entry *rover ; struct l2t_entry l2tab[4096U] ; }; enum hrtimer_restart; struct lb_port_stats { u64 octets ; u64 frames ; u64 bcast_frames ; u64 mcast_frames ; u64 ucast_frames ; u64 error_frames ; u64 frames_64 ; u64 frames_65_127 ; u64 frames_128_255 ; u64 frames_256_511 ; u64 frames_512_1023 ; u64 frames_1024_1518 ; u64 frames_1519_max ; u64 drop ; u64 ovflow0 ; u64 ovflow1 ; u64 ovflow2 ; u64 ovflow3 ; u64 trunc0 ; u64 trunc1 ; u64 trunc2 ; u64 trunc3 ; }; struct tp_usm_stats { u32 frames ; u32 drops ; u64 octets ; }; struct tp_fcoe_stats { u32 frames_ddp ; u32 frames_drop ; u64 octets_ddp ; }; struct tp_err_stats { u32 mac_in_errs[4U] ; u32 hdr_in_errs[4U] ; u32 tcp_in_errs[4U] ; u32 tnl_cong_drops[4U] ; u32 ofld_chan_drops[4U] ; u32 tnl_tx_drops[4U] ; u32 ofld_vlan_drops[4U] ; u32 tcp6_in_errs[4U] ; u32 ofld_no_neigh ; u32 ofld_cong_defer ; }; struct tp_cpl_stats { u32 req[4U] ; u32 rsp[4U] ; }; struct tp_rdma_stats { u32 rqe_dfr_pkt ; u32 rqe_dfr_mod ; }; struct fw_ldst_addrval { __be32 addr ; __be32 val ; }; struct fw_ldst_idctxt { __be32 physid ; __be32 msg_ctxtflush ; __be32 ctxt_data7 ; __be32 ctxt_data6 ; __be32 ctxt_data5 ; __be32 ctxt_data4 ; __be32 ctxt_data3 ; __be32 ctxt_data2 ; __be32 ctxt_data1 ; __be32 ctxt_data0 ; }; struct fw_ldst_mdio { __be16 paddr_mmd ; __be16 raddr ; __be16 vctl ; __be16 rval ; }; struct fw_ldst_mps_rplc { __be16 fid_idx ; __be16 rplcpf_pkd ; __be32 rplc255_224 ; __be32 rplc223_192 ; __be32 rplc191_160 ; __be32 rplc159_128 ; __be32 rplc127_96 ; __be32 rplc95_64 ; __be32 rplc63_32 ; __be32 rplc31_0 ; }; struct fw_ldst_mps_atrb { __be16 fid_mpsid ; __be16 r2[3U] ; __be32 r3[2U] ; __be32 r4 ; __be32 atrb ; __be16 vlan[16U] ; }; union fw_ldst_mps { struct fw_ldst_mps_rplc rplc ; struct fw_ldst_mps_atrb atrb ; }; struct fw_ldst_func { u8 access_ctl ; u8 mod_index ; __be16 ctl_id ; __be32 offset ; __be64 data0 ; __be64 data1 ; }; struct fw_ldst_pcie { u8 ctrl_to_fn ; u8 bnum ; u8 r ; u8 ext_r ; u8 select_naccess ; u8 pcie_fn ; __be16 nset_pkd ; __be32 data[12U] ; }; union fw_ldst { struct fw_ldst_addrval addrval ; struct fw_ldst_idctxt idctxt ; struct fw_ldst_mdio mdio ; union fw_ldst_mps mps ; struct fw_ldst_func func ; struct fw_ldst_pcie pcie ; }; struct fw_ldst_cmd { __be32 op_to_addrspace ; __be32 cycles_to_len16 ; union fw_ldst u ; }; struct fw_reset_cmd { __be32 op_to_write ; __be32 retval_len16 ; __be32 val ; __be32 halt_pkd ; }; struct fw_hello_cmd { __be32 op_to_write ; __be32 retval_len16 ; __be32 err_to_clearinit ; __be32 fwrev ; }; struct fw_bye_cmd { __be32 op_to_write ; __be32 retval_len16 ; __be64 r3 ; }; struct fw_initialize_cmd { __be32 op_to_write ; __be32 retval_len16 ; __be64 r3 ; }; enum fw_params_param_dev_fwcache { FW_PARAM_DEV_FWCACHE_FLUSH = 0, FW_PARAM_DEV_FWCACHE_FLUSHINV = 1 } ; struct fw_params_param { __be32 mnem ; __be32 val ; }; struct fw_params_cmd { __be32 op_to_vfn ; __be32 retval_len16 ; struct fw_params_param param[7U] ; }; struct fw_pfvf_cmd { __be32 op_to_vfn ; __be32 retval_len16 ; __be32 niqflint_niq ; __be32 type_to_neq ; __be32 tc_to_nexactf ; __be32 r_caps_to_nethctrl ; __be16 nricq ; __be16 nriqp ; __be32 r4 ; }; struct fw_iq_cmd { __be32 op_to_vfn ; __be32 alloc_to_len16 ; __be16 physiqid ; __be16 iqid ; __be16 fl0id ; __be16 fl1id ; __be32 type_to_iqandstindex ; __be16 iqdroprss_to_iqesize ; __be16 iqsize ; __be64 iqaddr ; __be32 iqns_to_fl0congen ; __be16 fl0dcaen_to_fl0cidxfthresh ; __be16 fl0size ; __be64 fl0addr ; __be32 fl1cngchmap_to_fl1congen ; __be16 fl1dcaen_to_fl1cidxfthresh ; __be16 fl1size ; __be64 fl1addr ; }; struct fw_eq_eth_cmd { __be32 op_to_vfn ; __be32 alloc_to_len16 ; __be32 eqid_pkd ; __be32 physeqid_pkd ; __be32 fetchszm_to_iqid ; __be32 dcaen_to_eqsize ; __be64 eqaddr ; __be32 viid_pkd ; __be32 r8_lo ; __be64 r9 ; }; struct fw_eq_ctrl_cmd { __be32 op_to_vfn ; __be32 alloc_to_len16 ; __be32 cmpliqid_eqid ; __be32 physeqid_pkd ; __be32 fetchszm_to_iqid ; __be32 dcaen_to_eqsize ; __be64 eqaddr ; }; struct fw_eq_ofld_cmd { __be32 op_to_vfn ; __be32 alloc_to_len16 ; __be32 eqid_pkd ; __be32 physeqid_pkd ; __be32 fetchszm_to_iqid ; __be32 dcaen_to_eqsize ; __be64 eqaddr ; }; struct fw_vi_cmd { __be32 op_to_vfn ; __be32 alloc_to_len16 ; __be16 type_viid ; u8 mac[6U] ; u8 portid_pkd ; u8 nmac ; u8 nmac0[6U] ; __be16 rsssize_pkd ; u8 nmac1[6U] ; __be16 idsiiq_pkd ; u8 nmac2[6U] ; __be16 idseiq_pkd ; u8 nmac3[6U] ; __be64 r9 ; __be64 r10 ; }; struct fw_vi_mac_exact { __be16 valid_to_idx ; u8 macaddr[6U] ; }; struct fw_vi_mac_hash { __be64 hashvec ; }; union fw_vi_mac { struct fw_vi_mac_exact exact[7U] ; struct fw_vi_mac_hash hash ; }; struct fw_vi_mac_cmd { __be32 op_to_viid ; __be32 freemacs_to_len16 ; union fw_vi_mac u ; }; struct fw_vi_rxmode_cmd { __be32 op_to_viid ; __be32 retval_len16 ; __be32 mtu_to_vlanexen ; __be32 r4_lo ; }; struct fw_vi_enable_cmd { __be32 op_to_viid ; __be32 ien_to_len16 ; __be16 blinkdur ; __be16 r3 ; __be32 r4 ; }; struct fw_rss_ind_tbl_cmd { __be32 op_to_viid ; __be32 retval_len16 ; __be16 niqid ; __be16 startidx ; __be32 r3 ; __be32 iq0_to_iq2 ; __be32 iq3_to_iq5 ; __be32 iq6_to_iq8 ; __be32 iq9_to_iq11 ; __be32 iq12_to_iq14 ; __be32 iq15_to_iq17 ; __be32 iq18_to_iq20 ; __be32 iq21_to_iq23 ; __be32 iq24_to_iq26 ; __be32 iq27_to_iq29 ; __be32 iq30_iq31 ; __be32 r15_lo ; }; struct fw_rss_glb_config_manual { __be32 mode_pkd ; __be32 r3 ; __be64 r4 ; __be64 r5 ; }; struct fw_rss_glb_config_basicvirtual { __be32 mode_pkd ; __be32 synmapen_to_hashtoeplitz ; __be64 r8 ; __be64 r9 ; }; union fw_rss_glb_config { struct fw_rss_glb_config_manual manual ; struct fw_rss_glb_config_basicvirtual basicvirtual ; }; struct fw_rss_glb_config_cmd { __be32 op_to_write ; __be32 retval_len16 ; union fw_rss_glb_config u ; }; struct fw_rss_vi_config_manual { __be64 r3 ; __be64 r4 ; __be64 r5 ; }; struct fw_rss_vi_config_basicvirtual { __be32 r6 ; __be32 defaultq_to_udpen ; __be64 r9 ; __be64 r10 ; }; union fw_rss_vi_config { struct fw_rss_vi_config_manual manual ; struct fw_rss_vi_config_basicvirtual basicvirtual ; }; struct fw_rss_vi_config_cmd { __be32 op_to_viid ; __be32 retval_len16 ; union fw_rss_vi_config u ; }; struct fw_debug_assert { __be32 fcid ; __be32 line ; __be32 x ; __be32 y ; u8 filename_0_7[8U] ; u8 filename_8_15[8U] ; __be64 r3 ; }; struct fw_debug_prt { __be16 dprtstridx ; __be16 r3[3U] ; __be32 dprtstrparam0 ; __be32 dprtstrparam1 ; __be32 dprtstrparam2 ; __be32 dprtstrparam3 ; }; union fw_debug { struct fw_debug_assert assert ; struct fw_debug_prt prt ; }; struct fw_debug_cmd { __be32 op_type ; __be32 len16_pkd ; union fw_debug u ; }; struct fw_devlog_cmd { __be32 op_to_write ; __be32 retval_len16 ; __u8 level ; __u8 r2[7U] ; __be32 memtype_devlog_memaddr16_devlog ; __be32 memsize_devlog ; __be32 r3[2U] ; }; union __anonunion_last_336 { u32 word ; char byte[4U] ; }; struct exprom_header { unsigned char hdr_arr[16U] ; unsigned char hdr_ver[4U] ; }; struct intr_info { unsigned int mask ; char const *msg ; short stat_idx ; unsigned short fatal ; void (*int_handler)(struct adapter * ) ; }; struct flash_desc { u32 vendor_and_model_id ; u32 size_mb ; }; typedef __u16 __sum16; struct free_area { struct list_head free_list[6U] ; unsigned long nr_free ; }; struct pglist_data; struct zone_padding { char x[0U] ; }; struct zone_reclaim_stat { unsigned long recent_rotated[2U] ; unsigned long recent_scanned[2U] ; }; struct zone; struct lruvec { struct list_head lists[5U] ; struct zone_reclaim_stat reclaim_stat ; struct zone *zone ; }; struct per_cpu_pages { int count ; int high ; int batch ; struct list_head lists[3U] ; }; struct per_cpu_pageset { struct per_cpu_pages pcp ; s8 expire ; s8 stat_threshold ; s8 vm_stat_diff[39U] ; }; enum zone_type { ZONE_DMA = 0, ZONE_DMA32 = 1, ZONE_NORMAL = 2, ZONE_MOVABLE = 3, __MAX_NR_ZONES = 4 } ; struct zone { unsigned long watermark[3U] ; long lowmem_reserve[4U] ; int node ; unsigned int inactive_ratio ; struct pglist_data *zone_pgdat ; struct per_cpu_pageset *pageset ; unsigned long dirty_balance_reserve ; unsigned long min_unmapped_pages ; unsigned long min_slab_pages ; unsigned long zone_start_pfn ; unsigned long managed_pages ; unsigned long spanned_pages ; unsigned long present_pages ; char const *name ; int nr_migrate_reserve_block ; unsigned long nr_isolate_pageblock ; seqlock_t span_seqlock ; wait_queue_head_t *wait_table ; unsigned long wait_table_hash_nr_entries ; unsigned long wait_table_bits ; struct zone_padding _pad1_ ; struct free_area free_area[11U] ; unsigned long flags ; spinlock_t lock ; struct zone_padding _pad2_ ; spinlock_t lru_lock ; struct lruvec lruvec ; atomic_long_t inactive_age ; unsigned long percpu_drift_mark ; unsigned long compact_cached_free_pfn ; unsigned long compact_cached_migrate_pfn[2U] ; unsigned int compact_considered ; unsigned int compact_defer_shift ; int compact_order_failed ; bool compact_blockskip_flush ; struct zone_padding _pad3_ ; atomic_long_t vm_stat[39U] ; }; struct zonelist_cache { unsigned short z_to_n[4096U] ; unsigned long fullzones[64U] ; unsigned long last_full_zap ; }; struct zoneref { struct zone *zone ; int zone_idx ; }; struct zonelist { struct zonelist_cache *zlcache_ptr ; struct zoneref _zonerefs[4097U] ; struct zonelist_cache zlcache ; }; struct pglist_data { struct zone node_zones[4U] ; struct zonelist node_zonelists[2U] ; int nr_zones ; spinlock_t node_size_lock ; unsigned long node_start_pfn ; unsigned long node_present_pages ; unsigned long node_spanned_pages ; int node_id ; wait_queue_head_t kswapd_wait ; wait_queue_head_t pfmemalloc_wait ; struct task_struct *kswapd ; int kswapd_max_order ; enum zone_type classzone_idx ; spinlock_t numabalancing_migrate_lock ; unsigned long numabalancing_migrate_next_window ; unsigned long numabalancing_migrate_nr_pages ; unsigned long first_deferred_pfn ; }; typedef struct pglist_data pg_data_t; enum hrtimer_restart; struct skb_frag_struct; typedef struct skb_frag_struct skb_frag_t; struct __anonstruct_page_225 { struct page *p ; }; struct skb_frag_struct { struct __anonstruct_page_225 page ; __u32 page_offset ; __u32 size ; }; struct skb_shared_hwtstamps { ktime_t hwtstamp ; }; struct skb_shared_info { unsigned char nr_frags ; __u8 tx_flags ; unsigned short gso_size ; unsigned short gso_segs ; unsigned short gso_type ; struct sk_buff *frag_list ; struct skb_shared_hwtstamps hwtstamps ; u32 tskey ; __be32 ip6_frag_id ; atomic_t dataref ; void *destructor_arg ; skb_frag_t frags[17U] ; }; enum pkt_hash_types { PKT_HASH_TYPE_NONE = 0, PKT_HASH_TYPE_L2 = 1, PKT_HASH_TYPE_L3 = 2, PKT_HASH_TYPE_L4 = 3 } ; enum gro_result { GRO_MERGED = 0, GRO_MERGED_FREE = 1, GRO_HELD = 2, GRO_NORMAL = 3, GRO_DROP = 4 } ; typedef enum gro_result gro_result_t; enum skb_free_reason { SKB_REASON_CONSUMED = 0, SKB_REASON_DROPPED = 1 } ; struct iphdr { unsigned char ihl : 4 ; unsigned char version : 4 ; __u8 tos ; __be16 tot_len ; __be16 id ; __be16 frag_off ; __u8 ttl ; __u8 protocol ; __sum16 check ; __be32 saddr ; __be32 daddr ; }; struct ipv6hdr { unsigned char priority : 4 ; unsigned char version : 4 ; __u8 flow_lbl[3U] ; __be16 payload_len ; __u8 nexthdr ; __u8 hop_limit ; struct in6_addr saddr ; struct in6_addr daddr ; }; struct tcphdr { __be16 source ; __be16 dest ; __be32 seq ; __be32 ack_seq ; unsigned char res1 : 4 ; unsigned char doff : 4 ; unsigned char fin : 1 ; unsigned char syn : 1 ; unsigned char rst : 1 ; unsigned char psh : 1 ; unsigned char ack : 1 ; unsigned char urg : 1 ; unsigned char ece : 1 ; unsigned char cwr : 1 ; __be16 window ; __sum16 check ; __be16 urg_ptr ; }; union __anonunion____missing_field_name_378 { __be32 a4 ; __be32 a6[4U] ; struct in6_addr in6 ; }; struct inetpeer_addr_base { union __anonunion____missing_field_name_378 __annonCompField109 ; }; struct inetpeer_addr { struct inetpeer_addr_base addr ; __u16 family ; }; union __anonunion____missing_field_name_379 { struct list_head gc_list ; struct callback_head gc_rcu ; }; struct __anonstruct____missing_field_name_381 { atomic_t rid ; }; union __anonunion____missing_field_name_380 { struct __anonstruct____missing_field_name_381 __annonCompField111 ; struct callback_head rcu ; struct inet_peer *gc_next ; }; struct inet_peer { struct inet_peer *avl_left ; struct inet_peer *avl_right ; struct inetpeer_addr daddr ; __u32 avl_height ; u32 metrics[16U] ; u32 rate_tokens ; unsigned long rate_last ; union __anonunion____missing_field_name_379 __annonCompField110 ; union __anonunion____missing_field_name_380 __annonCompField112 ; __u32 dtime ; atomic_t refcnt ; }; struct inet_peer_base { struct inet_peer *root ; seqlock_t lock ; int total ; }; struct uncached_list; struct rtable { struct dst_entry dst ; int rt_genid ; unsigned int rt_flags ; __u16 rt_type ; __u8 rt_is_input ; __u8 rt_uses_gateway ; int rt_iif ; __be32 rt_gateway ; u32 rt_pmtu ; struct list_head rt_uncached ; struct uncached_list *rt_uncached_list ; }; struct inet_ehash_bucket { struct hlist_nulls_head chain ; }; struct inet_bind_hashbucket { spinlock_t lock ; struct hlist_head chain ; }; struct inet_listen_hashbucket { spinlock_t lock ; struct hlist_nulls_head head ; }; struct inet_hashinfo { struct inet_ehash_bucket *ehash ; spinlock_t *ehash_locks ; unsigned int ehash_mask ; unsigned int ehash_locks_mask ; struct inet_bind_hashbucket *bhash ; unsigned int bhash_size ; struct kmem_cache *bind_bucket_cachep ; struct inet_listen_hashbucket listening_hash[32U] ; }; union __anonunion____missing_field_name_386 { u8 type_gen ; __be64 last_flit ; }; struct rsp_ctrl { __be32 hdrbuflen_pidx ; __be32 pldbuflen_qid ; union __anonunion____missing_field_name_386 __annonCompField116 ; }; struct fw_wr_hdr { __be32 hi ; __be32 lo ; }; struct fw_eth_tx_pkt_wr { __be32 op_immdlen ; __be32 equiq_to_len16 ; __be64 r3 ; }; struct cpl_tx_pkt_core { __be32 ctrl0 ; __be16 pack ; __be16 len ; __be64 ctrl1 ; }; struct cpl_tx_pkt_lso_core { __be32 lso_ctrl ; __be16 ipid_ofst ; __be16 mss ; __be32 seqno_offset ; __be32 len ; }; struct cpl_tx_pkt_lso { struct work_request_hdr wr ; struct cpl_tx_pkt_lso_core c ; }; struct cpl_rx_pkt { struct rss_header rsshdr ; u8 opcode ; unsigned char iff : 4 ; unsigned char csum_calc : 1 ; unsigned char ipmi_pkt : 1 ; unsigned char vlan_ex : 1 ; unsigned char ip_frag : 1 ; __be16 csum ; __be16 vlan ; __be16 len ; __be32 l2info ; __be16 hdr_len ; __be16 err_vec ; }; struct ulptx_sge_pair { __be32 len[2U] ; __be64 addr[2U] ; }; struct ulptx_sgl { __be32 cmd_nsge ; __be32 len0 ; __be64 addr0 ; struct ulptx_sge_pair sge[0U] ; }; struct tx_sw_desc { struct sk_buff *skb ; struct ulptx_sgl *sgl ; }; struct rx_sw_desc { struct page *page ; dma_addr_t dma_addr ; }; enum hrtimer_restart; struct sockaddr_in6 { unsigned short sin6_family ; __be16 sin6_port ; __be32 sin6_flowinfo ; struct in6_addr sin6_addr ; __u32 sin6_scope_id ; }; struct sockaddr_in { __kernel_sa_family_t sin_family ; __be16 sin_port ; struct in_addr sin_addr ; unsigned char __pad[8U] ; }; union __anonunion___u_377 { struct inet6_dev *__val ; char __c[1U] ; }; struct fw_clip_cmd { __be32 op_to_write ; __be32 alloc_to_len16 ; __be64 ip_hi ; __be64 ip_lo ; __be32 r4[2U] ; }; union __anonunion____missing_field_name_385 { struct sockaddr_in addr ; struct sockaddr_in6 addr6 ; }; struct clip_entry { spinlock_t lock ; atomic_t refcnt ; struct list_head list ; union __anonunion____missing_field_name_385 __annonCompField111 ; }; enum hrtimer_restart; struct queue_port_stats { u64 tso ; u64 tx_csum ; u64 rx_csum ; u64 vlan_ex ; u64 vlan_ins ; u64 gro_pkts ; u64 gro_merged ; }; struct adapter_stats { u64 db_drop ; u64 db_full ; u64 db_empty ; u64 tcp_v4_out_rsts ; u64 tcp_v4_in_segs ; u64 tcp_v4_out_segs ; u64 tcp_v4_retrans_segs ; u64 tcp_v6_out_rsts ; u64 tcp_v6_in_segs ; u64 tcp_v6_out_segs ; u64 tcp_v6_retrans_segs ; u64 frames ; u64 octets ; u64 drops ; u64 rqe_dfr_mod ; u64 rqe_dfr_pkt ; u64 ofld_no_neigh ; u64 ofld_cong_defer ; u64 wc_success ; u64 wc_fail ; }; struct channel_stats { u64 cpl_req ; u64 cpl_rsp ; u64 mac_in_errs ; u64 hdr_in_errs ; u64 tcp_in_errs ; u64 tcp6_in_errs ; u64 tnl_cong_drops ; u64 tnl_tx_drops ; u64 ofld_vlan_drops ; u64 ofld_chan_drops ; u64 octets_ddp ; u64 frames_ddp ; u64 frames_drop ; }; struct _ddebug { char const *modname ; char const *function ; char const *filename ; char const *format ; unsigned int lineno : 18 ; unsigned char flags ; }; enum hrtimer_restart; enum hrtimer_restart; struct call_single_data { struct llist_node llist ; void (*func)(void * ) ; void *info ; unsigned int flags ; }; struct bio_set; struct bio; struct bio_integrity_payload; typedef void bio_end_io_t(struct bio * , int ); struct bvec_iter { sector_t bi_sector ; unsigned int bi_size ; unsigned int bi_idx ; unsigned int bi_bvec_done ; }; union __anonunion____missing_field_name_261 { struct bio_integrity_payload *bi_integrity ; }; struct bio { struct bio *bi_next ; struct block_device *bi_bdev ; unsigned long bi_flags ; unsigned long bi_rw ; struct bvec_iter bi_iter ; unsigned int bi_phys_segments ; unsigned int bi_seg_front_size ; unsigned int bi_seg_back_size ; atomic_t __bi_remaining ; bio_end_io_t *bi_end_io ; void *bi_private ; struct io_context *bi_ioc ; struct cgroup_subsys_state *bi_css ; union __anonunion____missing_field_name_261 __annonCompField80 ; unsigned short bi_vcnt ; unsigned short bi_max_vecs ; atomic_t __bi_cnt ; struct bio_vec *bi_io_vec ; struct bio_set *bi_pool ; struct bio_vec bi_inline_vecs[0U] ; }; struct hd_geometry; struct block_device_operations; struct fcoe_hdr { __u8 fcoe_ver ; __u8 fcoe_resvd[12U] ; __u8 fcoe_sof ; }; struct disk_stats { unsigned long sectors[2U] ; unsigned long ios[2U] ; unsigned long merges[2U] ; unsigned long ticks[2U] ; unsigned long io_ticks ; unsigned long time_in_queue ; }; struct partition_meta_info { char uuid[37U] ; u8 volname[64U] ; }; struct hd_struct { sector_t start_sect ; sector_t nr_sects ; seqcount_t nr_sects_seq ; sector_t alignment_offset ; unsigned int discard_alignment ; struct device __dev ; struct kobject *holder_dir ; int policy ; int partno ; struct partition_meta_info *info ; int make_it_fail ; unsigned long stamp ; atomic_t in_flight[2U] ; struct disk_stats *dkstats ; atomic_t ref ; struct callback_head callback_head ; }; struct disk_part_tbl { struct callback_head callback_head ; int len ; struct hd_struct *last_lookup ; struct hd_struct *part[] ; }; struct disk_events; struct timer_rand_state; struct blk_integrity; struct gendisk { int major ; int first_minor ; int minors ; char disk_name[32U] ; char *(*devnode)(struct gendisk * , umode_t * ) ; unsigned int events ; unsigned int async_events ; struct disk_part_tbl *part_tbl ; struct hd_struct part0 ; struct block_device_operations const *fops ; struct request_queue *queue ; void *private_data ; int flags ; struct device *driverfs_dev ; struct kobject *slave_dir ; struct timer_rand_state *random ; atomic_t sync_io ; struct disk_events *ev ; struct blk_integrity *integrity ; int node_id ; }; struct fprop_local_percpu { struct percpu_counter events ; unsigned int period ; raw_spinlock_t lock ; }; typedef int congested_fn(void * , int ); struct bdi_writeback_congested { unsigned long state ; atomic_t refcnt ; struct backing_dev_info *bdi ; int blkcg_id ; struct rb_node rb_node ; }; union __anonunion____missing_field_name_326 { struct work_struct release_work ; struct callback_head rcu ; }; struct bdi_writeback { struct backing_dev_info *bdi ; unsigned long state ; unsigned long last_old_flush ; struct list_head b_dirty ; struct list_head b_io ; struct list_head b_more_io ; struct list_head b_dirty_time ; spinlock_t list_lock ; struct percpu_counter stat[4U] ; struct bdi_writeback_congested *congested ; unsigned long bw_time_stamp ; unsigned long dirtied_stamp ; unsigned long written_stamp ; unsigned long write_bandwidth ; unsigned long avg_write_bandwidth ; unsigned long dirty_ratelimit ; unsigned long balanced_dirty_ratelimit ; struct fprop_local_percpu completions ; int dirty_exceeded ; spinlock_t work_lock ; struct list_head work_list ; struct delayed_work dwork ; struct percpu_ref refcnt ; struct fprop_local_percpu memcg_completions ; struct cgroup_subsys_state *memcg_css ; struct cgroup_subsys_state *blkcg_css ; struct list_head memcg_node ; struct list_head blkcg_node ; union __anonunion____missing_field_name_326 __annonCompField95 ; }; struct backing_dev_info { struct list_head bdi_list ; unsigned long ra_pages ; unsigned int capabilities ; congested_fn *congested_fn ; void *congested_data ; char *name ; unsigned int min_ratio ; unsigned int max_ratio ; unsigned int max_prop_frac ; atomic_long_t tot_write_bandwidth ; struct bdi_writeback wb ; struct radix_tree_root cgwb_tree ; struct rb_root cgwb_congested_tree ; atomic_t usage_cnt ; wait_queue_head_t wb_waitq ; struct device *dev ; struct timer_list laptop_mode_wb_timer ; struct dentry *debug_dir ; struct dentry *debug_stats ; }; typedef void *mempool_alloc_t(gfp_t , void * ); typedef void mempool_free_t(void * , void * ); struct mempool_s { spinlock_t lock ; int min_nr ; int curr_nr ; void **elements ; void *pool_data ; mempool_alloc_t *alloc ; mempool_free_t *free ; wait_queue_head_t wait ; }; typedef struct mempool_s mempool_t; union __anonunion____missing_field_name_327 { struct list_head q_node ; struct kmem_cache *__rcu_icq_cache ; }; union __anonunion____missing_field_name_328 { struct hlist_node ioc_node ; struct callback_head __rcu_head ; }; struct io_cq { struct request_queue *q ; struct io_context *ioc ; union __anonunion____missing_field_name_327 __annonCompField96 ; union __anonunion____missing_field_name_328 __annonCompField97 ; unsigned int flags ; }; struct io_context { atomic_long_t refcount ; atomic_t active_ref ; atomic_t nr_tasks ; spinlock_t lock ; unsigned short ioprio ; int nr_batch_requests ; unsigned long last_waited ; struct radix_tree_root icq_tree ; struct io_cq *icq_hint ; struct hlist_head icq_list ; struct work_struct release_work ; }; struct bio_integrity_payload { struct bio *bip_bio ; struct bvec_iter bip_iter ; bio_end_io_t *bip_end_io ; unsigned short bip_slab ; unsigned short bip_vcnt ; unsigned short bip_max_vcnt ; unsigned short bip_flags ; struct work_struct bip_work ; struct bio_vec *bip_vec ; struct bio_vec bip_inline_vecs[0U] ; }; struct bio_list { struct bio *head ; struct bio *tail ; }; struct bio_set { struct kmem_cache *bio_slab ; unsigned int front_pad ; mempool_t *bio_pool ; mempool_t *bvec_pool ; mempool_t *bio_integrity_pool ; mempool_t *bvec_integrity_pool ; spinlock_t rescue_lock ; struct bio_list rescue_list ; struct work_struct rescue_work ; struct workqueue_struct *rescue_workqueue ; }; struct bsg_class_device { struct device *class_dev ; struct device *parent ; int minor ; struct request_queue *queue ; struct kref ref ; void (*release)(struct device * ) ; }; struct elevator_queue; struct blk_trace; struct request; struct bsg_job; struct blkcg_gq; struct blk_flush_queue; typedef void rq_end_io_fn(struct request * , int ); struct request_list { struct request_queue *q ; struct blkcg_gq *blkg ; int count[2U] ; int starved[2U] ; mempool_t *rq_pool ; wait_queue_head_t wait[2U] ; unsigned int flags ; }; union __anonunion____missing_field_name_329 { struct call_single_data csd ; unsigned long fifo_time ; }; struct blk_mq_ctx; union __anonunion____missing_field_name_330___0 { struct hlist_node hash ; struct list_head ipi_list ; }; union __anonunion____missing_field_name_331 { struct rb_node rb_node ; void *completion_data ; }; struct __anonstruct_elv_333 { struct io_cq *icq ; void *priv[2U] ; }; struct __anonstruct_flush_334 { unsigned int seq ; struct list_head list ; rq_end_io_fn *saved_end_io ; }; union __anonunion____missing_field_name_332 { struct __anonstruct_elv_333 elv ; struct __anonstruct_flush_334 flush ; }; struct request { struct list_head queuelist ; union __anonunion____missing_field_name_329 __annonCompField98 ; struct request_queue *q ; struct blk_mq_ctx *mq_ctx ; u64 cmd_flags ; unsigned int cmd_type ; unsigned long atomic_flags ; int cpu ; unsigned int __data_len ; sector_t __sector ; struct bio *bio ; struct bio *biotail ; union __anonunion____missing_field_name_330___0 __annonCompField99 ; union __anonunion____missing_field_name_331 __annonCompField100 ; union __anonunion____missing_field_name_332 __annonCompField101 ; struct gendisk *rq_disk ; struct hd_struct *part ; unsigned long start_time ; struct request_list *rl ; unsigned long long start_time_ns ; unsigned long long io_start_time_ns ; unsigned short nr_phys_segments ; unsigned short nr_integrity_segments ; unsigned short ioprio ; void *special ; int tag ; int errors ; unsigned char __cmd[16U] ; unsigned char *cmd ; unsigned short cmd_len ; unsigned int extra_len ; unsigned int sense_len ; unsigned int resid_len ; void *sense ; unsigned long deadline ; struct list_head timeout_list ; unsigned int timeout ; int retries ; rq_end_io_fn *end_io ; void *end_io_data ; struct request *next_rq ; }; struct elevator_type; typedef int elevator_merge_fn(struct request_queue * , struct request ** , struct bio * ); typedef void elevator_merge_req_fn(struct request_queue * , struct request * , struct request * ); typedef void elevator_merged_fn(struct request_queue * , struct request * , int ); typedef int elevator_allow_merge_fn(struct request_queue * , struct request * , struct bio * ); typedef void elevator_bio_merged_fn(struct request_queue * , struct request * , struct bio * ); typedef int elevator_dispatch_fn(struct request_queue * , int ); typedef void elevator_add_req_fn(struct request_queue * , struct request * ); typedef struct request *elevator_request_list_fn(struct request_queue * , struct request * ); typedef void elevator_completed_req_fn(struct request_queue * , struct request * ); typedef int elevator_may_queue_fn(struct request_queue * , int ); typedef void elevator_init_icq_fn(struct io_cq * ); typedef void elevator_exit_icq_fn(struct io_cq * ); typedef int elevator_set_req_fn(struct request_queue * , struct request * , struct bio * , gfp_t ); typedef void elevator_put_req_fn(struct request * ); typedef void elevator_activate_req_fn(struct request_queue * , struct request * ); typedef void elevator_deactivate_req_fn(struct request_queue * , struct request * ); typedef int elevator_init_fn(struct request_queue * , struct elevator_type * ); typedef void elevator_exit_fn(struct elevator_queue * ); typedef void elevator_registered_fn(struct request_queue * ); struct elevator_ops { elevator_merge_fn *elevator_merge_fn ; elevator_merged_fn *elevator_merged_fn ; elevator_merge_req_fn *elevator_merge_req_fn ; elevator_allow_merge_fn *elevator_allow_merge_fn ; elevator_bio_merged_fn *elevator_bio_merged_fn ; elevator_dispatch_fn *elevator_dispatch_fn ; elevator_add_req_fn *elevator_add_req_fn ; elevator_activate_req_fn *elevator_activate_req_fn ; elevator_deactivate_req_fn *elevator_deactivate_req_fn ; elevator_completed_req_fn *elevator_completed_req_fn ; elevator_request_list_fn *elevator_former_req_fn ; elevator_request_list_fn *elevator_latter_req_fn ; elevator_init_icq_fn *elevator_init_icq_fn ; elevator_exit_icq_fn *elevator_exit_icq_fn ; elevator_set_req_fn *elevator_set_req_fn ; elevator_put_req_fn *elevator_put_req_fn ; elevator_may_queue_fn *elevator_may_queue_fn ; elevator_init_fn *elevator_init_fn ; elevator_exit_fn *elevator_exit_fn ; elevator_registered_fn *elevator_registered_fn ; }; struct elv_fs_entry { struct attribute attr ; ssize_t (*show)(struct elevator_queue * , char * ) ; ssize_t (*store)(struct elevator_queue * , char const * , size_t ) ; }; struct elevator_type { struct kmem_cache *icq_cache ; struct elevator_ops ops ; size_t icq_size ; size_t icq_align ; struct elv_fs_entry *elevator_attrs ; char elevator_name[16U] ; struct module *elevator_owner ; char icq_cache_name[21U] ; struct list_head list ; }; struct elevator_queue { struct elevator_type *type ; void *elevator_data ; struct kobject kobj ; struct mutex sysfs_lock ; unsigned char registered : 1 ; struct hlist_head hash[64U] ; }; typedef void request_fn_proc(struct request_queue * ); typedef void make_request_fn(struct request_queue * , struct bio * ); typedef int prep_rq_fn(struct request_queue * , struct request * ); typedef void unprep_rq_fn(struct request_queue * , struct request * ); struct bvec_merge_data { struct block_device *bi_bdev ; sector_t bi_sector ; unsigned int bi_size ; unsigned long bi_rw ; }; typedef int merge_bvec_fn(struct request_queue * , struct bvec_merge_data * , struct bio_vec * ); typedef void softirq_done_fn(struct request * ); typedef int dma_drain_needed_fn(struct request * ); typedef int lld_busy_fn(struct request_queue * ); typedef int bsg_job_fn(struct bsg_job * ); enum blk_eh_timer_return { BLK_EH_NOT_HANDLED = 0, BLK_EH_HANDLED = 1, BLK_EH_RESET_TIMER = 2 } ; typedef enum blk_eh_timer_return rq_timed_out_fn(struct request * ); struct blk_queue_tag { struct request **tag_index ; unsigned long *tag_map ; int busy ; int max_depth ; int real_max_depth ; atomic_t refcnt ; int alloc_policy ; int next_tag ; }; struct queue_limits { unsigned long bounce_pfn ; unsigned long seg_boundary_mask ; unsigned int max_hw_sectors ; unsigned int chunk_sectors ; unsigned int max_sectors ; unsigned int max_segment_size ; unsigned int physical_block_size ; unsigned int alignment_offset ; unsigned int io_min ; unsigned int io_opt ; unsigned int max_discard_sectors ; unsigned int max_write_same_sectors ; unsigned int discard_granularity ; unsigned int discard_alignment ; unsigned short logical_block_size ; unsigned short max_segments ; unsigned short max_integrity_segments ; unsigned char misaligned ; unsigned char discard_misaligned ; unsigned char cluster ; unsigned char discard_zeroes_data ; unsigned char raid_partial_stripes_expensive ; }; struct blk_mq_ops; struct blk_mq_hw_ctx; struct throtl_data; struct blk_mq_tag_set; struct request_queue { struct list_head queue_head ; struct request *last_merge ; struct elevator_queue *elevator ; int nr_rqs[2U] ; int nr_rqs_elvpriv ; struct request_list root_rl ; request_fn_proc *request_fn ; make_request_fn *make_request_fn ; prep_rq_fn *prep_rq_fn ; unprep_rq_fn *unprep_rq_fn ; merge_bvec_fn *merge_bvec_fn ; softirq_done_fn *softirq_done_fn ; rq_timed_out_fn *rq_timed_out_fn ; dma_drain_needed_fn *dma_drain_needed ; lld_busy_fn *lld_busy_fn ; struct blk_mq_ops *mq_ops ; unsigned int *mq_map ; struct blk_mq_ctx *queue_ctx ; unsigned int nr_queues ; struct blk_mq_hw_ctx **queue_hw_ctx ; unsigned int nr_hw_queues ; sector_t end_sector ; struct request *boundary_rq ; struct delayed_work delay_work ; struct backing_dev_info backing_dev_info ; void *queuedata ; unsigned long queue_flags ; int id ; gfp_t bounce_gfp ; spinlock_t __queue_lock ; spinlock_t *queue_lock ; struct kobject kobj ; struct kobject mq_kobj ; struct device *dev ; int rpm_status ; unsigned int nr_pending ; unsigned long nr_requests ; unsigned int nr_congestion_on ; unsigned int nr_congestion_off ; unsigned int nr_batching ; unsigned int dma_drain_size ; void *dma_drain_buffer ; unsigned int dma_pad_mask ; unsigned int dma_alignment ; struct blk_queue_tag *queue_tags ; struct list_head tag_busy_list ; unsigned int nr_sorted ; unsigned int in_flight[2U] ; unsigned int request_fn_active ; unsigned int rq_timeout ; struct timer_list timeout ; struct list_head timeout_list ; struct list_head icq_list ; unsigned long blkcg_pols[1U] ; struct blkcg_gq *root_blkg ; struct list_head blkg_list ; struct queue_limits limits ; unsigned int sg_timeout ; unsigned int sg_reserved_size ; int node ; struct blk_trace *blk_trace ; unsigned int flush_flags ; unsigned char flush_not_queueable : 1 ; struct blk_flush_queue *fq ; struct list_head requeue_list ; spinlock_t requeue_lock ; struct work_struct requeue_work ; struct mutex sysfs_lock ; int bypass_depth ; atomic_t mq_freeze_depth ; bsg_job_fn *bsg_job_fn ; int bsg_job_size ; struct bsg_class_device bsg_dev ; struct throtl_data *td ; struct callback_head callback_head ; wait_queue_head_t mq_freeze_wq ; struct percpu_ref mq_usage_counter ; struct list_head all_q_node ; struct blk_mq_tag_set *tag_set ; struct list_head tag_set_list ; }; struct blk_plug { struct list_head list ; struct list_head mq_list ; struct list_head cb_list ; }; struct blk_integrity_iter { void *prot_buf ; void *data_buf ; sector_t seed ; unsigned int data_size ; unsigned short interval ; char const *disk_name ; }; typedef int integrity_processing_fn(struct blk_integrity_iter * ); struct blk_integrity { integrity_processing_fn *generate_fn ; integrity_processing_fn *verify_fn ; unsigned short flags ; unsigned short tuple_size ; unsigned short interval ; unsigned short tag_size ; char const *name ; struct kobject kobj ; }; struct block_device_operations { int (*open)(struct block_device * , fmode_t ) ; void (*release)(struct gendisk * , fmode_t ) ; int (*rw_page)(struct block_device * , sector_t , struct page * , int ) ; int (*ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; long (*direct_access)(struct block_device * , sector_t , void ** , unsigned long * , long ) ; unsigned int (*check_events)(struct gendisk * , unsigned int ) ; int (*media_changed)(struct gendisk * ) ; void (*unlock_native_capacity)(struct gendisk * ) ; int (*revalidate_disk)(struct gendisk * ) ; int (*getgeo)(struct block_device * , struct hd_geometry * ) ; void (*swap_slot_free_notify)(struct block_device * , unsigned long ) ; struct module *owner ; }; struct blk_mq_tags; struct blk_mq_cpu_notifier { struct list_head list ; void *data ; int (*notify)(void * , unsigned long , unsigned int ) ; }; struct blk_align_bitmap; struct blk_mq_ctxmap { unsigned int size ; unsigned int bits_per_word ; struct blk_align_bitmap *map ; }; struct __anonstruct____missing_field_name_336 { spinlock_t lock ; struct list_head dispatch ; }; struct blk_mq_hw_ctx { struct __anonstruct____missing_field_name_336 __annonCompField102 ; unsigned long state ; struct delayed_work run_work ; struct delayed_work delay_work ; cpumask_var_t cpumask ; int next_cpu ; int next_cpu_batch ; unsigned long flags ; struct request_queue *queue ; struct blk_flush_queue *fq ; void *driver_data ; struct blk_mq_ctxmap ctx_map ; unsigned int nr_ctx ; struct blk_mq_ctx **ctxs ; atomic_t wait_index ; struct blk_mq_tags *tags ; unsigned long queued ; unsigned long run ; unsigned long dispatched[10U] ; unsigned int numa_node ; unsigned int queue_num ; atomic_t nr_active ; struct blk_mq_cpu_notifier cpu_notifier ; struct kobject kobj ; }; struct blk_mq_tag_set { struct blk_mq_ops *ops ; unsigned int nr_hw_queues ; unsigned int queue_depth ; unsigned int reserved_tags ; unsigned int cmd_size ; int numa_node ; unsigned int timeout ; unsigned int flags ; void *driver_data ; struct blk_mq_tags **tags ; struct mutex tag_list_lock ; struct list_head tag_list ; }; struct blk_mq_queue_data { struct request *rq ; struct list_head *list ; bool last ; }; typedef int queue_rq_fn(struct blk_mq_hw_ctx * , struct blk_mq_queue_data const * ); typedef struct blk_mq_hw_ctx *map_queue_fn(struct request_queue * , int const ); typedef enum blk_eh_timer_return timeout_fn(struct request * , bool ); typedef int init_hctx_fn(struct blk_mq_hw_ctx * , void * , unsigned int ); typedef void exit_hctx_fn(struct blk_mq_hw_ctx * , unsigned int ); typedef int init_request_fn(void * , struct request * , unsigned int , unsigned int , unsigned int ); typedef void exit_request_fn(void * , struct request * , unsigned int , unsigned int ); struct blk_mq_ops { queue_rq_fn *queue_rq ; map_queue_fn *map_queue ; timeout_fn *timeout ; softirq_done_fn *complete ; init_hctx_fn *init_hctx ; exit_hctx_fn *exit_hctx ; init_request_fn *init_request ; exit_request_fn *exit_request ; }; enum hrtimer_restart; struct fw_devlog_e { __be64 timestamp ; __be32 seqno ; __be16 reserved1 ; __u8 level ; __u8 facility ; __u8 fmt[192U] ; __be32 params[8U] ; __be32 reserved3[4U] ; }; struct t4_debugfs_entry { char const *name ; struct file_operations const *ops ; umode_t mode ; unsigned char data ; }; struct seq_tab { int (*show)(struct seq_file * , void * , int ) ; unsigned int rows ; unsigned char width ; unsigned char skip_first ; char data[0U] ; }; struct field_desc { char const *name ; unsigned int start ; unsigned int width ; }; struct devlog_info { unsigned int nentries ; unsigned int first ; struct fw_devlog_e log[0U] ; }; struct rss_pf_conf { u32 rss_pf_map ; u32 rss_pf_mask ; u32 rss_pf_config ; }; struct rss_vf_conf { u32 rss_vf_vfl ; u32 rss_vf_vfh ; }; typedef int ldv_func_ret_type___15; typedef int ldv_func_ret_type___16; typedef int ldv_func_ret_type___17; typedef int ldv_func_ret_type___18; typedef int ldv_func_ret_type___19; typedef int ldv_func_ret_type___20; typedef int ldv_func_ret_type___21; typedef int ldv_func_ret_type___22; typedef int ldv_func_ret_type___23; typedef int ldv_func_ret_type___24; typedef int ldv_func_ret_type___25; __inline static long ldv__builtin_expect(long exp , long c ) ; extern struct module __this_module ; __inline static void __set_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile ("bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void clear_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static void __clear_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile ("btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static int test_and_set_bit(long nr , unsigned long volatile *addr ) { char c ; { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; bts %2, %0; setc %1": "+m" (*addr), "=qm" (c): "Ir" (nr): "memory"); return ((int )((signed char )c) != 0); } } __inline static int constant_test_bit(long nr , unsigned long const volatile *addr ) { { return ((int )((unsigned long )*(addr + (unsigned long )(nr >> 6)) >> ((int )nr & 63)) & 1); } } __inline static int fls(int x ) { int r ; { __asm__ ("bsrl %1,%0": "=r" (r): "rm" (x), "0" (-1)); return (r + 1); } } __inline static int fls64(__u64 x ) { int bitpos ; { bitpos = -1; __asm__ ("bsrq %1,%q0": "+r" (bitpos): "rm" (x)); return (bitpos + 1); } } extern unsigned long find_next_zero_bit(unsigned long const * , unsigned long , unsigned long ) ; extern unsigned long find_first_zero_bit(unsigned long const * , unsigned long ) ; __inline static unsigned int __arch_hweight32(unsigned int w ) { unsigned int res ; { res = 0U; __asm__ ("661:\n\tcall __sw_hweight32\n662:\n.skip -(((6651f-6641f)-(662b-661b)) > 0) * ((6651f-6641f)-(662b-661b)),0x90\n663:\n.pushsection .altinstructions,\"a\"\n .long 661b - .\n .long 6641f - .\n .word ( 4*32+23)\n .byte 663b-661b\n .byte 6651f-6641f\n .byte 663b-662b\n.popsection\n.pushsection .altinstr_replacement, \"ax\"\n6641:\n\t.byte 0xf3,0x40,0x0f,0xb8,0xc7\n6651:\n\t.popsection": "=a" (res): "D" (w)); return (res); } } __inline static __u32 __arch_swab32(__u32 val ) { { __asm__ ("bswapl %0": "=r" (val): "0" (val)); return (val); } } __inline static __u64 __arch_swab64(__u64 val ) { { __asm__ ("bswapq %0": "=r" (val): "0" (val)); return (val); } } __inline static __u16 __fswab16(__u16 val ) { { return ((__u16 )((int )((short )((int )val << 8)) | (int )((short )((int )val >> 8)))); } } __inline static __u32 __fswab32(__u32 val ) { __u32 tmp ; { tmp = __arch_swab32(val); return (tmp); } } __inline static __u64 __fswab64(__u64 val ) { __u64 tmp ; { tmp = __arch_swab64(val); return (tmp); } } __inline static unsigned int fls_long(unsigned long l ) { int tmp___0 ; { tmp___0 = fls64((__u64 )l); return ((unsigned int )tmp___0); } } __inline static int __ilog2_u32(u32 n ) { int tmp ; { tmp = fls((int )n); return (tmp + -1); } } __inline static unsigned long __roundup_pow_of_two(unsigned long n ) { unsigned int tmp ; { tmp = fls_long(n - 1UL); return (1UL << (int )tmp); } } extern int printk(char const * , ...) ; extern int sprintf(char * , char const * , ...) ; extern int snprintf(char * , size_t , char const * , ...) ; bool ldv_is_err(void const *ptr ) ; bool ldv_is_err_or_null(void const *ptr ) ; long ldv_ptr_err(void const *ptr ) ; __inline static void INIT_LIST_HEAD(struct list_head *list ) { { list->next = list; list->prev = list; return; } } extern void __list_add(struct list_head * , struct list_head * , struct list_head * ) ; __inline static void list_add_tail(struct list_head *new , struct list_head *head ) { { __list_add(new, head->prev, head); return; } } extern void __list_del_entry(struct list_head * ) ; extern void list_del(struct list_head * ) ; __inline static int list_empty(struct list_head const *head ) { { return ((unsigned long )((struct list_head const *)head->next) == (unsigned long )head); } } extern void __bad_percpu_size(void) ; extern void __bad_size_call_parameter(void) ; extern struct task_struct *current_task ; __inline static struct task_struct *get_current(void) { struct task_struct *pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& current_task)); goto ldv_3129; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_3129; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_3129; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_3129; default: __bad_percpu_size(); } ldv_3129: ; return (pfo_ret__); } } extern void *memcpy(void * , void const * , size_t ) ; extern void *memset(void * , int , size_t ) ; extern int __bitmap_weight(unsigned long const * , unsigned int ) ; extern int bitmap_find_free_region(unsigned long * , unsigned int , int ) ; extern void bitmap_release_region(unsigned long * , unsigned int , int ) ; __inline static void bitmap_zero(unsigned long *dst , unsigned int nbits ) { unsigned int len ; { len = (unsigned int )(((unsigned long )nbits + 63UL) / 64UL) * 8U; memset((void *)dst, 0, (size_t )len); return; } } __inline static int bitmap_weight(unsigned long const *src , unsigned int nbits ) { int tmp___0 ; { tmp___0 = __bitmap_weight(src, nbits); return (tmp___0); } } extern int nr_cpu_ids ; extern struct cpumask const * const cpu_online_mask ; __inline static unsigned int cpumask_weight(struct cpumask const *srcp ) { int tmp ; { tmp = bitmap_weight((unsigned long const *)(& srcp->bits), (unsigned int )nr_cpu_ids); return ((unsigned int )tmp); } } __inline static long PTR_ERR(void const *ptr ) ; __inline static bool IS_ERR(void const *ptr ) ; __inline static bool IS_ERR_OR_NULL(void const *ptr ) ; extern void __xchg_wrong_size(void) ; __inline static void atomic_set(atomic_t *v , int i ) { { v->counter = i; return; } } __inline static void atomic_dec(atomic_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; decl %0": "+m" (v->counter)); return; } } extern int __preempt_count ; __inline static void __preempt_count_add(int val ) { int pao_ID__ ; { pao_ID__ = 0; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%0": "+m" (__preempt_count): "qi" (val)); } goto ldv_6059; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%0": "+m" (__preempt_count): "ri" (val)); } goto ldv_6059; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%0": "+m" (__preempt_count): "ri" (val)); } goto ldv_6059; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%0": "+m" (__preempt_count): "re" (val)); } goto ldv_6059; default: __bad_percpu_size(); } ldv_6059: ; return; } } __inline static void __preempt_count_sub(int val ) { int pao_ID__ ; { pao_ID__ = 0; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%0": "+m" (__preempt_count): "qi" (- val)); } goto ldv_6071; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6071; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6071; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%0": "+m" (__preempt_count): "re" (- val)); } goto ldv_6071; default: __bad_percpu_size(); } ldv_6071: ; return; } } extern void __local_bh_disable_ip(unsigned long , unsigned int ) ; __inline static void local_bh_disable(void) { { __local_bh_disable_ip(0UL, 512U); return; } } extern void __local_bh_enable_ip(unsigned long , unsigned int ) ; __inline static void local_bh_enable(void) { { __local_bh_enable_ip(0UL, 512U); return; } } extern void lockdep_init_map(struct lockdep_map * , char const * , struct lock_class_key * , int ) ; extern void lock_acquire(struct lockdep_map * , unsigned int , int , int , int , struct lockdep_map * , unsigned long ) ; extern void lock_release(struct lockdep_map * , int , unsigned long ) ; extern void lockdep_rcu_suspicious(char const * , int const , char const * ) ; extern void __raw_spin_lock_init(raw_spinlock_t * , char const * , struct lock_class_key * ) ; extern void _raw_spin_lock(raw_spinlock_t * ) ; extern void _raw_spin_lock_bh(raw_spinlock_t * ) ; extern void _raw_spin_lock_irq(raw_spinlock_t * ) ; extern unsigned long _raw_spin_lock_irqsave(raw_spinlock_t * ) ; extern void _raw_spin_unlock(raw_spinlock_t * ) ; extern void _raw_spin_unlock_bh(raw_spinlock_t * ) ; extern void _raw_spin_unlock_irq(raw_spinlock_t * ) ; extern void _raw_spin_unlock_irqrestore(raw_spinlock_t * , unsigned long ) ; __inline static raw_spinlock_t *spinlock_check(spinlock_t *lock ) { { return (& lock->__annonCompField18.rlock); } } __inline static void spin_lock(spinlock_t *lock ) { { _raw_spin_lock(& lock->__annonCompField18.rlock); return; } } __inline static void spin_lock_bh(spinlock_t *lock ) { { _raw_spin_lock_bh(& lock->__annonCompField18.rlock); return; } } __inline static void spin_lock_irq(spinlock_t *lock ) { { _raw_spin_lock_irq(& lock->__annonCompField18.rlock); return; } } __inline static void spin_unlock(spinlock_t *lock ) { { _raw_spin_unlock(& lock->__annonCompField18.rlock); return; } } __inline static void spin_unlock_bh(spinlock_t *lock ) { { _raw_spin_unlock_bh(& lock->__annonCompField18.rlock); return; } } __inline static void spin_unlock_irq(spinlock_t *lock ) { { _raw_spin_unlock_irq(& lock->__annonCompField18.rlock); return; } } __inline static void spin_unlock_irqrestore(spinlock_t *lock , unsigned long flags ) { { _raw_spin_unlock_irqrestore(& lock->__annonCompField18.rlock, flags); return; } } extern void mutex_lock_nested(struct mutex * , unsigned int ) ; extern void mutex_unlock(struct mutex * ) ; extern unsigned long __usecs_to_jiffies(unsigned int const ) ; __inline static unsigned long usecs_to_jiffies(unsigned int const u ) { unsigned long tmp___1 ; { tmp___1 = __usecs_to_jiffies(u); return (tmp___1); } } extern void synchronize_sched(void) ; __inline static void __rcu_read_lock(void) { { __preempt_count_add(1); __asm__ volatile ("": : : "memory"); return; } } __inline static void __rcu_read_unlock(void) { { __asm__ volatile ("": : : "memory"); __preempt_count_sub(1); return; } } __inline static void synchronize_rcu(void) { { synchronize_sched(); return; } } extern bool rcu_is_watching(void) ; __inline static void rcu_lock_acquire(struct lockdep_map *map ) { { lock_acquire(map, 0U, 0, 2, 0, (struct lockdep_map *)0, 0UL); return; } } __inline static void rcu_lock_release(struct lockdep_map *map ) { { lock_release(map, 1, 0UL); return; } } extern struct lockdep_map rcu_lock_map ; extern int debug_lockdep_rcu_enabled(void) ; __inline static void rcu_read_lock(void) { bool __warned ; int tmp ; bool tmp___0 ; int tmp___1 ; { __rcu_read_lock(); rcu_lock_acquire(& rcu_lock_map); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0 && ! __warned) { tmp___0 = rcu_is_watching(); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { __warned = 1; lockdep_rcu_suspicious("include/linux/rcupdate.h", 849, "rcu_read_lock() used illegally while idle"); } else { } } else { } return; } } __inline static void rcu_read_unlock(void) { bool __warned ; int tmp ; bool tmp___0 ; int tmp___1 ; { tmp = debug_lockdep_rcu_enabled(); if (tmp != 0 && ! __warned) { tmp___0 = rcu_is_watching(); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { __warned = 1; lockdep_rcu_suspicious("include/linux/rcupdate.h", 900, "rcu_read_unlock() used illegally while idle"); } else { } } else { } __rcu_read_unlock(); rcu_lock_release(& rcu_lock_map); return; } } extern void __init_work(struct work_struct * , int ) ; extern struct workqueue_struct *__alloc_workqueue_key(char const * , unsigned int , int , struct lock_class_key * , char const * , ...) ; extern void destroy_workqueue(struct workqueue_struct * ) ; void ldv_destroy_workqueue_35(struct workqueue_struct *ldv_func_arg1 ) ; void ldv_destroy_workqueue_36(struct workqueue_struct *ldv_func_arg1 ) ; extern bool queue_work_on(int , struct workqueue_struct * , struct work_struct * ) ; bool ldv_queue_work_on_5(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_7(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; extern bool queue_delayed_work_on(int , struct workqueue_struct * , struct delayed_work * , unsigned long ) ; bool ldv_queue_delayed_work_on_6(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_9(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; extern void flush_workqueue(struct workqueue_struct * ) ; void ldv_flush_workqueue_8(struct workqueue_struct *ldv_func_arg1 ) ; extern bool cancel_work_sync(struct work_struct * ) ; bool ldv_cancel_work_sync_30(struct work_struct *ldv_func_arg1 ) ; bool ldv_cancel_work_sync_31(struct work_struct *ldv_func_arg1 ) ; bool ldv_cancel_work_sync_32(struct work_struct *ldv_func_arg1 ) ; __inline static bool queue_work(struct workqueue_struct *wq , struct work_struct *work ) { bool tmp ; { tmp = ldv_queue_work_on_5(8192, wq, work); return (tmp); } } __inline static unsigned int readl(void const volatile *addr ) { unsigned int ret ; { __asm__ volatile ("movl %1,%0": "=r" (ret): "m" (*((unsigned int volatile *)addr)): "memory"); return (ret); } } __inline static void writel(unsigned int val , void volatile *addr ) { { __asm__ volatile ("movl %0,%1": : "r" (val), "m" (*((unsigned int volatile *)addr)): "memory"); return; } } extern void iounmap(void volatile * ) ; extern void *ioremap_wc(resource_size_t , unsigned long ) ; extern int cpu_number ; __inline static char const *kobject_name(struct kobject const *kobj ) { { return ((char const *)kobj->name); } } extern void __list_add_rcu(struct list_head * , struct list_head * , struct list_head * ) ; __inline static void list_add_tail_rcu(struct list_head *new , struct list_head *head ) { { __list_add_rcu(new, head->prev, head); return; } } __inline static void list_del_rcu(struct list_head *entry ) { { __list_del_entry(entry); entry->prev = (struct list_head *)-2401263026316508672L; return; } } extern long schedule_timeout(long ) ; extern long schedule_timeout_uninterruptible(long ) ; extern void kfree(void const * ) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *kmalloc(size_t size , gfp_t flags ) { void *tmp___2 ; { tmp___2 = __kmalloc(size, flags); return (tmp___2); } } __inline static void *kmalloc_array(size_t n , size_t size , gfp_t flags ) { void *tmp ; { if (size != 0UL && 0xffffffffffffffffUL / size < n) { return ((void *)0); } else { } tmp = __kmalloc(n * size, flags); return (tmp); } } __inline static void *kcalloc(size_t n , size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc_array(n, size, flags | 32768U); return (tmp); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc(size, flags | 32768U); return (tmp); } } extern void *malloc(size_t ) ; extern void *calloc(size_t , size_t ) ; extern int __VERIFIER_nondet_int(void) ; extern unsigned long __VERIFIER_nondet_ulong(void) ; extern void *__VERIFIER_nondet_pointer(void) ; extern void __VERIFIER_assume(int ) ; void *ldv_malloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return ((void *)0); } else { tmp = malloc(size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } void *ldv_zalloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return ((void *)0); } else { tmp = calloc(1UL, size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } void *ldv_init_zalloc(size_t size ) { void *p ; void *tmp ; { tmp = calloc(1UL, size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } void *ldv_memset(void *s , int c , size_t n ) { void *tmp ; { tmp = memset(s, c, n); return (tmp); } } int ldv_undef_int(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); return (tmp); } } void *ldv_undef_ptr(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); return (tmp); } } unsigned long ldv_undef_ulong(void) { unsigned long tmp ; { tmp = __VERIFIER_nondet_ulong(); return (tmp); } } __inline static void ldv_stop(void) { { LDV_STOP: ; goto LDV_STOP; } } __inline static long ldv__builtin_expect(long exp , long c ) { { return (exp); } } struct work_struct *ldv_work_struct_9_2 ; struct inode *rss_debugfs_fops_group1 ; struct inode *flash_debugfs_fops_group1 ; int ldv_state_variable_47 ; int ldv_timer_11_0 ; int ldv_state_variable_20 ; struct file *clip_tbl_debugfs_fops_group2 ; struct ethtool_pauseparam *cxgb_ethtool_ops_group3 ; int ldv_irq_5_1 = 0; struct file *cim_obq_fops_group2 ; struct timer_list *ldv_timer_list_10_2 ; loff_t *devlog_seq_ops_group3 ; struct inode *mps_tcam_debugfs_fops_group1 ; struct inode *devlog_fops_group1 ; int ldv_irq_line_4_2 ; struct inode *cim_qcfg_fops_group1 ; int ldv_irq_3_2 = 0; int ldv_work_9_3 ; int ldv_irq_6_1 = 0; int ldv_state_variable_14 ; int ldv_irq_line_6_2 ; int ldv_state_variable_37 ; int ldv_state_variable_17 ; struct inode *cim_pif_la_fops_group1 ; void *ldv_irq_data_6_0 ; void *ldv_irq_data_2_3 ; int ldv_work_7_2 ; int ldv_state_variable_19 ; int ldv_state_variable_27 ; int ldv_state_variable_9 ; struct work_struct *ldv_work_struct_7_1 ; struct timer_list *ldv_timer_list_11_1 ; int ldv_state_variable_42 ; void *ldv_irq_data_2_2 ; struct file *pm_stats_debugfs_fops_group2 ; void *sge_qinfo_seq_ops_group2 ; int ldv_state_variable_7 ; struct inode *mbox_debugfs_fops_group1 ; int ldv_irq_1_3 = 0; int ldv_irq_line_2_2 ; struct net_device *cxgb4_dcb_ops_group0 ; void *ldv_irq_data_5_2 ; struct file *t4_l2t_fops_group2 ; struct inode *pm_stats_debugfs_fops_group1 ; struct file *tx_rate_debugfs_fops_group2 ; void *ldv_irq_data_1_0 ; struct seq_file *seq_tab_ops_group1 ; struct ethtool_ringparam *cxgb_ethtool_ops_group0 ; void *ldv_irq_data_3_0 ; struct file *cim_qcfg_fops_group2 ; struct work_struct *ldv_work_struct_7_2 ; int ldv_state_variable_26 ; struct inode *cim_ma_la_fops_group1 ; struct ieee_ets *cxgb4_dcb_ops_group3 ; int ldv_state_variable_28 ; struct inode *clk_debugfs_fops_group1 ; struct work_struct *ldv_work_struct_7_0 ; int ldv_timer_10_2 ; struct net_device *cxgb4_netdev_ops_group1 ; int LDV_IN_INTERRUPT = 1; int ldv_irq_1_1 = 0; int ldv_work_8_3 ; int ldv_irq_line_3_1 ; struct file *mbox_debugfs_fops_group2 ; struct file *cim_ma_la_fops_group2 ; struct inode *sge_qinfo_debugfs_fops_group1 ; int ldv_work_7_1 ; int ldv_state_variable_31 ; int ldv_irq_4_1 = 0; int ldv_state_variable_8 ; int ldv_state_variable_46 ; struct pci_dev *cxgb4_driver_group1 ; int ldv_state_variable_15 ; int ldv_irq_line_5_0 ; struct inode *sensors_debugfs_fops_group1 ; int ldv_work_8_0 ; struct inode *rss_config_debugfs_fops_group1 ; int ldv_state_variable_21 ; int ldv_state_variable_33 ; struct inode *cim_obq_fops_group1 ; loff_t *mps_tcam_seq_ops_group3 ; struct timer_list *ldv_timer_list_11_2 ; struct file *rss_key_debugfs_fops_group2 ; struct work_struct *ldv_work_struct_8_0 ; void *ldv_irq_data_4_0 ; int ldv_irq_line_6_3 ; struct file *rss_config_debugfs_fops_group2 ; struct inode *rss_key_debugfs_fops_group1 ; struct inode *blocked_fl_fops_group1 ; void *seq_tab_ops_group2 ; struct seq_file *sge_qinfo_seq_ops_group1 ; int ldv_irq_4_0 = 0; struct file *cim_ibq_fops_group2 ; int ldv_irq_2_2 = 0; struct timer_list *ldv_timer_list_11_0 ; int ldv_irq_line_2_0 ; int ldv_irq_line_4_0 ; int ldv_irq_line_6_1 ; int ldv_irq_line_3_0 ; int ldv_state_variable_41 ; int ldv_state_variable_40 ; void *ldv_irq_data_6_1 ; int ldv_timer_10_0 ; struct file *sensors_debugfs_fops_group2 ; void *ldv_irq_data_3_3 ; int ldv_irq_line_3_2 ; int ldv_state_variable_10 ; int ldv_irq_1_0 = 0; int ldv_work_7_0 ; int ldv_timer_11_3 ; struct inode *cim_ibq_fops_group1 ; int ldv_irq_line_2_1 ; void *ldv_irq_data_6_2 ; struct work_struct *ldv_work_struct_7_3 ; int ldv_state_variable_2 ; int ldv_state_variable_25 ; int ldv_timer_10_1 ; struct pci_dev *cxgb4_eeh_group0 ; struct file *blocked_fl_fops_group2 ; void *ldv_irq_data_2_0 ; struct ethtool_eeprom *cxgb_ethtool_ops_group2 ; struct inode *rss_vf_config_debugfs_fops_group1 ; int ldv_state_variable_11 ; struct inode *mem_debugfs_fops_group1 ; int ldv_irq_1_2 = 0; int ldv_irq_4_3 = 0; int ldv_state_variable_18 ; void *devlog_seq_ops_group2 ; struct file *rss_pf_config_debugfs_fops_group2 ; struct timer_list *ldv_timer_list_10_3 ; int ldv_irq_6_0 = 0; int ldv_irq_line_4_1 ; struct work_struct *ldv_work_struct_9_1 ; int ldv_irq_line_5_3 ; int ldv_state_variable_32 ; int pci_counter ; int ldv_irq_line_6_0 ; int ldv_state_variable_30 ; int ldv_work_8_1 ; int ldv_state_variable_0 ; int ldv_state_variable_45 ; void *ldv_irq_data_5_3 ; int ldv_irq_2_0 = 0; int ldv_state_variable_12 ; loff_t *seq_tab_ops_group3 ; struct seq_file *mps_tcam_seq_ops_group1 ; int ldv_irq_line_4_3 ; struct seq_file *l2t_seq_ops_group1 ; int ldv_state_variable_22 ; struct file *rss_debugfs_fops_group2 ; int ldv_state_variable_29 ; struct net_device *cxgb_ethtool_ops_group5 ; struct work_struct *ldv_work_struct_8_1 ; int ldv_work_9_0 ; int ref_cnt ; int ldv_irq_line_1_1 ; struct file *mps_tcam_debugfs_fops_group2 ; int ldv_irq_6_3 = 0; struct work_struct *ldv_work_struct_8_3 ; struct seq_file *devlog_seq_ops_group1 ; int ldv_state_variable_23 ; int ldv_irq_5_2 = 0; struct timer_list *ldv_timer_list_10_0 ; void *mps_tcam_seq_ops_group2 ; int ldv_irq_2_1 = 0; int ldv_irq_3_0 = 0; void *ldv_irq_data_2_1 ; int ldv_timer_11_2 ; int ldv_state_variable_6 ; struct file *rss_vf_config_debugfs_fops_group2 ; void *ldv_irq_data_1_3 ; struct inode *clip_tbl_debugfs_fops_group1 ; int ldv_state_variable_50 ; void *ldv_irq_data_5_0 ; void *l2t_seq_ops_group2 ; struct file *ulprx_la_fops_group2 ; int ldv_state_variable_44 ; void *ldv_irq_data_4_1 ; int ldv_state_variable_38 ; struct inode *cim_la_fops_group1 ; int ldv_state_variable_39 ; struct ethtool_cmd *cxgb_ethtool_ops_group1 ; struct timer_list *ldv_timer_list_10_1 ; int ldv_state_variable_3 ; struct inode *cctrl_tbl_debugfs_fops_group1 ; int ldv_irq_line_1_0 ; void *ldv_irq_data_3_2 ; void *ldv_irq_data_6_3 ; struct file *devlog_fops_group2 ; struct inode *tp_la_fops_group1 ; struct inode *tx_rate_debugfs_fops_group1 ; int ldv_state_variable_4 ; struct work_struct *ldv_work_struct_9_0 ; struct work_struct *ldv_work_struct_9_3 ; int ldv_irq_line_3_3 ; int ldv_state_variable_36 ; int ldv_work_9_2 ; struct inode *t4_l2t_fops_group1 ; struct inode *rss_pf_config_debugfs_fops_group1 ; int ldv_state_variable_48 ; int ldv_work_9_1 ; int ldv_state_variable_5 ; struct file *mem_debugfs_fops_group2 ; int ldv_timer_11_1 ; int ldv_state_variable_13 ; int ldv_irq_3_1 = 0; struct file *cim_pif_la_fops_group2 ; struct ieee_pfc *cxgb4_dcb_ops_group2 ; int ldv_irq_line_5_2 ; void *ldv_irq_data_4_3 ; int ldv_irq_4_2 = 0; struct ethtool_coalesce *cxgb_ethtool_ops_group4 ; struct file *flash_debugfs_fops_group2 ; int ldv_state_variable_49 ; int ldv_work_7_3 ; int ldv_state_variable_24 ; struct file *clk_debugfs_fops_group2 ; int ldv_irq_6_2 = 0; int ldv_state_variable_1 ; int ldv_irq_line_1_2 ; int ldv_irq_line_2_3 ; void *ldv_irq_data_1_1 ; void *ldv_irq_data_4_2 ; void *ldv_irq_data_3_1 ; void *ldv_irq_data_5_1 ; struct work_struct *ldv_work_struct_8_2 ; int ldv_state_variable_16 ; loff_t *sge_qinfo_seq_ops_group3 ; int ldv_state_variable_43 ; void *ldv_irq_data_1_2 ; int ldv_irq_5_3 = 0; int ldv_irq_line_5_1 ; loff_t *l2t_seq_ops_group3 ; struct inode *ulprx_la_fops_group1 ; int ldv_irq_2_3 = 0; struct file *tp_la_fops_group2 ; struct file *cim_la_fops_group2 ; struct file *cctrl_tbl_debugfs_fops_group2 ; int ldv_irq_line_1_3 ; int ldv_irq_5_0 = 0; struct timer_list *ldv_timer_list_11_3 ; struct dcb_app *cxgb4_dcb_ops_group1 ; int ldv_work_8_2 ; int ldv_state_variable_34 ; struct file *sge_qinfo_debugfs_fops_group2 ; int ldv_timer_10_3 ; int ldv_irq_3_3 = 0; int ldv_state_variable_35 ; void ldv_file_operations_20(void) ; void activate_suitable_irq_4(int line , void *data ) ; int ldv_irq_3(int state , int line , void *data ) ; void ldv_file_operations_26(void) ; void disable_suitable_irq_2(int line , void *data ) ; void ldv_initialize_ethtool_ops_43(void) ; void activate_suitable_irq_3(int line , void *data ) ; int reg_check_1(irqreturn_t (*handler)(int , void * ) ) ; void choose_interrupt_4(void) ; void work_init_9(void) ; void invoke_work_8(void) ; void ldv_file_operations_40(void) ; void ldv_file_operations_16(void) ; void disable_work_7(struct work_struct *work ) ; void ldv_file_operations_17(void) ; int ldv_irq_6(int state , int line , void *data ) ; void activate_suitable_irq_6(int line , void *data ) ; void ldv_file_operations_12(void) ; void ldv_file_operations_34(void) ; void ldv_file_operations_39(void) ; void call_and_disable_work_7(struct work_struct *work ) ; void choose_interrupt_5(void) ; void disable_suitable_irq_5(int line , void *data ) ; void activate_suitable_irq_2(int line , void *data ) ; int ldv_irq_5(int state , int line , void *data ) ; void work_init_8(void) ; void ldv_net_device_ops_48(void) ; void call_and_disable_all_9(int state ) ; void choose_interrupt_1(void) ; void ldv_file_operations_31(void) ; void timer_init_11(void) ; int reg_check_2(irqreturn_t (*handler)(int , void * ) ) ; void call_and_disable_work_8(struct work_struct *work ) ; void ldv_pci_driver_46(void) ; void ldv_file_operations_13(void) ; void ldv_file_operations_29(void) ; int reg_check_3(irqreturn_t (*handler)(int , void * ) ) ; void invoke_work_9(void) ; void ldv_file_operations_33(void) ; void disable_work_8(struct work_struct *work ) ; void activate_work_9(struct work_struct *work , int state ) ; int reg_check_6(irqreturn_t (*handler)(int , void * ) ) ; void ldv_file_operations_30(void) ; void ldv_file_operations_23(void) ; void ldv_file_operations_19(void) ; void call_and_disable_all_7(int state ) ; void ldv_file_operations_32(void) ; int ldv_irq_4(int state , int line , void *data ) ; void choose_interrupt_6(void) ; void ldv_file_operations_25(void) ; void ldv_file_operations_14(void) ; void ldv_initialize_pci_error_handlers_47(void) ; void disable_suitable_irq_6(int line , void *data ) ; void work_init_7(void) ; void invoke_work_7(void) ; void activate_suitable_irq_5(int line , void *data ) ; void ldv_file_operations_38(void) ; void call_and_disable_all_8(int state ) ; void ldv_file_operations_22(void) ; void ldv_file_operations_35(void) ; void call_and_disable_work_9(struct work_struct *work ) ; void ldv_initialize_dcbnl_rtnl_ops_42(void) ; void disable_suitable_irq_1(int line , void *data ) ; void activate_suitable_irq_1(int line , void *data ) ; int reg_check_4(irqreturn_t (*handler)(int , void * ) ) ; void activate_work_8(struct work_struct *work , int state ) ; int ldv_irq_2(int state , int line , void *data ) ; void choose_interrupt_2(void) ; void disable_work_9(struct work_struct *work ) ; void disable_suitable_irq_4(int line , void *data ) ; void ldv_file_operations_44(void) ; void ldv_file_operations_37(void) ; void ldv_file_operations_21(void) ; void ldv_file_operations_36(void) ; void activate_work_7(struct work_struct *work , int state ) ; void disable_suitable_irq_3(int line , void *data ) ; void ldv_file_operations_18(void) ; void timer_init_10(void) ; void ldv_file_operations_27(void) ; int ldv_irq_1(int state , int line , void *data ) ; void choose_interrupt_3(void) ; int reg_check_5(irqreturn_t (*handler)(int , void * ) ) ; extern unsigned char const _ctype[] ; __inline static unsigned char __tolower(unsigned char c ) { { if ((int )_ctype[(int )c] & 1) { c = (unsigned int )c + 32U; } else { } return (c); } } extern struct dentry *debugfs_create_dir(char const * , struct dentry * ) ; extern void debugfs_remove(struct dentry * ) ; extern void debugfs_remove_recursive(struct dentry * ) ; extern int net_ratelimit(void) ; __inline static char const *dev_name(struct device const *dev ) { char const *tmp ; { if ((unsigned long )dev->init_name != (unsigned long )((char const */* const */)0)) { return ((char const *)dev->init_name); } else { } tmp = kobject_name(& dev->kobj); return (tmp); } } __inline static int dev_to_node(struct device *dev ) { { return (dev->numa_node); } } __inline static void *dev_get_drvdata(struct device const *dev ) { { return ((void *)dev->driver_data); } } __inline static void dev_set_drvdata(struct device *dev , void *data ) { { dev->driver_data = data; return; } } extern void dev_alert(struct device const * , char const * , ...) ; extern void dev_err(struct device const * , char const * , ...) ; extern void dev_warn(struct device const * , char const * , ...) ; extern void _dev_info(struct device const * , char const * , ...) ; extern void kvfree(void const * ) ; extern int dma_supported(struct device * , u64 ) ; extern int dma_set_mask(struct device * , u64 ) ; __inline static int dma_set_coherent_mask(struct device *dev , u64 mask ) { int tmp ; { tmp = dma_supported(dev, mask); if (tmp == 0) { return (-5); } else { } dev->coherent_dma_mask = mask; return (0); } } extern void kfree_skb(struct sk_buff * ) ; extern struct sk_buff *__alloc_skb(unsigned int , gfp_t , int , int ) ; __inline static struct sk_buff *alloc_skb(unsigned int size , gfp_t priority ) { struct sk_buff *tmp ; { tmp = __alloc_skb(size, priority, 0, -1); return (tmp); } } __inline static bool skb_is_nonlinear(struct sk_buff const *skb ) { { return ((unsigned int )skb->data_len != 0U); } } __inline static unsigned char *skb_tail_pointer(struct sk_buff const *skb ) { { return ((unsigned char *)skb->head + (unsigned long )skb->tail); } } __inline static unsigned char *__skb_put(struct sk_buff *skb , unsigned int len ) { unsigned char *tmp ; unsigned char *tmp___0 ; bool tmp___1 ; long tmp___2 ; { tmp___0 = skb_tail_pointer((struct sk_buff const *)skb); tmp = tmp___0; tmp___1 = skb_is_nonlinear((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect((long )tmp___1, 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (1696), "i" (12UL)); ldv_31528: ; goto ldv_31528; } else { } skb->tail = skb->tail + len; skb->len = skb->len + len; return (tmp); } } __inline static void skb_set_queue_mapping(struct sk_buff *skb , u16 queue_mapping ) { { skb->queue_mapping = queue_mapping; return; } } __inline static u16 skb_get_rx_queue(struct sk_buff const *skb ) { { return ((unsigned int )((u16 )skb->queue_mapping) + 65535U); } } __inline static bool skb_rx_queue_recorded(struct sk_buff const *skb ) { { return ((unsigned int )((unsigned short )skb->queue_mapping) != 0U); } } extern void __const_udelay(unsigned long ) ; extern int request_threaded_irq(unsigned int , irqreturn_t (*)(int , void * ) , irqreturn_t (*)(int , void * ) , unsigned long , char const * , void * ) ; __inline static int request_irq(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { int tmp ; { tmp = request_threaded_irq(irq, handler, (irqreturn_t (*)(int , void * ))0, flags, name, dev); return (tmp); } } __inline static int ldv_request_irq_10(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_11(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_12(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_13(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_14(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_27(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; __inline static int ldv_request_irq_29(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; extern void free_irq(unsigned int , void * ) ; void ldv_free_irq_15(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_16(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_17(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_18(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_19(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_20(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_21(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_22(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_23(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_24(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_25(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_26(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; void ldv_free_irq_28(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; extern void __tasklet_schedule(struct tasklet_struct * ) ; __inline static void tasklet_schedule(struct tasklet_struct *t ) { int tmp ; { tmp = test_and_set_bit(0L, (unsigned long volatile *)(& t->state)); if (tmp == 0) { __tasklet_schedule(t); } else { } return; } } extern void napi_disable(struct napi_struct * ) ; __inline static void napi_enable(struct napi_struct *n ) { int tmp ; long tmp___0 ; { tmp = constant_test_bit(0L, (unsigned long const volatile *)(& n->state)); tmp___0 = ldv__builtin_expect(tmp == 0, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/netdevice.h"), "i" (507), "i" (12UL)); ldv_42274: ; goto ldv_42274; } else { } __asm__ volatile ("": : : "memory"); clear_bit(0L, (unsigned long volatile *)(& n->state)); return; } } __inline static struct netdev_queue *netdev_get_tx_queue(struct net_device const *dev , unsigned int index ) { { return ((struct netdev_queue *)dev->_tx + (unsigned long )index); } } __inline static void *netdev_priv(struct net_device const *dev ) { { return ((void *)dev + 3008U); } } extern void free_netdev(struct net_device * ) ; void ldv_free_netdev_33(struct net_device *dev ) ; __inline static void netif_tx_start_queue(struct netdev_queue *dev_queue ) { { clear_bit(0L, (unsigned long volatile *)(& dev_queue->state)); return; } } __inline static void netif_tx_start_all_queues(struct net_device *dev ) { unsigned int i ; struct netdev_queue *txq ; struct netdev_queue *tmp ; { i = 0U; goto ldv_43344; ldv_43343: tmp = netdev_get_tx_queue((struct net_device const *)dev, i); txq = tmp; netif_tx_start_queue(txq); i = i + 1U; ldv_43344: ; if (dev->num_tx_queues > i) { goto ldv_43343; } else { } return; } } extern void netif_tx_wake_queue(struct netdev_queue * ) ; extern void netif_tx_stop_all_queues(struct net_device * ) ; __inline static bool netif_running(struct net_device const *dev ) { int tmp ; { tmp = constant_test_bit(0L, (unsigned long const volatile *)(& dev->state)); return (tmp != 0); } } extern int netif_set_real_num_tx_queues(struct net_device * , unsigned int ) ; extern int netif_set_real_num_rx_queues(struct net_device * , unsigned int ) ; __inline static bool netif_carrier_ok(struct net_device const *dev ) { int tmp ; { tmp = constant_test_bit(2L, (unsigned long const volatile *)(& dev->state)); return (tmp == 0); } } extern void netif_carrier_on(struct net_device * ) ; extern void netif_carrier_off(struct net_device * ) ; __inline static bool netif_device_present(struct net_device *dev ) { int tmp ; { tmp = constant_test_bit(1L, (unsigned long const volatile *)(& dev->state)); return (tmp != 0); } } extern void netif_device_detach(struct net_device * ) ; extern void netif_device_attach(struct net_device * ) ; extern int register_netdev(struct net_device * ) ; int ldv_register_netdev_34(struct net_device *dev ) ; extern void unregister_netdev(struct net_device * ) ; void ldv_unregister_netdev_37(struct net_device *dev ) ; extern void netdev_warn(struct net_device const * , char const * , ...) ; extern void netdev_info(struct net_device const * , char const * , ...) ; extern int eth_validate_addr(struct net_device * ) ; extern struct net_device *alloc_etherdev_mqs(int , unsigned int , unsigned int ) ; __inline static bool is_zero_ether_addr(u8 const *addr ) { { return (((unsigned int )*((u32 const *)addr) | (unsigned int )*((u16 const *)addr + 4U)) == 0U); } } __inline static bool is_multicast_ether_addr(u8 const *addr ) { u32 a ; { a = *((u32 const *)addr); return ((a & 1U) != 0U); } } __inline static bool is_valid_ether_addr(u8 const *addr ) { bool tmp ; int tmp___0 ; bool tmp___1 ; int tmp___2 ; int tmp___3 ; { tmp = is_multicast_ether_addr(addr); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { tmp___1 = is_zero_ether_addr(addr); if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { tmp___3 = 1; } else { tmp___3 = 0; } } else { tmp___3 = 0; } return ((bool )tmp___3); } } __inline static void ether_addr_copy(u8 *dst , u8 const *src ) { { *((u32 *)dst) = *((u32 const *)src); *((u16 *)dst + 4U) = *((u16 const *)src + 4U); return; } } extern int request_firmware(struct firmware const ** , char const * , struct device * ) ; extern int request_firmware_direct(struct firmware const ** , char const * , struct device * ) ; extern void release_firmware(struct firmware const * ) ; extern void rtnl_lock(void) ; extern void rtnl_unlock(void) ; extern struct net_device *vlan_dev_real_dev(struct net_device const * ) ; __inline static int __vlan_get_tag(struct sk_buff const *skb , u16 *vlan_tci ) { struct vlan_ethhdr *veth ; __u16 tmp ; { veth = (struct vlan_ethhdr *)skb->data; if ((unsigned int )veth->h_vlan_proto != 129U && (unsigned int )veth->h_vlan_proto != 43144U) { return (-22); } else { } tmp = __fswab16((int )veth->h_vlan_TCI); *vlan_tci = tmp; return (0); } } __inline static int __vlan_hwaccel_get_tag(struct sk_buff const *skb , u16 *vlan_tci ) { { if (((int )skb->vlan_tci & 4096) != 0) { *vlan_tci = (unsigned int )((u16 )skb->vlan_tci) & 61439U; return (0); } else { *vlan_tci = 0U; return (-22); } } } __inline static int vlan_get_tag(struct sk_buff const *skb , u16 *vlan_tci ) { int tmp ; int tmp___0 ; { if (((skb->dev)->features & 128ULL) != 0ULL) { tmp = __vlan_hwaccel_get_tag(skb, vlan_tci); return (tmp); } else { tmp___0 = __vlan_get_tag(skb, vlan_tci); return (tmp___0); } } } __inline static bool mdio_phy_id_is_c45(int phy_id ) { { return ((bool )((phy_id & 32768) != 0 && (phy_id & -33792) == 0)); } } __inline static __u16 mdio_phy_id_prtad(int phy_id ) { { return ((__u16 )((phy_id & 992) >> 5)); } } __inline static __u16 mdio_phy_id_devad(int phy_id ) { { return ((unsigned int )((__u16 )phy_id) & 31U); } } extern int pcie_capability_clear_and_set_word(struct pci_dev * , int , u16 , u16 ) ; __inline static int pcie_capability_set_word(struct pci_dev *dev , int pos , u16 set ) { int tmp ; { tmp = pcie_capability_clear_and_set_word(dev, pos, 0, (int )set); return (tmp); } } extern int pci_enable_device(struct pci_dev * ) ; extern void pci_disable_device(struct pci_dev * ) ; extern void pci_set_master(struct pci_dev * ) ; extern int pci_save_state(struct pci_dev * ) ; extern void pci_restore_state(struct pci_dev * ) ; extern int pci_request_regions(struct pci_dev * , char const * ) ; extern void pci_release_regions(struct pci_dev * ) ; extern int __pci_register_driver(struct pci_driver * , struct module * , char const * ) ; int ldv___pci_register_driver_38(struct pci_driver *ldv_func_arg1 , struct module *ldv_func_arg2 , char const *ldv_func_arg3 ) ; extern void pci_unregister_driver(struct pci_driver * ) ; void ldv_pci_unregister_driver_39(struct pci_driver *ldv_func_arg1 ) ; extern void pci_disable_msi(struct pci_dev * ) ; extern void pci_disable_msix(struct pci_dev * ) ; extern int pci_enable_msi_range(struct pci_dev * , int , int ) ; __inline static int pci_enable_msi_exact(struct pci_dev *dev , int nvec ) { int rc ; int tmp ; { tmp = pci_enable_msi_range(dev, nvec, nvec); rc = tmp; if (rc < 0) { return (rc); } else { } return (0); } } extern int pci_enable_msix_range(struct pci_dev * , struct msix_entry * , int , int ) ; __inline static int pci_set_dma_mask(struct pci_dev *dev , u64 mask ) { int tmp ; { tmp = dma_set_mask(& dev->dev, mask); return (tmp); } } __inline static int pci_set_consistent_dma_mask(struct pci_dev *dev , u64 mask ) { int tmp ; { tmp = dma_set_coherent_mask(& dev->dev, mask); return (tmp); } } __inline static void *pci_get_drvdata(struct pci_dev *pdev ) { void *tmp ; { tmp = dev_get_drvdata((struct device const *)(& pdev->dev)); return (tmp); } } __inline static void pci_set_drvdata(struct pci_dev *pdev , void *data ) { { dev_set_drvdata(& pdev->dev, data); return; } } __inline static char const *pci_name(struct pci_dev const *pdev ) { char const *tmp ; { tmp = dev_name(& pdev->dev); return (tmp); } } extern void *pci_ioremap_bar(struct pci_dev * , int ) ; extern int pci_enable_sriov(struct pci_dev * , int ) ; extern void pci_disable_sriov(struct pci_dev * ) ; extern int pci_enable_pcie_error_reporting(struct pci_dev * ) ; extern int pci_disable_pcie_error_reporting(struct pci_dev * ) ; extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev * ) ; extern void *vzalloc(unsigned long ) ; extern int register_netevent_notifier(struct notifier_block * ) ; extern int unregister_netevent_notifier(struct notifier_block * ) ; extern int register_inet6addr_notifier(struct notifier_block * ) ; extern int unregister_inet6addr_notifier(struct notifier_block * ) ; int cxgb4_alloc_atid(struct tid_info *t , void *data ) ; int cxgb4_alloc_stid(struct tid_info *t , int family , void *data ) ; int cxgb4_alloc_sftid(struct tid_info *t , int family , void *data ) ; void cxgb4_free_atid(struct tid_info *t , unsigned int atid ) ; void cxgb4_free_stid(struct tid_info *t , unsigned int stid , int family ) ; void cxgb4_remove_tid(struct tid_info *t , unsigned int chan , unsigned int tid ) ; int cxgb4_create_server(struct net_device const *dev , unsigned int stid , __be32 sip , __be16 sport , __be16 vlan , unsigned int queue ) ; int cxgb4_create_server6(struct net_device const *dev , unsigned int stid , struct in6_addr const *sip , __be16 sport , unsigned int queue ) ; int cxgb4_remove_server(struct net_device const *dev , unsigned int stid , unsigned int queue , bool ipv6 ) ; int cxgb4_create_server_filter(struct net_device const *dev , unsigned int stid , __be32 sip , __be16 sport , __be16 vlan , unsigned int queue , unsigned char port , unsigned char mask ) ; int cxgb4_remove_server_filter(struct net_device const *dev , unsigned int stid , unsigned int queue , bool ipv6 ) ; __inline static void set_wr_txq(struct sk_buff *skb , int prio , int queue ) { { skb_set_queue_mapping(skb, (int )((u16 )((int )((short )(queue << 1)) | (int )((short )prio)))); return; } } int cxgb4_register_uld(enum cxgb4_uld type , struct cxgb4_uld_info const *p ) ; int cxgb4_unregister_uld(enum cxgb4_uld type ) ; unsigned int cxgb4_dbfifo_count(struct net_device const *dev , int lpfifo ) ; unsigned int cxgb4_port_chan(struct net_device const *dev ) ; unsigned int cxgb4_port_viid(struct net_device const *dev ) ; unsigned int cxgb4_port_idx(struct net_device const *dev ) ; unsigned int cxgb4_best_mtu(unsigned short const *mtus , unsigned short mtu , unsigned int *idx ) ; unsigned int cxgb4_best_aligned_mtu(unsigned short const *mtus , unsigned short header_size , unsigned short data_size_max , unsigned short data_size_align , unsigned int *mtu_idxp ) ; void cxgb4_get_tcp_stats(struct pci_dev *pdev , struct tp_tcp_stats *v4 , struct tp_tcp_stats *v6 ) ; void cxgb4_iscsi_init(struct net_device *dev , unsigned int tag_mask , unsigned int const *pgsz_order ) ; int cxgb4_sync_txq_pidx(struct net_device *dev , u16 qid , u16 pidx , u16 size ) ; int cxgb4_flush_eq_cache(struct net_device *dev ) ; int cxgb4_read_tpte(struct net_device *dev , u32 stag , __be32 *tpte ) ; u64 cxgb4_read_sge_timestamp(struct net_device *dev ) ; int cxgb4_bar2_sge_qregs(struct net_device *dev , unsigned int qid , enum cxgb4_bar2_qtype qtype , int user , u64 *pbar2_qoffset , unsigned int *pbar2_qid ) ; void cxgb4_dcb_state_init(struct net_device *dev ) ; void cxgb4_dcb_state_fsm(struct net_device *dev , enum cxgb4_dcb_state_input transition_to ) ; void cxgb4_dcb_handle_fw_update(struct adapter *adap , struct fw_port_cmd const *pcmd ) ; struct dcbnl_rtnl_ops const cxgb4_dcb_ops ; int cxgb_fcoe_enable(struct net_device *netdev ) ; int cxgb_fcoe_disable(struct net_device *netdev ) ; __inline static int is_offload(struct adapter const *adap ) { { return ((int )adap->params.offload); } } __inline static int is_t5(enum chip_type chip ) { { return ((((unsigned int )chip >> 4) & 15U) == 5U); } } __inline static int is_t4(enum chip_type chip ) { { return ((((unsigned int )chip >> 4) & 15U) == 4U); } } __inline static u32 t4_read_reg(struct adapter *adap , u32 reg_addr ) { unsigned int tmp ; { tmp = readl((void const volatile *)adap->regs + (unsigned long )reg_addr); return (tmp); } } __inline static void t4_write_reg(struct adapter *adap , u32 reg_addr , u32 val ) { { writel(val, (void volatile *)adap->regs + (unsigned long )reg_addr); return; } } __inline static void t4_set_hw_addr(struct adapter *adapter , int port_idx , u8 *hw_addr ) { { ether_addr_copy((adapter->port[port_idx])->dev_addr, (u8 const *)hw_addr); ether_addr_copy((u8 *)(& (adapter->port[port_idx])->perm_addr), (u8 const *)hw_addr); return; } } __inline static struct port_info *netdev2pinfo(struct net_device const *dev ) { void *tmp ; { tmp = netdev_priv(dev); return ((struct port_info *)tmp); } } __inline static struct port_info *adap2pinfo(struct adapter *adap , int idx ) { void *tmp ; { tmp = netdev_priv((struct net_device const *)adap->port[idx]); return ((struct port_info *)tmp); } } __inline static struct adapter *netdev2adap(struct net_device const *dev ) { struct port_info *tmp ; { tmp = netdev2pinfo(dev); return (tmp->adapter); } } __inline static void cxgb_busy_poll_init_lock(struct sge_rspq *q ) { struct lock_class_key __key ; { spinlock_check(& q->bpoll_lock); __raw_spin_lock_init(& q->bpoll_lock.__annonCompField18.rlock, "&(&q->bpoll_lock)->rlock", & __key); q->bpoll_state = 0U; return; } } __inline static bool cxgb_poll_lock_napi(struct sge_rspq *q ) { bool rc ; { rc = 1; spin_lock(& q->bpoll_lock); if (((unsigned long )q->bpoll_state & 3UL) != 0UL) { q->bpoll_state = q->bpoll_state | 4U; rc = 0; } else { q->bpoll_state = 1U; } spin_unlock(& q->bpoll_lock); return (rc); } } char cxgb4_driver_name[6U] ; char const cxgb4_driver_version[9U] ; void t4_os_portmod_changed(struct adapter const *adap , int port_id ) ; void t4_os_link_changed(struct adapter *adapter , int port_id , int link_stat ) ; void *t4_alloc_mem(size_t size ) ; void t4_free_sge_resources(struct adapter *adap ) ; irq_handler_t t4_intr_handler(struct adapter *adap ) ; netdev_tx_t t4_eth_xmit(struct sk_buff *skb , struct net_device *dev ) ; int t4_ethrx_handler(struct sge_rspq *q , __be64 const *rsp , struct pkt_gl const *si ) ; int t4_mgmt_tx(struct adapter *adap , struct sk_buff *skb ) ; int t4_ofld_send(struct adapter *adap , struct sk_buff *skb ) ; int t4_sge_alloc_rxq(struct adapter *adap , struct sge_rspq *iq , bool fwevtq , struct net_device *dev , int intr_idx , struct sge_fl *fl , int (*hnd)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ) , int cong ) ; int t4_sge_alloc_eth_txq(struct adapter *adap , struct sge_eth_txq *txq , struct net_device *dev , struct netdev_queue *netdevq , unsigned int iqid ) ; int t4_sge_alloc_ctrl_txq(struct adapter *adap , struct sge_ctrl_txq *txq , struct net_device *dev , unsigned int iqid , unsigned int cmplqid ) ; int t4_sge_alloc_ofld_txq(struct adapter *adap , struct sge_ofld_txq *txq , struct net_device *dev , unsigned int iqid ) ; irqreturn_t t4_sge_intr_msix(int irq , void *cookie ) ; int t4_sge_init(struct adapter *adap ) ; void t4_sge_start(struct adapter *adap ) ; void t4_sge_stop(struct adapter *adap ) ; int cxgb_busy_poll(struct napi_struct *napi ) ; int cxgb4_set_rspq_intr_params(struct sge_rspq *q , unsigned int us , unsigned int cnt ) ; void cxgb4_set_ethtool_ops(struct net_device *netdev ) ; int cxgb4_write_rss(struct port_info const *pi , u16 const *queues ) ; int dbfifo_int_thresh ; __inline static int is_bypass(struct adapter *adap ) { { return ((int )adap->params.bypass); } } __inline static int is_bypass_device(int device ) { { switch (device) { case 17419: ; case 17420: ; return (1); default: ; return (0); } } } __inline static int is_10gbt_device(int device ) { { switch (device) { case 17417: ; case 17542: ; return (1); default: ; return (0); } } } void t4_set_reg_field(struct adapter *adapter , unsigned int addr , u32 mask , u32 val ) ; int t4_wr_mbox_meat(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl , bool sleep_ok ) ; __inline static int t4_wr_mbox(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl ) { int tmp ; { tmp = t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, 1); return (tmp); } } void t4_write_indirect(struct adapter *adap , unsigned int addr_reg , unsigned int data_reg , u32 const *vals , unsigned int nregs , unsigned int start_idx ) ; void t4_intr_enable(struct adapter *adapter ) ; void t4_intr_disable(struct adapter *adapter ) ; int t4_slow_intr_handler(struct adapter *adapter ) ; int t4_wait_dev_ready(void *regs ) ; int t4_link_l1cfg(struct adapter *adap , unsigned int mbox , unsigned int port , struct link_config *lc ) ; u32 t4_read_pcie_cfg4(struct adapter *adap , int reg ) ; u32 t4_get_util_window(struct adapter *adap ) ; void t4_setup_memwin(struct adapter *adap , u32 memwin_base , u32 window ) ; int t4_memory_rw(struct adapter *adap , int win , int mtype , u32 addr , u32 len , void *hbuf , int dir ) ; int t4_get_raw_vpd_params(struct adapter *adapter , struct vpd_params *p ) ; int t4_get_vpd_params(struct adapter *adapter , struct vpd_params *p ) ; int t4_load_phy_fw(struct adapter *adap , int win , spinlock_t *win_lock , int (*phy_fw_version)(u8 const * , size_t ) , u8 const *phy_fw_data , size_t phy_fw_size ) ; int t4_phy_fw_ver(struct adapter *adap , int *phy_fw_ver ) ; unsigned int t4_flash_cfg_addr(struct adapter *adapter ) ; int t4_get_fw_version(struct adapter *adapter , u32 *vers ) ; int t4_get_tp_version(struct adapter *adapter , u32 *vers ) ; int t4_prep_fw(struct adapter *adap , struct fw_info *fw_info , u8 const *fw_data , unsigned int fw_size , struct fw_hdr *card_fw , enum dev_state state , int *reset ) ; int t4_prep_adapter(struct adapter *adapter ) ; int t4_bar2_sge_qregs(struct adapter *adapter , unsigned int qid , enum t4_bar2_qtype qtype , int user , u64 *pbar2_qoffset , unsigned int *pbar2_qid ) ; int t4_init_devlog_params(struct adapter *adap ) ; int t4_init_sge_params(struct adapter *adapter ) ; int t4_init_tp_params(struct adapter *adap ) ; int t4_init_rss_mode(struct adapter *adap , int mbox ) ; int t4_port_init(struct adapter *adap , int mbox , int pf , int vf ) ; void t4_fatal_err(struct adapter *adap ) ; int t4_config_rss_range(struct adapter *adapter , int mbox , unsigned int viid , int start , int n , u16 const *rspq , unsigned int nrspq ) ; int t4_config_glbl_rss(struct adapter *adapter , int mbox , unsigned int mode , unsigned int flags ) ; int t4_config_vi_rss(struct adapter *adapter , int mbox , unsigned int viid , unsigned int flags , unsigned int defq ) ; unsigned int t4_get_mps_bg_map(struct adapter *adap , int idx ) ; char const *t4_get_port_type_description(enum fw_port_type port_type ) ; void t4_get_port_stats_offset(struct adapter *adap , int idx , struct port_stats *stats , struct port_stats *offset ) ; void t4_read_mtu_tbl(struct adapter *adap , u16 *mtus , u8 *mtu_log ) ; void t4_tp_wr_bits_indirect(struct adapter *adap , unsigned int addr , unsigned int mask , unsigned int val ) ; void t4_tp_get_tcp_stats(struct adapter *adap , struct tp_tcp_stats *v4 , struct tp_tcp_stats *v6 ) ; void t4_load_mtus(struct adapter *adap , unsigned short const *mtus , unsigned short const *alpha , unsigned short const *beta ) ; void t4_mk_filtdelwr(unsigned int ftid , struct fw_filter_wr *wr , int qid ) ; int t4_fw_hello(struct adapter *adap , unsigned int mbox , unsigned int evt_mbox , enum dev_master master , enum dev_state *state ) ; int t4_fw_bye(struct adapter *adap , unsigned int mbox ) ; int t4_early_init(struct adapter *adap , unsigned int mbox ) ; int t4_fw_reset(struct adapter *adap , unsigned int mbox , int reset ) ; int t4_fixup_host_params(struct adapter *adap , unsigned int page_size , unsigned int cache_line_size ) ; int t4_fw_initialize(struct adapter *adap , unsigned int mbox ) ; int t4_query_params(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 *val ) ; int t4_set_params_timeout(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 const *val , int timeout ) ; int t4_set_params(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 const *val ) ; int t4_cfg_pfvf(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int txq , unsigned int txq_eth_ctrl , unsigned int rxqi , unsigned int rxq , unsigned int tc , unsigned int vi , unsigned int cmask , unsigned int pmask , unsigned int nexact , unsigned int rcaps , unsigned int wxcaps ) ; int t4_alloc_vi(struct adapter *adap , unsigned int mbox , unsigned int port , unsigned int pf , unsigned int vf , unsigned int nmac , u8 *mac , unsigned int *rss_size ) ; int t4_free_vi(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int viid ) ; int t4_set_rxmode(struct adapter *adap , unsigned int mbox , unsigned int viid , int mtu , int promisc , int all_multi , int bcast , int vlanex , bool sleep_ok ) ; int t4_alloc_mac_filt(struct adapter *adap , unsigned int mbox , unsigned int viid , bool free , unsigned int naddr , u8 const **addr , u16 *idx , u64 *hash , bool sleep_ok ) ; int t4_change_mac(struct adapter *adap , unsigned int mbox , unsigned int viid , int idx , u8 const *addr , bool persist , bool add_smt ) ; int t4_set_addr_hash(struct adapter *adap , unsigned int mbox , unsigned int viid , bool ucast , u64 vec , bool sleep_ok ) ; int t4_enable_vi_params(struct adapter *adap , unsigned int mbox , unsigned int viid , bool rx_en , bool tx_en , bool dcb_en ) ; int t4_enable_vi(struct adapter *adap , unsigned int mbox , unsigned int viid , bool rx_en , bool tx_en ) ; int t4_mdio_rd(struct adapter *adap , unsigned int mbox , unsigned int phy_addr , unsigned int mmd , unsigned int reg , u16 *valp ) ; int t4_mdio_wr(struct adapter *adap , unsigned int mbox , unsigned int phy_addr , unsigned int mmd , unsigned int reg , u16 val ) ; int t4_sge_ctxt_flush(struct adapter *adap , unsigned int mbox ) ; int t4_handle_fw_rpl(struct adapter *adap , __be64 const *rpl ) ; void t4_db_full(struct adapter *adap ) ; void t4_db_dropped(struct adapter *adap ) ; void t4_free_mem(void *addr ) ; __inline static unsigned int hex2val(char c ) { unsigned char tmp ; int tmp___0 ; { if (((int )_ctype[(int )((unsigned char )c)] & 4) != 0) { tmp___0 = (int )c + -48; } else { tmp = __tolower((int )((unsigned char )c)); tmp___0 = (int )tmp + -87; } return ((unsigned int )tmp___0); } } int t4_setup_debugfs(struct adapter *adap ) ; struct clip_tbl *t4_init_clip_tbl(unsigned int clipt_start , unsigned int clipt_end ) ; int cxgb4_clip_get(struct net_device const *dev , u32 const *lip , u8 v6 ) ; void cxgb4_clip_release(struct net_device const *dev , u32 const *lip , u8 v6 ) ; int cxgb4_update_root_dev_clip(struct net_device *dev ) ; void t4_cleanup_clip_tbl(struct adapter *adap ) ; void cxgb4_l2t_release(struct l2t_entry *e ) ; void t4_l2t_update(struct adapter *adap , struct neighbour *neigh ) ; struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *d ) ; int t4_l2t_set_switching(struct adapter *adap , struct l2t_entry *e , u16 vlan , u8 port , u8 *eth_addr ) ; struct l2t_data *t4_init_l2t(void) ; void do_l2t_write_rpl(struct adapter *adap , struct cpl_l2t_write_rpl const *rpl ) ; char cxgb4_driver_name[6U] = { 'c', 'x', 'g', 'b', '4', '\000'}; char const cxgb4_driver_version[9U] = { '2', '.', '0', '.', '0', '-', 'k', 'o', '\000'}; static struct pci_device_id const cxgb4_pci_tbl[117U] = { {5157U, 17408U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16384U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17409U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16385U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17410U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16386U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17411U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16387U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17412U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16388U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17413U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16389U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17414U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16390U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17415U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16391U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17416U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16392U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17417U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16393U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17418U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16394U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17419U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16395U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17420U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16396U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17421U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16397U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17422U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16398U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17536U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16512U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17537U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16513U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17538U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16514U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17539U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16515U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17540U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16516U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17541U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16517U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17542U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16518U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17543U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16519U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 17544U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 16520U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21504U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20480U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21505U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20481U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21506U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20482U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21507U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20483U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21508U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20484U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21509U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20485U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21510U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20486U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21511U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20487U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21512U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20488U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21513U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20489U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21514U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20490U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21515U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20491U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21516U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20492U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21517U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20493U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21518U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20494U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21520U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20496U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21521U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20497U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21522U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20498U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21523U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20499U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21524U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20500U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21525U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20501U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21632U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20608U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21633U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20609U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21634U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20610U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21635U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20611U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21636U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20612U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21637U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20613U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21638U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20614U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21639U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20615U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21640U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20616U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21641U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20617U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21648U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20624U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21649U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20625U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 21650U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5157U, 20626U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {0U, 0U, 0U, 0U, 0U, 0U, 0UL}}; struct pci_device_id const __mod_pci__cxgb4_pci_tbl_device_table[117U] ; static int dflt_msg_enable = 255; static int msi = 2; static int rx_dma_offset = 2; static bool vf_acls ; static unsigned int num_vf[4U] ; static int select_queue ; static struct dentry *cxgb4_debugfs_root ; static struct list_head adapter_list = {& adapter_list, & adapter_list}; static struct mutex uld_mutex = {{1}, {{{{{0}}, 3735899821U, 4294967295U, (void *)-1, {0, {0, 0}, "uld_mutex.wait_lock", 0, 0UL}}}}, {& uld_mutex.wait_list, & uld_mutex.wait_list}, 0, (void *)(& uld_mutex), {0, {0, 0}, "uld_mutex", 0, 0UL}}; static struct list_head adap_rcu_list = {& adap_rcu_list, & adap_rcu_list}; static spinlock_t adap_rcu_lock = {{{{{0}}, 3735899821U, 4294967295U, (void *)-1, {0, {0, 0}, "adap_rcu_lock", 0, 0UL}}}}; static struct cxgb4_uld_info ulds[2U] ; static char const *uld_str[2U] = { "RDMA", "iSCSI"}; static void link_report(struct net_device *dev ) { char const *fc[4U] ; char const *s ; struct port_info const *p ; void *tmp ; bool tmp___0 ; int tmp___1 ; { tmp___0 = netif_carrier_ok((struct net_device const *)dev); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { netdev_info((struct net_device const *)dev, "link down\n"); } else { fc[0] = "no"; fc[1] = "Rx"; fc[2] = "Tx"; fc[3] = "Tx/Rx"; s = "10Mbps"; tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info const *)tmp; switch ((int )p->link_cfg.speed) { case 10000: s = "10Gbps"; goto ldv_58078; case 1000: s = "1000Mbps"; goto ldv_58078; case 100: s = "100Mbps"; goto ldv_58078; case 40000: s = "40Gbps"; goto ldv_58078; } ldv_58078: netdev_info((struct net_device const *)dev, "link up, %s, full-duplex, %s PAUSE\n", s, fc[(int )p->link_cfg.fc]); } return; } } static void dcb_tx_queue_prio_enable(struct net_device *dev , int enable ) { struct port_info *pi ; void *tmp ; struct adapter *adap ; struct sge_eth_txq *txq ; int i ; u32 name ; u32 value ; int err ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adap = pi->adapter; txq = (struct sge_eth_txq *)(& adap->sge.ethtxq) + (unsigned long )pi->first_qset; i = 0; goto ldv_58094; ldv_58093: name = txq->q.cntxt_id | 68354048U; value = enable != 0 ? (unsigned int )i : 4294967295U; err = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& name), (u32 const *)(& value), -10000); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "Can\'t %s DCB Priority on port %d, TX Queue %d: err=%d\n", enable != 0 ? (char *)"set" : (char *)"unset", (int )pi->port_id, i, - err); } else { txq->dcb_prio = (u8 )value; } i = i + 1; txq = txq + 1; ldv_58094: ; if ((int )pi->nqsets > i) { goto ldv_58093; } else { } return; } } void t4_os_link_changed(struct adapter *adapter , int port_id , int link_stat ) { struct net_device *dev ; bool tmp ; bool tmp___0 ; { dev = adapter->port[port_id]; tmp = netif_running((struct net_device const *)dev); if ((int )tmp) { tmp___0 = netif_carrier_ok((struct net_device const *)dev); if ((int )tmp___0 != link_stat) { if (link_stat != 0) { netif_carrier_on(dev); } else { cxgb4_dcb_state_init(dev); dcb_tx_queue_prio_enable(dev, 0); netif_carrier_off(dev); } link_report(dev); } else { } } else { } return; } } void t4_os_portmod_changed(struct adapter const *adap , int port_id ) { char const *mod_str[7U] ; struct net_device const *dev ; struct port_info const *pi ; void *tmp ; { mod_str[0] = (char const *)0; mod_str[1] = "LR"; mod_str[2] = "SR"; mod_str[3] = "ER"; mod_str[4] = "passive DA"; mod_str[5] = "active DA"; mod_str[6] = "LRM"; dev = (struct net_device const *)adap->port[port_id]; tmp = netdev_priv(dev); pi = (struct port_info const *)tmp; if ((unsigned int )((unsigned char )pi->mod_type) == 31U) { netdev_info(dev, "port module unplugged\n"); } else if ((unsigned int )((unsigned char )pi->mod_type) <= 6U) { netdev_info(dev, "%s module inserted\n", mod_str[(int )pi->mod_type]); } else { } return; } } static int set_addr_filters(struct net_device const *dev , bool sleep ) { u64 mhash ; u64 uhash ; bool free ; u16 filt_idx[7U] ; u8 const *addr[7U] ; int ret ; int naddr ; struct netdev_hw_addr const *ha ; int uc_cnt ; int mc_cnt ; struct port_info const *pi ; void *tmp ; unsigned int mb ; struct list_head const *__mptr ; int tmp___0 ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp___1 ; struct list_head const *__mptr___2 ; int tmp___2 ; { mhash = 0ULL; uhash = 0ULL; free = 1; naddr = 0; uc_cnt = dev->uc.count; mc_cnt = dev->mc.count; tmp = netdev_priv(dev); pi = (struct port_info const *)tmp; mb = (pi->adapter)->pf; __mptr = (struct list_head const *)dev->uc.list.next; ha = (struct netdev_hw_addr const *)__mptr; goto ldv_58134; ldv_58133: tmp___0 = naddr; naddr = naddr + 1; addr[tmp___0] = (u8 const *)(& ha->addr); uc_cnt = uc_cnt - 1; if (uc_cnt == 0 || (unsigned int )naddr > 6U) { ret = t4_alloc_mac_filt(pi->adapter, mb, (unsigned int )pi->viid, (int )free, (unsigned int )naddr, (u8 const **)(& addr), (u16 *)(& filt_idx), & uhash, (int )sleep); if (ret < 0) { return (ret); } else { } free = 0; naddr = 0; } else { } __mptr___0 = (struct list_head const *)ha->list.next; ha = (struct netdev_hw_addr const *)__mptr___0; ldv_58134: ; if ((unsigned long )(& ha->list) != (unsigned long )(& dev->uc.list)) { goto ldv_58133; } else { } __mptr___1 = (struct list_head const *)dev->mc.list.next; ha = (struct netdev_hw_addr const *)__mptr___1; goto ldv_58143; ldv_58142: tmp___1 = naddr; naddr = naddr + 1; addr[tmp___1] = (u8 const *)(& ha->addr); mc_cnt = mc_cnt - 1; if (mc_cnt == 0 || (unsigned int )naddr > 6U) { ret = t4_alloc_mac_filt(pi->adapter, mb, (unsigned int )pi->viid, (int )free, (unsigned int )naddr, (u8 const **)(& addr), (u16 *)(& filt_idx), & mhash, (int )sleep); if (ret < 0) { return (ret); } else { } free = 0; naddr = 0; } else { } __mptr___2 = (struct list_head const *)ha->list.next; ha = (struct netdev_hw_addr const *)__mptr___2; ldv_58143: ; if ((unsigned long )(& ha->list) != (unsigned long )(& dev->mc.list)) { goto ldv_58142; } else { } tmp___2 = t4_set_addr_hash(pi->adapter, mb, (unsigned int )pi->viid, uhash != 0ULL, uhash | mhash, (int )sleep); return (tmp___2); } } int dbfifo_int_thresh = 10; static int dbfifo_drain_delay = 1000; static int set_rxmode(struct net_device *dev , int mtu , bool sleep_ok ) { int ret ; struct port_info *pi ; void *tmp ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; ret = set_addr_filters((struct net_device const *)dev, (int )sleep_ok); if (ret == 0) { ret = t4_set_rxmode(pi->adapter, (pi->adapter)->pf, (unsigned int )pi->viid, mtu, (dev->flags & 256U) != 0U, (dev->flags & 512U) != 0U, 1, -1, (int )sleep_ok); } else { } return (ret); } } static int link_start(struct net_device *dev ) { int ret ; struct port_info *pi ; void *tmp ; unsigned int mb ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; mb = (pi->adapter)->pf; ret = t4_set_rxmode(pi->adapter, mb, (unsigned int )pi->viid, (int )dev->mtu, -1, -1, -1, (dev->features & 256ULL) != 0ULL, 1); if (ret == 0) { ret = t4_change_mac(pi->adapter, mb, (unsigned int )pi->viid, (int )pi->xact_addr_filt, (u8 const *)dev->dev_addr, 1, 1); if (ret >= 0) { pi->xact_addr_filt = (s16 )ret; ret = 0; } else { } } else { } if (ret == 0) { ret = t4_link_l1cfg(pi->adapter, mb, (unsigned int )pi->tx_chan, & pi->link_cfg); } else { } if (ret == 0) { local_bh_disable(); ret = t4_enable_vi_params(pi->adapter, mb, (unsigned int )pi->viid, 1, 1, 1); local_bh_enable(); } else { } return (ret); } } int cxgb4_dcb_enabled(struct net_device const *dev ) { struct port_info *pi ; void *tmp ; { tmp = netdev_priv(dev); pi = (struct port_info *)tmp; if (! pi->dcb.enabled) { return (0); } else { } return ((unsigned int )pi->dcb.state == 3U || (unsigned int )pi->dcb.state == 1U); } } static char const __kstrtab_cxgb4_dcb_enabled[18U] = { 'c', 'x', 'g', 'b', '4', '_', 'd', 'c', 'b', '_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_dcb_enabled ; struct kernel_symbol const __ksymtab_cxgb4_dcb_enabled = {(unsigned long )(& cxgb4_dcb_enabled), (char const *)(& __kstrtab_cxgb4_dcb_enabled)}; static void dcb_rpl(struct adapter *adap , struct fw_port_cmd const *pcmd ) { int port ; __u32 tmp ; struct net_device *dev ; int old_dcb_enabled ; int tmp___0 ; int new_dcb_enabled ; { tmp = __fswab32(pcmd->op_to_portid); port = (int )tmp & 15; dev = adap->port[port]; tmp___0 = cxgb4_dcb_enabled((struct net_device const *)dev); old_dcb_enabled = tmp___0; cxgb4_dcb_handle_fw_update(adap, pcmd); new_dcb_enabled = cxgb4_dcb_enabled((struct net_device const *)dev); if (new_dcb_enabled != old_dcb_enabled) { dcb_tx_queue_prio_enable(dev, new_dcb_enabled); } else { } return; } } static void clear_filter(struct adapter *adap , struct filter_entry *f ) { { if ((unsigned long )f->l2t != (unsigned long )((struct l2t_entry *)0)) { cxgb4_l2t_release(f->l2t); } else { } memset((void *)f, 0, 144UL); return; } } static void filter_rpl(struct adapter *adap , struct cpl_set_tcb_rpl const *rpl ) { unsigned int idx ; __u32 tmp ; unsigned int nidx ; unsigned int ret ; struct filter_entry *f ; __u64 tmp___0 ; { tmp = __fswab32(rpl->ot.opcode_tid); idx = tmp & 16777215U; nidx = idx - adap->tids.ftid_base; if (adap->tids.ftid_base <= idx && adap->tids.nftids + adap->tids.nsftids > nidx) { idx = nidx; ret = (unsigned int )((int )((unsigned char )rpl->cookie) >> 5) & 7U; f = adap->tids.ftid_tab + (unsigned long )idx; if (ret == 2U) { clear_filter(adap, f); } else if (ret == 3U) { dev_err((struct device const *)adap->pdev_dev, "filter %u setup failed due to full SMT\n", idx); clear_filter(adap, f); } else if (ret == 1U) { tmp___0 = __fswab64(rpl->oldval); f->smtidx = (unsigned char )(tmp___0 >> 24); f->pending = 0U; f->valid = 1U; } else { dev_err((struct device const *)adap->pdev_dev, "filter %u setup failed with error %u\n", idx, ret); clear_filter(adap, f); } } else { } return; } } static int fwevtq_handler(struct sge_rspq *q , __be64 const *rsp , struct pkt_gl const *gl ) { u8 opcode ; long tmp ; struct cpl_sge_egr_update const *p ; unsigned int qid ; __u32 tmp___0 ; struct sge_txq *txq ; struct sge_eth_txq *eq ; struct sge_txq const *__mptr ; struct sge_ofld_txq *oq ; struct sge_txq const *__mptr___0 ; struct cpl_fw6_msg const *p___0 ; struct fw_port_cmd const *pcmd ; unsigned int cmd ; __u32 tmp___1 ; unsigned int action ; __u32 tmp___2 ; int port ; __u32 tmp___3 ; struct net_device *dev ; int state_input ; struct cpl_l2t_write_rpl const *p___1 ; struct cpl_set_tcb_rpl const *p___2 ; long tmp___4 ; { opcode = ((struct rss_header const *)rsp)->opcode; rsp = rsp + 1; tmp = ldv__builtin_expect((long )((unsigned int )opcode == 192U && (unsigned int )((unsigned char )((struct cpl_fw4_msg const *)rsp)->type) == 4U), 0L); if (tmp != 0L) { rsp = rsp + 1; opcode = ((struct rss_header const *)rsp)->opcode; rsp = rsp + 1; if ((unsigned int )opcode != 165U) { dev_err((struct device const *)(q->adap)->pdev_dev, "unexpected FW4/CPL %#x on FW event queue\n", (int )opcode); goto out; } else { } } else { } tmp___4 = ldv__builtin_expect((unsigned int )opcode == 165U, 1L); if (tmp___4 != 0L) { p = (struct cpl_sge_egr_update const *)rsp; tmp___0 = __fswab32(p->opcode_qid); qid = tmp___0 & 131071U; txq = (struct sge_txq *)*((q->adap)->sge.egr_map + (unsigned long )(qid - (q->adap)->sge.egr_start)); txq->restarts = txq->restarts + 1UL; if ((unsigned long )((u8 *)(& (q->adap)->sge.ofldtxq)) > (unsigned long )((u8 *)txq)) { __mptr = (struct sge_txq const *)txq; eq = (struct sge_eth_txq *)__mptr; netif_tx_wake_queue(eq->txq); } else { __mptr___0 = (struct sge_txq const *)txq; oq = (struct sge_ofld_txq *)__mptr___0; tasklet_schedule(& oq->qresume_tsk); } } else if ((unsigned int )opcode == 224U || (unsigned int )opcode == 192U) { p___0 = (struct cpl_fw6_msg const *)rsp; pcmd = (struct fw_port_cmd const *)(& p___0->data); tmp___1 = __fswab32(pcmd->op_to_portid); cmd = tmp___1 >> 24; tmp___2 = __fswab32(pcmd->action_to_len16); action = tmp___2 >> 16; if (cmd == 27U && action == 3U) { tmp___3 = __fswab32(pcmd->op_to_portid); port = (int )tmp___3 & 15; dev = (q->adap)->port[port]; state_input = (int )((signed char )pcmd->u.info.dcbxdis_pkd) >= 0; cxgb4_dcb_state_fsm(dev, (enum cxgb4_dcb_state_input )state_input); } else { } if (cmd == 27U && action == 5U) { dcb_rpl(q->adap, pcmd); } else if ((unsigned int )((unsigned char )p___0->type) == 0U) { t4_handle_fw_rpl(q->adap, (__be64 const *)(& p___0->data)); } else { } } else if ((unsigned int )opcode == 35U) { p___1 = (struct cpl_l2t_write_rpl const *)rsp; do_l2t_write_rpl(q->adap, p___1); } else if ((unsigned int )opcode == 58U) { p___2 = (struct cpl_set_tcb_rpl const *)rsp; filter_rpl(q->adap, p___2); } else { dev_err((struct device const *)(q->adap)->pdev_dev, "unexpected CPL %#x on FW event queue\n", (int )opcode); } out: ; return (0); } } static int uldrx_handler(struct sge_rspq *q , __be64 const *rsp , struct pkt_gl const *gl ) { struct sge_ofld_rxq *rxq ; struct sge_rspq const *__mptr ; int tmp ; { __mptr = (struct sge_rspq const *)q; rxq = (struct sge_ofld_rxq *)__mptr; if ((unsigned int )((unsigned char )((struct rss_header const *)rsp)->opcode) == 192U && (unsigned int )((unsigned char )((struct cpl_fw4_msg const *)rsp + 1U)->type) == 4U) { rsp = rsp + 2UL; } else { } tmp = (*(ulds[(int )q->uld].rx_handler))((q->adap)->uld_handle[(int )q->uld], rsp, gl); if (tmp != 0) { rxq->stats.nomem = rxq->stats.nomem + 1UL; return (-1); } else { } if ((unsigned long )gl == (unsigned long )((struct pkt_gl const *)0)) { rxq->stats.imm = rxq->stats.imm + 1UL; } else if ((unsigned long )((void *)gl) == (unsigned long )((void *)1)) { rxq->stats.an = rxq->stats.an + 1UL; } else { rxq->stats.pkts = rxq->stats.pkts + 1UL; } return (0); } } static void disable_msi(struct adapter *adapter ) { { if ((adapter->flags & 8U) != 0U) { pci_disable_msix(adapter->pdev); adapter->flags = adapter->flags & 4294967287U; } else if ((adapter->flags & 4U) != 0U) { pci_disable_msi(adapter->pdev); adapter->flags = adapter->flags & 4294967291U; } else { } return; } } static irqreturn_t t4_nondata_intr(int irq , void *cookie ) { struct adapter *adap ; u32 v ; u32 tmp ; { adap = (struct adapter *)cookie; tmp = t4_read_reg(adap, 111552U); v = tmp; if ((v & 8U) != 0U) { adap->swintr = 1U; t4_write_reg(adap, 111552U, v); } else { } if ((adap->flags & 128U) != 0U) { t4_slow_intr_handler(adap); } else { } return (1); } } static void name_msix_vecs(struct adapter *adap ) { int i ; int j ; int msi_idx ; int n ; struct net_device *d ; struct port_info const *pi ; void *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { msi_idx = 2; n = 26; snprintf((char *)(& adap->msix_info[0].desc), (size_t )n, "%s", (char *)(& (adap->port[0])->name)); snprintf((char *)(& adap->msix_info[1].desc), (size_t )n, "%s-FWeventq", (char *)(& (adap->port[0])->name)); j = 0; goto ldv_58284; ldv_58283: d = adap->port[j]; tmp = netdev_priv((struct net_device const *)d); pi = (struct port_info const *)tmp; i = 0; goto ldv_58281; ldv_58280: snprintf((char *)(& adap->msix_info[msi_idx].desc), (size_t )n, "%s-Rx%d", (char *)(& d->name), i); i = i + 1; msi_idx = msi_idx + 1; ldv_58281: ; if ((int )pi->nqsets > i) { goto ldv_58280; } else { } j = j + 1; ldv_58284: ; if ((int )adap->params.nports > j) { goto ldv_58283; } else { } i = 0; goto ldv_58287; ldv_58286: tmp___0 = msi_idx; msi_idx = msi_idx + 1; snprintf((char *)(& adap->msix_info[tmp___0].desc), (size_t )n, "%s-ofld%d", (char *)(& (adap->port[0])->name), i); i = i + 1; ldv_58287: ; if ((int )adap->sge.ofldqsets > i) { goto ldv_58286; } else { } i = 0; goto ldv_58290; ldv_58289: tmp___1 = msi_idx; msi_idx = msi_idx + 1; snprintf((char *)(& adap->msix_info[tmp___1].desc), (size_t )n, "%s-rdma%d", (char *)(& (adap->port[0])->name), i); i = i + 1; ldv_58290: ; if ((int )adap->sge.rdmaqs > i) { goto ldv_58289; } else { } i = 0; goto ldv_58293; ldv_58292: tmp___2 = msi_idx; msi_idx = msi_idx + 1; snprintf((char *)(& adap->msix_info[tmp___2].desc), (size_t )n, "%s-rdma-ciq%d", (char *)(& (adap->port[0])->name), i); i = i + 1; ldv_58293: ; if ((int )adap->sge.rdmaciqs > i) { goto ldv_58292; } else { } return; } } static int request_msix_queue_irqs(struct adapter *adap ) { struct sge *s ; int err ; int ethqidx ; int ofldqidx ; int rdmaqidx ; int rdmaciqqidx ; int msi_index ; { s = & adap->sge; ofldqidx = 0; rdmaqidx = 0; rdmaciqqidx = 0; msi_index = 2; err = ldv_request_irq_10((unsigned int )adap->msix_info[1].vec, & t4_sge_intr_msix, 0UL, (char const *)(& adap->msix_info[1].desc), (void *)(& s->fw_evtq)); if (err != 0) { return (err); } else { } ethqidx = 0; goto ldv_58307; ldv_58306: err = ldv_request_irq_11((unsigned int )adap->msix_info[msi_index].vec, & t4_sge_intr_msix, 0UL, (char const *)(& adap->msix_info[msi_index].desc), (void *)(& s->ethrxq[ethqidx].rspq)); if (err != 0) { goto unwind; } else { } msi_index = msi_index + 1; ethqidx = ethqidx + 1; ldv_58307: ; if ((int )s->ethqsets > ethqidx) { goto ldv_58306; } else { } ofldqidx = 0; goto ldv_58310; ldv_58309: err = ldv_request_irq_12((unsigned int )adap->msix_info[msi_index].vec, & t4_sge_intr_msix, 0UL, (char const *)(& adap->msix_info[msi_index].desc), (void *)(& s->ofldrxq[ofldqidx].rspq)); if (err != 0) { goto unwind; } else { } msi_index = msi_index + 1; ofldqidx = ofldqidx + 1; ldv_58310: ; if ((int )s->ofldqsets > ofldqidx) { goto ldv_58309; } else { } rdmaqidx = 0; goto ldv_58313; ldv_58312: err = ldv_request_irq_13((unsigned int )adap->msix_info[msi_index].vec, & t4_sge_intr_msix, 0UL, (char const *)(& adap->msix_info[msi_index].desc), (void *)(& s->rdmarxq[rdmaqidx].rspq)); if (err != 0) { goto unwind; } else { } msi_index = msi_index + 1; rdmaqidx = rdmaqidx + 1; ldv_58313: ; if ((int )s->rdmaqs > rdmaqidx) { goto ldv_58312; } else { } rdmaciqqidx = 0; goto ldv_58316; ldv_58315: err = ldv_request_irq_14((unsigned int )adap->msix_info[msi_index].vec, & t4_sge_intr_msix, 0UL, (char const *)(& adap->msix_info[msi_index].desc), (void *)(& s->rdmaciq[rdmaciqqidx].rspq)); if (err != 0) { goto unwind; } else { } msi_index = msi_index + 1; rdmaciqqidx = rdmaciqqidx + 1; ldv_58316: ; if ((int )s->rdmaciqs > rdmaciqqidx) { goto ldv_58315; } else { } return (0); unwind: ; goto ldv_58319; ldv_58318: msi_index = msi_index - 1; ldv_free_irq_15((unsigned int )adap->msix_info[msi_index].vec, (void *)(& s->rdmaciq[rdmaciqqidx].rspq)); ldv_58319: rdmaciqqidx = rdmaciqqidx - 1; if (rdmaciqqidx >= 0) { goto ldv_58318; } else { } goto ldv_58322; ldv_58321: msi_index = msi_index - 1; ldv_free_irq_16((unsigned int )adap->msix_info[msi_index].vec, (void *)(& s->rdmarxq[rdmaqidx].rspq)); ldv_58322: rdmaqidx = rdmaqidx - 1; if (rdmaqidx >= 0) { goto ldv_58321; } else { } goto ldv_58325; ldv_58324: msi_index = msi_index - 1; ldv_free_irq_17((unsigned int )adap->msix_info[msi_index].vec, (void *)(& s->ofldrxq[ofldqidx].rspq)); ldv_58325: ofldqidx = ofldqidx - 1; if (ofldqidx >= 0) { goto ldv_58324; } else { } goto ldv_58328; ldv_58327: msi_index = msi_index - 1; ldv_free_irq_18((unsigned int )adap->msix_info[msi_index].vec, (void *)(& s->ethrxq[ethqidx].rspq)); ldv_58328: ethqidx = ethqidx - 1; if (ethqidx >= 0) { goto ldv_58327; } else { } ldv_free_irq_19((unsigned int )adap->msix_info[1].vec, (void *)(& s->fw_evtq)); return (err); } } static void free_msix_queue_irqs(struct adapter *adap ) { int i ; int msi_index ; struct sge *s ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { msi_index = 2; s = & adap->sge; ldv_free_irq_20((unsigned int )adap->msix_info[1].vec, (void *)(& s->fw_evtq)); i = 0; goto ldv_58337; ldv_58336: tmp = msi_index; msi_index = msi_index + 1; ldv_free_irq_21((unsigned int )adap->msix_info[tmp].vec, (void *)(& s->ethrxq[i].rspq)); i = i + 1; ldv_58337: ; if ((int )s->ethqsets > i) { goto ldv_58336; } else { } i = 0; goto ldv_58340; ldv_58339: tmp___0 = msi_index; msi_index = msi_index + 1; ldv_free_irq_22((unsigned int )adap->msix_info[tmp___0].vec, (void *)(& s->ofldrxq[i].rspq)); i = i + 1; ldv_58340: ; if ((int )s->ofldqsets > i) { goto ldv_58339; } else { } i = 0; goto ldv_58343; ldv_58342: tmp___1 = msi_index; msi_index = msi_index + 1; ldv_free_irq_23((unsigned int )adap->msix_info[tmp___1].vec, (void *)(& s->rdmarxq[i].rspq)); i = i + 1; ldv_58343: ; if ((int )s->rdmaqs > i) { goto ldv_58342; } else { } i = 0; goto ldv_58346; ldv_58345: tmp___2 = msi_index; msi_index = msi_index + 1; ldv_free_irq_24((unsigned int )adap->msix_info[tmp___2].vec, (void *)(& s->rdmaciq[i].rspq)); i = i + 1; ldv_58346: ; if ((int )s->rdmaciqs > i) { goto ldv_58345; } else { } return; } } int cxgb4_write_rss(struct port_info const *pi , u16 const *queues ) { u16 *rss ; int i ; int err ; struct adapter *adapter ; struct sge_eth_rxq const *rxq ; void *tmp ; { adapter = pi->adapter; rxq = (struct sge_eth_rxq const *)(& adapter->sge.ethrxq) + (unsigned long )pi->first_qset; tmp = kmalloc((unsigned long )pi->rss_size * 2UL, 208U); rss = (u16 *)tmp; if ((unsigned long )rss == (unsigned long )((u16 *)0U)) { return (-12); } else { } i = 0; goto ldv_58358; ldv_58357: *(rss + (unsigned long )i) = (rxq + (unsigned long )*queues)->rspq.abs_id; i = i + 1; queues = queues + 1; ldv_58358: ; if ((int )pi->rss_size > i) { goto ldv_58357; } else { } err = t4_config_rss_range(adapter, (int )adapter->pf, (unsigned int )pi->viid, 0, (int )pi->rss_size, (u16 const *)rss, (unsigned int )pi->rss_size); if (err == 0) { err = t4_config_vi_rss(adapter, (int )adapter->mbox, (unsigned int )pi->viid, 31U, (unsigned int )*rss); } else { } kfree((void const *)rss); return (err); } } static int setup_rss(struct adapter *adap ) { int i ; int j ; int err ; struct port_info const *pi ; struct port_info *tmp ; { i = 0; goto ldv_58371; ldv_58370: tmp = adap2pinfo(adap, i); pi = (struct port_info const *)tmp; j = 0; goto ldv_58368; ldv_58367: *(pi->rss + (unsigned long )j) = (u16 )(j % (int )pi->nqsets); j = j + 1; ldv_58368: ; if ((int )pi->rss_size > j) { goto ldv_58367; } else { } err = cxgb4_write_rss(pi, (u16 const *)pi->rss); if (err != 0) { return (err); } else { } i = i + 1; ldv_58371: ; if ((int )adap->params.nports > i) { goto ldv_58370; } else { } return (0); } } static unsigned int rxq_to_chan(struct sge const *p , unsigned int qid ) { struct port_info *tmp ; { qid = qid - (unsigned int )p->ingr_start; tmp = netdev2pinfo((struct net_device const *)(*(p->ingr_map + (unsigned long )qid))->netdev); return ((unsigned int )tmp->tx_chan); } } static void quiesce_rx(struct adapter *adap ) { int i ; struct sge_rspq *q ; unsigned long __ms ; unsigned long tmp ; bool tmp___0 ; int tmp___1 ; { i = 0; goto ldv_58390; ldv_58389: q = *(adap->sge.ingr_map + (unsigned long )i); if ((unsigned long )q != (unsigned long )((struct sge_rspq *)0) && (unsigned long )q->handler != (unsigned long )((int (*)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ))0)) { napi_disable(& q->napi); local_bh_disable(); goto ldv_58387; ldv_58386: ; if (1) { __const_udelay(4295000UL); } else { __ms = 1UL; goto ldv_58384; ldv_58383: __const_udelay(4295000UL); ldv_58384: tmp = __ms; __ms = __ms - 1UL; if (tmp != 0UL) { goto ldv_58383; } else { } } ldv_58387: tmp___0 = cxgb_poll_lock_napi(q); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { goto ldv_58386; } else { } local_bh_enable(); } else { } i = i + 1; ldv_58390: ; if ((unsigned int )i < adap->sge.ingr_sz) { goto ldv_58389; } else { } return; } } static void disable_interrupts(struct adapter *adap ) { { if ((int )adap->flags & 1) { t4_intr_disable(adap); if ((adap->flags & 8U) != 0U) { free_msix_queue_irqs(adap); ldv_free_irq_25((unsigned int )adap->msix_info[0].vec, (void *)adap); } else { ldv_free_irq_26((adap->pdev)->irq, (void *)adap); } quiesce_rx(adap); } else { } return; } } static void enable_rx(struct adapter *adap ) { int i ; struct sge_rspq *q ; { i = 0; goto ldv_58402; ldv_58401: q = *(adap->sge.ingr_map + (unsigned long )i); if ((unsigned long )q == (unsigned long )((struct sge_rspq *)0)) { goto ldv_58400; } else { } if ((unsigned long )q->handler != (unsigned long )((int (*)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ))0)) { cxgb_busy_poll_init_lock(q); napi_enable(& q->napi); } else { } t4_write_reg(adap, 110596U, (u32 )(((int )q->intr_params << 12) | ((int )q->cntxt_id << 16))); ldv_58400: i = i + 1; ldv_58402: ; if ((unsigned int )i < adap->sge.ingr_sz) { goto ldv_58401; } else { } return; } } static int alloc_ofld_rxqs(struct adapter *adap , struct sge_ofld_rxq *q , unsigned int nq , unsigned int per_chan , int msi_idx , u16 *ids ) { int i ; int err ; { i = 0; goto ldv_58415; ldv_58414: ; if (msi_idx > 0) { msi_idx = msi_idx + 1; } else { } err = t4_sge_alloc_rxq(adap, & q->rspq, 0, adap->port[(unsigned int )i / per_chan], msi_idx, q->fl.size != 0U ? & q->fl : (struct sge_fl *)0, & uldrx_handler, 0); if (err != 0) { return (err); } else { } memset((void *)(& q->stats), 0, 32UL); if ((unsigned long )ids != (unsigned long )((u16 *)0U)) { *(ids + (unsigned long )i) = q->rspq.abs_id; } else { } i = i + 1; q = q + 1; ldv_58415: ; if ((unsigned int )i < nq) { goto ldv_58414; } else { } return (0); } } static int setup_sge_queues(struct adapter *adap ) { int err ; int msi_idx ; int i ; int j ; struct sge *s ; struct net_device *dev ; struct port_info *pi ; void *tmp ; struct sge_eth_rxq *q ; struct sge_eth_txq *t ; unsigned int tmp___0 ; struct netdev_queue *tmp___1 ; struct port_info *tmp___2 ; int tmp___3 ; { s = & adap->sge; bitmap_zero(s->starving_fl, s->egr_sz); bitmap_zero(s->txq_maperr, s->egr_sz); if ((adap->flags & 8U) != 0U) { msi_idx = 1; } else { err = t4_sge_alloc_rxq(adap, & s->intrq, 0, adap->port[0], 0, (struct sge_fl *)0, (int (*)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ))0, -1); if (err != 0) { return (err); } else { } msi_idx = ~ ((int )s->intrq.abs_id); } err = t4_sge_alloc_rxq(adap, & s->fw_evtq, 1, adap->port[0], msi_idx, (struct sge_fl *)0, & fwevtq_handler, -1); if (err != 0) { freeout: t4_free_sge_resources(adap); return (err); } else { } i = 0; goto ldv_58437; ldv_58436: dev = adap->port[i]; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; q = (struct sge_eth_rxq *)(& s->ethrxq) + (unsigned long )pi->first_qset; t = (struct sge_eth_txq *)(& s->ethtxq) + (unsigned long )pi->first_qset; j = 0; goto ldv_58431; ldv_58430: ; if (msi_idx > 0) { msi_idx = msi_idx + 1; } else { } tmp___0 = t4_get_mps_bg_map(adap, (int )pi->tx_chan); err = t4_sge_alloc_rxq(adap, & q->rspq, 0, dev, msi_idx, & q->fl, & t4_ethrx_handler, (int )tmp___0); if (err != 0) { goto freeout; } else { } q->rspq.idx = (u8 )j; memset((void *)(& q->stats), 0, 48UL); j = j + 1; q = q + 1; ldv_58431: ; if ((int )pi->nqsets > j) { goto ldv_58430; } else { } j = 0; goto ldv_58434; ldv_58433: tmp___1 = netdev_get_tx_queue((struct net_device const *)dev, (unsigned int )j); err = t4_sge_alloc_eth_txq(adap, t, dev, tmp___1, (unsigned int )s->fw_evtq.cntxt_id); if (err != 0) { goto freeout; } else { } j = j + 1; t = t + 1; ldv_58434: ; if ((int )pi->nqsets > j) { goto ldv_58433; } else { } i = i + 1; ldv_58437: ; if ((int )adap->params.nports > i) { goto ldv_58436; } else { } j = (int )s->ofldqsets / (int )adap->params.nports; i = 0; goto ldv_58440; ldv_58439: err = t4_sge_alloc_ofld_txq(adap, (struct sge_ofld_txq *)(& s->ofldtxq) + (unsigned long )i, adap->port[i / j], (unsigned int )s->fw_evtq.cntxt_id); if (err != 0) { goto freeout; } else { } i = i + 1; ldv_58440: ; if ((int )s->ofldqsets > i) { goto ldv_58439; } else { } err = alloc_ofld_rxqs(adap, (struct sge_ofld_rxq *)(& s->ofldrxq), (unsigned int )s->ofldqsets, (unsigned int )j, msi_idx, (u16 *)(& s->ofld_rxq)); if (err != 0) { goto freeout; } else { } if (msi_idx > 0) { msi_idx = (int )s->ofldqsets + msi_idx; } else { } err = alloc_ofld_rxqs(adap, (struct sge_ofld_rxq *)(& s->rdmarxq), (unsigned int )s->rdmaqs, 1U, msi_idx, (u16 *)(& s->rdma_rxq)); if (err != 0) { goto freeout; } else { } if (msi_idx > 0) { msi_idx = (int )s->rdmaqs + msi_idx; } else { } j = (int )s->rdmaciqs / (int )adap->params.nports; err = alloc_ofld_rxqs(adap, (struct sge_ofld_rxq *)(& s->rdmaciq), (unsigned int )s->rdmaciqs, (unsigned int )j, msi_idx, (u16 *)(& s->rdma_ciq)); if (err != 0) { goto freeout; } else { } if (msi_idx > 0) { msi_idx = (int )s->rdmaciqs + msi_idx; } else { } i = 0; goto ldv_58443; ldv_58442: err = t4_sge_alloc_ctrl_txq(adap, (struct sge_ctrl_txq *)(& s->ctrlq) + (unsigned long )i, adap->port[i], (unsigned int )s->fw_evtq.cntxt_id, (unsigned int )s->rdmarxq[i].rspq.cntxt_id); if (err != 0) { goto freeout; } else { } i = i + 1; ldv_58443: ; if ((int )adap->params.nports > i) { goto ldv_58442; } else { } tmp___2 = netdev2pinfo((struct net_device const *)adap->port[0]); tmp___3 = is_t4(adap->params.chip); t4_write_reg(adap, tmp___3 != 0 ? 38920U : 40972U, (u32 )(((int )tmp___2->tx_chan << 16) | (int )s->ethrxq[0].rspq.abs_id)); return (0); } } void *t4_alloc_mem(size_t size ) { void *p ; void *tmp ; { tmp = kzalloc(size, 720U); p = tmp; if ((unsigned long )p == (unsigned long )((void *)0)) { p = vzalloc(size); } else { } return (p); } } void t4_free_mem(void *addr ) { { kvfree((void const *)addr); return; } } static int set_filter_wr(struct adapter *adapter , int fidx ) { struct filter_entry *f ; struct sk_buff *skb ; struct fw_filter_wr *fwr ; unsigned int ftid ; int tmp ; unsigned char *tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u16 tmp___3 ; __u16 tmp___4 ; __u16 tmp___5 ; __u32 tmp___6 ; __u16 tmp___7 ; __u16 tmp___8 ; __u16 tmp___9 ; __u16 tmp___10 ; __u16 tmp___11 ; __u16 tmp___12 ; __u16 tmp___13 ; __u16 tmp___14 ; { f = adapter->tids.ftid_tab + (unsigned long )fidx; skb = alloc_skb(128U, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } if ((unsigned int )*((unsigned char *)f + 18UL) != 0U || (unsigned int )*((unsigned short *)f + 9UL) != 0U) { f->l2t = t4_l2t_alloc_switching(adapter->l2t); if ((unsigned long )f->l2t == (unsigned long )((struct l2t_entry *)0)) { kfree_skb(skb); return (-11); } else { } tmp = t4_l2t_set_switching(adapter, f->l2t, (int )f->fs.vlan, (int )f->fs.eport, (u8 *)(& f->fs.dmac)); if (tmp != 0) { cxgb4_l2t_release(f->l2t); f->l2t = (struct l2t_entry *)0; kfree_skb(skb); return (-12); } else { } } else { } ftid = adapter->tids.ftid_base + (unsigned int )fidx; tmp___0 = __skb_put(skb, 128U); fwr = (struct fw_filter_wr *)tmp___0; memset((void *)fwr, 0, 128UL); fwr->op_pkd = 2U; fwr->len16_pkd = 134217728U; tmp___1 = __fswab32(((ftid << 12) | (unsigned int )((int )f->fs.type << 11)) | (unsigned int )f->fs.iq); fwr->tid_to_iq = tmp___1; tmp___2 = __fswab32((__u32 )(((((((((((((((int )f->fs.rpttid << 25) | ((unsigned int )*((unsigned char *)f + 16UL) == 8U ? 16777216 : 0)) | ((int )f->fs.dirsteer << 23)) | ((int )f->fs.maskhash << 22)) | ((int )f->fs.dirsteerhash << 21)) | ((unsigned int )*((unsigned char *)f + 16UL) == 16U ? 1048576 : 0)) | ((int )f->fs.newdmac << 19)) | ((int )f->fs.newsmac << 18)) | (((unsigned int )*((unsigned short *)f + 9UL) == 256U || (unsigned int )*((unsigned short *)f + 9UL) == 384U) << 17)) | (((unsigned int )*((unsigned short *)f + 9UL) == 128U || (unsigned int )*((unsigned short *)f + 9UL) == 384U) << 16)) | ((int )f->fs.hitcnts << 15)) | ((int )f->fs.eport << 13)) | ((int )f->fs.prio << 12)) | ((unsigned long )f->l2t != (unsigned long )((struct l2t_entry *)0) ? (int )(f->l2t)->idx : 0))); fwr->del_filter_to_l2tix = tmp___2; tmp___3 = __fswab16((int )f->fs.val.ethtype); fwr->ethtype = tmp___3; tmp___4 = __fswab16((int )f->fs.mask.ethtype); fwr->ethtypem = tmp___4; fwr->frag_to_ovlan_vldm = (__u8 )((((((int )((signed char )((int )f->fs.val.frag << 7)) | (int )((signed char )((int )f->fs.mask.frag << 6))) | (int )((signed char )((int )f->fs.val.ivlan_vld << 5))) | (int )((signed char )((int )f->fs.val.ovlan_vld << 4))) | (int )((signed char )((int )f->fs.mask.ivlan_vld << 3))) | (int )((signed char )((int )f->fs.mask.ovlan_vld << 2))); fwr->smac_sel = 0U; tmp___5 = __fswab16((int )adapter->sge.fw_evtq.abs_id); fwr->rx_chan_rx_rpl_iq = tmp___5; tmp___6 = __fswab32((__u32 )(((((((((int )f->fs.val.macidx << 23) | ((int )f->fs.mask.macidx << 14)) | ((int )f->fs.val.fcoe << 13)) | ((int )f->fs.mask.fcoe << 12)) | ((int )f->fs.val.iport << 9)) | ((int )f->fs.mask.iport << 6)) | ((int )f->fs.val.matchtype << 3)) | (int )f->fs.mask.matchtype)); fwr->maci_to_matchtypem = tmp___6; fwr->ptcl = f->fs.val.proto; fwr->ptclm = f->fs.mask.proto; fwr->ttyp = f->fs.val.tos; fwr->ttypm = f->fs.mask.tos; tmp___7 = __fswab16((int )f->fs.val.ivlan); fwr->ivlan = tmp___7; tmp___8 = __fswab16((int )f->fs.mask.ivlan); fwr->ivlanm = tmp___8; tmp___9 = __fswab16((int )f->fs.val.ovlan); fwr->ovlan = tmp___9; tmp___10 = __fswab16((int )f->fs.mask.ovlan); fwr->ovlanm = tmp___10; memcpy((void *)(& fwr->lip), (void const *)(& f->fs.val.lip), 16UL); memcpy((void *)(& fwr->lipm), (void const *)(& f->fs.mask.lip), 16UL); memcpy((void *)(& fwr->fip), (void const *)(& f->fs.val.fip), 16UL); memcpy((void *)(& fwr->fipm), (void const *)(& f->fs.mask.fip), 16UL); tmp___11 = __fswab16((int )f->fs.val.lport); fwr->lp = tmp___11; tmp___12 = __fswab16((int )f->fs.mask.lport); fwr->lpm = tmp___12; tmp___13 = __fswab16((int )f->fs.val.fport); fwr->fp = tmp___13; tmp___14 = __fswab16((int )f->fs.mask.fport); fwr->fpm = tmp___14; if ((unsigned int )*((unsigned char *)f + 18UL) != 0U) { memcpy((void *)(& fwr->sma), (void const *)(& f->fs.smac), 6UL); } else { } f->pending = 1U; set_wr_txq(skb, 1, (int )f->fs.val.iport & 3); t4_ofld_send(adapter, skb); return (0); } } static int del_filter_wr(struct adapter *adapter , int fidx ) { struct filter_entry *f ; struct sk_buff *skb ; struct fw_filter_wr *fwr ; unsigned int len ; unsigned int ftid ; unsigned char *tmp ; { f = adapter->tids.ftid_tab + (unsigned long )fidx; len = 128U; ftid = adapter->tids.ftid_base + (unsigned int )fidx; skb = alloc_skb(len, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } tmp = __skb_put(skb, len); fwr = (struct fw_filter_wr *)tmp; t4_mk_filtdelwr(ftid, fwr, (int )adapter->sge.fw_evtq.abs_id); f->pending = 1U; t4_mgmt_tx(adapter, skb); return (0); } } static u16 cxgb_select_queue(struct net_device *dev , struct sk_buff *skb , void *accel_priv , u16 (*fallback)(struct net_device * , struct sk_buff * ) ) { int txq ; u16 vlan_tci ; int err ; int tmp ; long tmp___0 ; int tmp___1 ; u16 tmp___3 ; int pscr_ret__ ; void const *__vpp_verify ; int pfo_ret__ ; int pfo_ret_____0 ; int pfo_ret_____1 ; int pfo_ret_____2 ; bool tmp___4 ; long tmp___5 ; u16 tmp___6 ; { tmp___1 = cxgb4_dcb_enabled((struct net_device const *)dev); if (tmp___1 != 0) { err = vlan_get_tag((struct sk_buff const *)skb, & vlan_tci); tmp___0 = ldv__builtin_expect(err != 0, 0L); if (tmp___0 != 0L) { tmp = net_ratelimit(); if (tmp != 0) { netdev_warn((struct net_device const *)dev, "TX Packet without VLAN Tag on DCB Link\n"); } else { } txq = 0; } else { txq = (int )vlan_tci >> 13; if ((unsigned int )skb->protocol == 1673U) { txq = (int )skb->priority & 7; } else { } } return ((u16 )txq); } else { } if (select_queue != 0) { tmp___4 = skb_rx_queue_recorded((struct sk_buff const *)skb); if ((int )tmp___4) { tmp___3 = skb_get_rx_queue((struct sk_buff const *)skb); txq = (int )tmp___3; } else { __vpp_verify = (void const *)0; switch (4UL) { case 1UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (cpu_number)); goto ldv_58483; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_58483; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_58483; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_58483; default: __bad_percpu_size(); } ldv_58483: pscr_ret__ = pfo_ret__; goto ldv_58489; case 2UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____0): "m" (cpu_number)); goto ldv_58493; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_58493; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_58493; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_58493; default: __bad_percpu_size(); } ldv_58493: pscr_ret__ = pfo_ret_____0; goto ldv_58489; case 4UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____1): "m" (cpu_number)); goto ldv_58502; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_58502; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_58502; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_58502; default: __bad_percpu_size(); } ldv_58502: pscr_ret__ = pfo_ret_____1; goto ldv_58489; case 8UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____2): "m" (cpu_number)); goto ldv_58511; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_58511; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_58511; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_58511; default: __bad_percpu_size(); } ldv_58511: pscr_ret__ = pfo_ret_____2; goto ldv_58489; default: __bad_size_call_parameter(); goto ldv_58489; } ldv_58489: txq = pscr_ret__; } goto ldv_58520; ldv_58519: txq = (int )((unsigned int )txq - dev->real_num_tx_queues); ldv_58520: tmp___5 = ldv__builtin_expect((unsigned int )txq >= dev->real_num_tx_queues, 0L); if (tmp___5 != 0L) { goto ldv_58519; } else { } return ((u16 )txq); } else { } tmp___6 = (*fallback)(dev, skb); return ((u16 )((unsigned int )tmp___6 % dev->real_num_tx_queues)); } } static int closest_timer(struct sge const *s , int time ) { int i ; int delta ; int match ; int min_delta ; { match = 0; min_delta = 2147483647; i = 0; goto ldv_58533; ldv_58532: delta = time - (int )s->timer_val[i]; if (delta < 0) { delta = - delta; } else { } if (delta < min_delta) { min_delta = delta; match = i; } else { } i = i + 1; ldv_58533: ; if ((unsigned int )i <= 5U) { goto ldv_58532; } else { } return (match); } } static int closest_thres(struct sge const *s , int thres ) { int i ; int delta ; int match ; int min_delta ; { match = 0; min_delta = 2147483647; i = 0; goto ldv_58546; ldv_58545: delta = thres - (int )s->counter_val[i]; if (delta < 0) { delta = - delta; } else { } if (delta < min_delta) { min_delta = delta; match = i; } else { } i = i + 1; ldv_58546: ; if ((unsigned int )i <= 3U) { goto ldv_58545; } else { } return (match); } } int cxgb4_set_rspq_intr_params(struct sge_rspq *q , unsigned int us , unsigned int cnt ) { struct adapter *adap ; int err ; u32 v ; u32 new_idx ; int tmp ; int tmp___0 ; { adap = q->adap; if ((us | cnt) == 0U) { cnt = 1U; } else { } if (cnt != 0U) { tmp = closest_thres((struct sge const *)(& adap->sge), (int )cnt); new_idx = (u32 )tmp; if ((unsigned long )q->desc != (unsigned long )((__be64 *)0ULL) && (u32 )q->pktcnt_idx != new_idx) { v = (u32 )((int )q->cntxt_id | 67174400); err = t4_set_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& v), (u32 const *)(& new_idx)); if (err != 0) { return (err); } else { } } else { } q->pktcnt_idx = (u8 )new_idx; } else { } if (us != 0U) { tmp___0 = closest_timer((struct sge const *)(& adap->sge), (int )us); us = (unsigned int )tmp___0; } else { us = 6U; } q->intr_params = ((int )((u8 )us) << 1U) | (cnt != 0U); return (0); } } static int cxgb_set_features(struct net_device *dev , netdev_features_t features ) { struct port_info const *pi ; void *tmp ; netdev_features_t changed ; int err ; long tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; changed = dev->features ^ features; if ((changed & 256ULL) == 0ULL) { return (0); } else { } err = t4_set_rxmode(pi->adapter, (pi->adapter)->pf, (unsigned int )pi->viid, -1, -1, -1, -1, (features & 256ULL) != 0ULL, 1); tmp___0 = ldv__builtin_expect(err != 0, 0L); if (tmp___0 != 0L) { dev->features = features ^ 256ULL; } else { } return (err); } } static int setup_debugfs(struct adapter *adap ) { bool tmp ; { tmp = IS_ERR_OR_NULL((void const *)adap->debugfs_root); if ((int )tmp) { return (-1); } else { } t4_setup_debugfs(adap); return (0); } } int cxgb4_alloc_atid(struct tid_info *t , void *data ) { int atid ; union aopen_entry *p ; { atid = -1; spin_lock_bh(& t->atid_lock); if ((unsigned long )t->afree != (unsigned long )((union aopen_entry *)0)) { p = t->afree; atid = (int )((unsigned int )(((long )p - (long )t->atid_tab) / 8L) + t->atid_base); t->afree = p->next; p->data = data; t->atids_in_use = t->atids_in_use + 1U; } else { } spin_unlock_bh(& t->atid_lock); return (atid); } } static char const __kstrtab_cxgb4_alloc_atid[17U] = { 'c', 'x', 'g', 'b', '4', '_', 'a', 'l', 'l', 'o', 'c', '_', 'a', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_alloc_atid ; struct kernel_symbol const __ksymtab_cxgb4_alloc_atid = {(unsigned long )(& cxgb4_alloc_atid), (char const *)(& __kstrtab_cxgb4_alloc_atid)}; void cxgb4_free_atid(struct tid_info *t , unsigned int atid ) { union aopen_entry *p ; { p = t->atid_tab + (unsigned long )(atid - t->atid_base); spin_lock_bh(& t->atid_lock); p->next = t->afree; t->afree = p; t->atids_in_use = t->atids_in_use - 1U; spin_unlock_bh(& t->atid_lock); return; } } static char const __kstrtab_cxgb4_free_atid[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'f', 'r', 'e', 'e', '_', 'a', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_free_atid ; struct kernel_symbol const __ksymtab_cxgb4_free_atid = {(unsigned long )(& cxgb4_free_atid), (char const *)(& __kstrtab_cxgb4_free_atid)}; int cxgb4_alloc_stid(struct tid_info *t , int family , void *data ) { int stid ; unsigned long tmp ; { spin_lock_bh(& t->stid_lock); if (family == 2) { tmp = find_first_zero_bit((unsigned long const *)t->stid_bmap, (unsigned long )t->nstids); stid = (int )tmp; if ((unsigned int )stid < t->nstids) { __set_bit((long )stid, (unsigned long volatile *)t->stid_bmap); } else { stid = -1; } } else { stid = bitmap_find_free_region(t->stid_bmap, t->nstids, 2); if (stid < 0) { stid = -1; } else { } } if (stid >= 0) { (t->stid_tab + (unsigned long )stid)->data = data; stid = (int )(t->stid_base + (unsigned int )stid); if (family == 2) { t->stids_in_use = t->stids_in_use + 1U; } else { t->stids_in_use = t->stids_in_use + 4U; } } else { } spin_unlock_bh(& t->stid_lock); return (stid); } } static char const __kstrtab_cxgb4_alloc_stid[17U] = { 'c', 'x', 'g', 'b', '4', '_', 'a', 'l', 'l', 'o', 'c', '_', 's', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_alloc_stid ; struct kernel_symbol const __ksymtab_cxgb4_alloc_stid = {(unsigned long )(& cxgb4_alloc_stid), (char const *)(& __kstrtab_cxgb4_alloc_stid)}; int cxgb4_alloc_sftid(struct tid_info *t , int family , void *data ) { int stid ; unsigned long tmp ; { spin_lock_bh(& t->stid_lock); if (family == 2) { tmp = find_next_zero_bit((unsigned long const *)t->stid_bmap, (unsigned long )(t->nstids + t->nsftids), (unsigned long )t->nstids); stid = (int )tmp; if ((unsigned int )stid < t->nstids + t->nsftids) { __set_bit((long )stid, (unsigned long volatile *)t->stid_bmap); } else { stid = -1; } } else { stid = -1; } if (stid >= 0) { (t->stid_tab + (unsigned long )stid)->data = data; stid = (int )((unsigned int )stid - t->nstids); stid = (int )(t->sftid_base + (unsigned int )stid); t->stids_in_use = t->stids_in_use + 1U; } else { } spin_unlock_bh(& t->stid_lock); return (stid); } } static char const __kstrtab_cxgb4_alloc_sftid[18U] = { 'c', 'x', 'g', 'b', '4', '_', 'a', 'l', 'l', 'o', 'c', '_', 's', 'f', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_alloc_sftid ; struct kernel_symbol const __ksymtab_cxgb4_alloc_sftid = {(unsigned long )(& cxgb4_alloc_sftid), (char const *)(& __kstrtab_cxgb4_alloc_sftid)}; void cxgb4_free_stid(struct tid_info *t , unsigned int stid , int family ) { { if (t->nsftids != 0U && t->sftid_base <= stid) { stid = stid - t->sftid_base; stid = t->nstids + stid; } else { stid = stid - t->stid_base; } spin_lock_bh(& t->stid_lock); if (family == 2) { __clear_bit((long )stid, (unsigned long volatile *)t->stid_bmap); } else { bitmap_release_region(t->stid_bmap, stid, 2); } (t->stid_tab + (unsigned long )stid)->data = (void *)0; if (family == 2) { t->stids_in_use = t->stids_in_use - 1U; } else { t->stids_in_use = t->stids_in_use - 4U; } spin_unlock_bh(& t->stid_lock); return; } } static char const __kstrtab_cxgb4_free_stid[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'f', 'r', 'e', 'e', '_', 's', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_free_stid ; struct kernel_symbol const __ksymtab_cxgb4_free_stid = {(unsigned long )(& cxgb4_free_stid), (char const *)(& __kstrtab_cxgb4_free_stid)}; static void mk_tid_release(struct sk_buff *skb , unsigned int chan , unsigned int tid ) { struct cpl_tid_release *req ; unsigned char *tmp ; __u32 tmp___0 ; __u32 tmp___1 ; { set_wr_txq(skb, 1, (int )chan); tmp = __skb_put(skb, 24U); req = (struct cpl_tid_release *)tmp; req->wr.wr_hi = 134217733U; tmp___0 = __fswab32((tid << 8) | 2U); req->wr.wr_mid = tmp___0; req->wr.wr_lo = 0ULL; tmp___1 = __fswab32(tid | 436207616U); req->ot.opcode_tid = tmp___1; return; } } static void cxgb4_queue_tid_release(struct tid_info *t , unsigned int chan , unsigned int tid ) { void **p ; struct adapter *adap ; struct tid_info const *__mptr ; { p = t->tid_tab + (unsigned long )tid; __mptr = (struct tid_info const *)t; adap = (struct adapter *)__mptr + 0xfffffffffffeeb00UL; spin_lock_bh(& adap->tid_release_lock); *p = (void *)adap->tid_release_head; adap->tid_release_head = (void **)((unsigned long )chan | (unsigned long )p); if (! adap->tid_release_task_busy) { adap->tid_release_task_busy = 1; queue_work(adap->workq, & adap->tid_release_task); } else { } spin_unlock_bh(& adap->tid_release_lock); return; } } static void process_tid_release_list(struct work_struct *work ) { struct sk_buff *skb ; struct adapter *adap ; struct work_struct const *__mptr ; void **p ; unsigned int chan ; { __mptr = (struct work_struct const *)work; adap = (struct adapter *)__mptr + 0xfffffffffffee968UL; spin_lock_bh(& adap->tid_release_lock); goto ldv_58666; ldv_58665: p = adap->tid_release_head; chan = (unsigned int )((long )p) & 3U; p = p + - ((unsigned long )chan); adap->tid_release_head = (void **)*p; *p = (void *)0; spin_unlock_bh(& adap->tid_release_lock); goto ldv_58663; ldv_58662: schedule_timeout_uninterruptible(1L); ldv_58663: skb = alloc_skb(24U, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { goto ldv_58662; } else { } mk_tid_release(skb, chan, (unsigned int )(((long )p - (long )adap->tids.tid_tab) / 8L)); t4_ofld_send(adap, skb); spin_lock_bh(& adap->tid_release_lock); ldv_58666: ; if ((unsigned long )adap->tid_release_head != (unsigned long )((void **)0)) { goto ldv_58665; } else { } adap->tid_release_task_busy = 0; spin_unlock_bh(& adap->tid_release_lock); return; } } void cxgb4_remove_tid(struct tid_info *t , unsigned int chan , unsigned int tid ) { void *old ; struct sk_buff *skb ; struct adapter *adap ; struct tid_info const *__mptr ; long tmp ; { __mptr = (struct tid_info const *)t; adap = (struct adapter *)__mptr + 0xfffffffffffeeb00UL; old = *(t->tid_tab + (unsigned long )tid); skb = alloc_skb(24U, 32U); tmp = ldv__builtin_expect((unsigned long )skb != (unsigned long )((struct sk_buff *)0), 1L); if (tmp != 0L) { *(t->tid_tab + (unsigned long )tid) = (void *)0; mk_tid_release(skb, chan, tid); t4_ofld_send(adap, skb); } else { cxgb4_queue_tid_release(t, chan, tid); } if ((unsigned long )old != (unsigned long )((void *)0)) { atomic_dec(& t->tids_in_use); } else { } return; } } static char const __kstrtab_cxgb4_remove_tid[17U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'm', 'o', 'v', 'e', '_', 't', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_remove_tid ; struct kernel_symbol const __ksymtab_cxgb4_remove_tid = {(unsigned long )(& cxgb4_remove_tid), (char const *)(& __kstrtab_cxgb4_remove_tid)}; static int tid_init(struct tid_info *t ) { size_t size ; unsigned int stid_bmap_size ; unsigned int natids ; struct adapter *adap ; struct tid_info const *__mptr ; void *tmp ; struct lock_class_key __key ; struct lock_class_key __key___0 ; { natids = t->natids; __mptr = (struct tid_info const *)t; adap = (struct adapter *)__mptr + 0xfffffffffffeeb00UL; stid_bmap_size = (unsigned int )(((unsigned long )(t->nstids + t->nsftids) + 63UL) / 64UL); size = ((((((unsigned long )t->ntids + (unsigned long )natids) + (unsigned long )t->nstids) + (unsigned long )t->nsftids) + (unsigned long )stid_bmap_size) + ((unsigned long )t->nsftids + (unsigned long )t->nftids) * 18UL) * 8UL; tmp = t4_alloc_mem(size); t->tid_tab = (void **)tmp; if ((unsigned long )t->tid_tab == (unsigned long )((void **)0)) { return (-12); } else { } t->atid_tab = (union aopen_entry *)t->tid_tab + (unsigned long )t->ntids; t->stid_tab = (struct serv_entry *)t->atid_tab + (unsigned long )natids; t->stid_bmap = (unsigned long *)t->stid_tab + (unsigned long )(t->nstids + t->nsftids); t->ftid_tab = (struct filter_entry *)t->stid_bmap + (unsigned long )stid_bmap_size; spinlock_check(& t->stid_lock); __raw_spin_lock_init(& t->stid_lock.__annonCompField18.rlock, "&(&t->stid_lock)->rlock", & __key); spinlock_check(& t->atid_lock); __raw_spin_lock_init(& t->atid_lock.__annonCompField18.rlock, "&(&t->atid_lock)->rlock", & __key___0); t->stids_in_use = 0U; t->afree = (union aopen_entry *)0; t->atids_in_use = 0U; atomic_set(& t->tids_in_use, 0); if (natids != 0U) { goto ldv_58699; ldv_58698: (t->atid_tab + (unsigned long )(natids - 1U))->next = t->atid_tab + (unsigned long )natids; ldv_58699: natids = natids - 1U; if (natids != 0U) { goto ldv_58698; } else { } t->afree = t->atid_tab; } else { } bitmap_zero(t->stid_bmap, t->nstids + t->nsftids); if (t->stid_base == 0U && (((unsigned int )adap->params.chip >> 4) & 15U) <= 5U) { __set_bit(0L, (unsigned long volatile *)t->stid_bmap); } else { } return (0); } } int cxgb4_create_server(struct net_device const *dev , unsigned int stid , __be32 sip , __be16 sport , __be16 vlan , unsigned int queue ) { unsigned int chan ; struct sk_buff *skb ; struct adapter *adap ; struct cpl_pass_open_req *req ; int ret ; unsigned char *tmp ; __u32 tmp___0 ; __u64 tmp___1 ; __u64 tmp___2 ; { skb = alloc_skb(48U, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } adap = netdev2adap(dev); tmp = __skb_put(skb, 48U); req = (struct cpl_pass_open_req *)tmp; req->wr.wr_hi = 536870917U; req->wr.wr_mid = 50331648U; req->wr.wr_lo = 0ULL; tmp___0 = __fswab32(stid | 16777216U); req->ot.opcode_tid = tmp___0; req->local_port = sport; req->peer_port = 0U; req->local_ip = sip; req->peer_ip = 0U; chan = rxq_to_chan((struct sge const *)(& adap->sge), queue); tmp___1 = __fswab64((__u64 )(chan << 2)); req->opt0 = tmp___1; tmp___2 = __fswab64((__u64 )((queue << 2) | 4194305U)); req->opt1 = tmp___2; ret = t4_mgmt_tx(adap, skb); return (ret != 2 ? ret : 0); } } static char const __kstrtab_cxgb4_create_server[20U] = { 'c', 'x', 'g', 'b', '4', '_', 'c', 'r', 'e', 'a', 't', 'e', '_', 's', 'e', 'r', 'v', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_create_server ; struct kernel_symbol const __ksymtab_cxgb4_create_server = {(unsigned long )(& cxgb4_create_server), (char const *)(& __kstrtab_cxgb4_create_server)}; int cxgb4_create_server6(struct net_device const *dev , unsigned int stid , struct in6_addr const *sip , __be16 sport , unsigned int queue ) { unsigned int chan ; struct sk_buff *skb ; struct adapter *adap ; struct cpl_pass_open_req6 *req ; int ret ; unsigned char *tmp ; __u32 tmp___0 ; __u64 tmp___1 ; __u64 tmp___2 ; { skb = alloc_skb(72U, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } adap = netdev2adap(dev); tmp = __skb_put(skb, 72U); req = (struct cpl_pass_open_req6 *)tmp; req->wr.wr_hi = 939524101U; req->wr.wr_mid = 83886080U; req->wr.wr_lo = 0ULL; tmp___0 = __fswab32(stid | 2164260864U); req->ot.opcode_tid = tmp___0; req->local_port = sport; req->peer_port = 0U; req->local_ip_hi = *((__be64 *)(& sip->in6_u.u6_addr8)); req->local_ip_lo = *((__be64 *)(& sip->in6_u.u6_addr8) + 8U); req->peer_ip_hi = 0ULL; req->peer_ip_lo = 0ULL; chan = rxq_to_chan((struct sge const *)(& adap->sge), queue); tmp___1 = __fswab64((__u64 )(chan << 2)); req->opt0 = tmp___1; tmp___2 = __fswab64((__u64 )((queue << 2) | 4194305U)); req->opt1 = tmp___2; ret = t4_mgmt_tx(adap, skb); return (ret != 2 ? ret : 0); } } static char const __kstrtab_cxgb4_create_server6[21U] = { 'c', 'x', 'g', 'b', '4', '_', 'c', 'r', 'e', 'a', 't', 'e', '_', 's', 'e', 'r', 'v', 'e', 'r', '6', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_create_server6 ; struct kernel_symbol const __ksymtab_cxgb4_create_server6 = {(unsigned long )(& cxgb4_create_server6), (char const *)(& __kstrtab_cxgb4_create_server6)}; int cxgb4_remove_server(struct net_device const *dev , unsigned int stid , unsigned int queue , bool ipv6 ) { struct sk_buff *skb ; struct adapter *adap ; struct cpl_close_listsvr_req *req ; int ret ; unsigned char *tmp ; __u32 tmp___0 ; __u16 tmp___1 ; { adap = netdev2adap(dev); skb = alloc_skb(24U, 208U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } tmp = __skb_put(skb, 24U); req = (struct cpl_close_listsvr_req *)tmp; req->wr.wr_hi = 134217733U; req->wr.wr_mid = 33554432U; req->wr.wr_lo = 0ULL; tmp___0 = __fswab32(stid | 150994944U); req->ot.opcode_tid = tmp___0; tmp___1 = __fswab16((int )(((int )ipv6 ? 16384U : 0U) | (unsigned int )((__u16 )queue))); req->reply_ctrl = tmp___1; ret = t4_mgmt_tx(adap, skb); return (ret != 2 ? ret : 0); } } static char const __kstrtab_cxgb4_remove_server[20U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'm', 'o', 'v', 'e', '_', 's', 'e', 'r', 'v', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_remove_server ; struct kernel_symbol const __ksymtab_cxgb4_remove_server = {(unsigned long )(& cxgb4_remove_server), (char const *)(& __kstrtab_cxgb4_remove_server)}; unsigned int cxgb4_best_mtu(unsigned short const *mtus , unsigned short mtu , unsigned int *idx ) { unsigned int i ; { i = 0U; goto ldv_58776; ldv_58775: i = i + 1U; ldv_58776: ; if (i <= 14U && (int )((unsigned short )*(mtus + (unsigned long )(i + 1U))) <= (int )mtu) { goto ldv_58775; } else { } if ((unsigned long )idx != (unsigned long )((unsigned int *)0U)) { *idx = i; } else { } return ((unsigned int )*(mtus + (unsigned long )i)); } } static char const __kstrtab_cxgb4_best_mtu[15U] = { 'c', 'x', 'g', 'b', '4', '_', 'b', 'e', 's', 't', '_', 'm', 't', 'u', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_best_mtu ; struct kernel_symbol const __ksymtab_cxgb4_best_mtu = {(unsigned long )(& cxgb4_best_mtu), (char const *)(& __kstrtab_cxgb4_best_mtu)}; unsigned int cxgb4_best_aligned_mtu(unsigned short const *mtus , unsigned short header_size , unsigned short data_size_max , unsigned short data_size_align , unsigned int *mtu_idxp ) { unsigned short max_mtu ; unsigned short data_size_align_mask ; int mtu_idx ; int aligned_mtu_idx ; unsigned short data_size ; { max_mtu = (int )header_size + (int )data_size_max; data_size_align_mask = (unsigned int )data_size_align + 65535U; mtu_idx = 0; aligned_mtu_idx = -1; goto ldv_58801; ldv_58800: data_size = (int )((unsigned short )*(mtus + (unsigned long )mtu_idx)) - (int )header_size; if ((unsigned int )((int )data_size & (int )data_size_align_mask) == 0U) { aligned_mtu_idx = mtu_idx; } else { } if (mtu_idx + 1 <= 15 && (int )((unsigned short )*(mtus + ((unsigned long )mtu_idx + 1UL))) > (int )max_mtu) { goto ldv_58799; } else { } mtu_idx = mtu_idx + 1; ldv_58801: ; if (mtu_idx <= 15) { goto ldv_58800; } else { } ldv_58799: ; if (mtu_idx == 16) { mtu_idx = mtu_idx - 1; } else { } if (aligned_mtu_idx >= 0 && mtu_idx - aligned_mtu_idx <= 1) { mtu_idx = aligned_mtu_idx; } else { } if ((unsigned long )mtu_idxp != (unsigned long )((unsigned int *)0U)) { *mtu_idxp = (unsigned int )mtu_idx; } else { } return ((unsigned int )*(mtus + (unsigned long )mtu_idx)); } } static char const __kstrtab_cxgb4_best_aligned_mtu[23U] = { 'c', 'x', 'g', 'b', '4', '_', 'b', 'e', 's', 't', '_', 'a', 'l', 'i', 'g', 'n', 'e', 'd', '_', 'm', 't', 'u', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_best_aligned_mtu ; struct kernel_symbol const __ksymtab_cxgb4_best_aligned_mtu = {(unsigned long )(& cxgb4_best_aligned_mtu), (char const *)(& __kstrtab_cxgb4_best_aligned_mtu)}; unsigned int cxgb4_port_chan(struct net_device const *dev ) { struct port_info *tmp ; { tmp = netdev2pinfo(dev); return ((unsigned int )tmp->tx_chan); } } static char const __kstrtab_cxgb4_port_chan[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'p', 'o', 'r', 't', '_', 'c', 'h', 'a', 'n', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_port_chan ; struct kernel_symbol const __ksymtab_cxgb4_port_chan = {(unsigned long )(& cxgb4_port_chan), (char const *)(& __kstrtab_cxgb4_port_chan)}; unsigned int cxgb4_dbfifo_count(struct net_device const *dev , int lpfifo ) { struct adapter *adap ; struct adapter *tmp ; u32 v1 ; u32 v2 ; u32 lp_count ; u32 hp_count ; int tmp___0 ; { tmp = netdev2adap(dev); adap = tmp; v1 = t4_read_reg(adap, 4260U); v2 = t4_read_reg(adap, 4376U); tmp___0 = is_t4(adap->params.chip); if (tmp___0 != 0) { lp_count = v1 & 2047U; hp_count = (v1 >> 16) & 2047U; } else { lp_count = v1 & 262143U; hp_count = v2 & 1023U; } return (lpfifo != 0 ? lp_count : hp_count); } } static char const __kstrtab_cxgb4_dbfifo_count[19U] = { 'c', 'x', 'g', 'b', '4', '_', 'd', 'b', 'f', 'i', 'f', 'o', '_', 'c', 'o', 'u', 'n', 't', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_dbfifo_count ; struct kernel_symbol const __ksymtab_cxgb4_dbfifo_count = {(unsigned long )(& cxgb4_dbfifo_count), (char const *)(& __kstrtab_cxgb4_dbfifo_count)}; unsigned int cxgb4_port_viid(struct net_device const *dev ) { struct port_info *tmp ; { tmp = netdev2pinfo(dev); return ((unsigned int )tmp->viid); } } static char const __kstrtab_cxgb4_port_viid[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'p', 'o', 'r', 't', '_', 'v', 'i', 'i', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_port_viid ; struct kernel_symbol const __ksymtab_cxgb4_port_viid = {(unsigned long )(& cxgb4_port_viid), (char const *)(& __kstrtab_cxgb4_port_viid)}; unsigned int cxgb4_port_idx(struct net_device const *dev ) { struct port_info *tmp ; { tmp = netdev2pinfo(dev); return ((unsigned int )tmp->port_id); } } static char const __kstrtab_cxgb4_port_idx[15U] = { 'c', 'x', 'g', 'b', '4', '_', 'p', 'o', 'r', 't', '_', 'i', 'd', 'x', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_port_idx ; struct kernel_symbol const __ksymtab_cxgb4_port_idx = {(unsigned long )(& cxgb4_port_idx), (char const *)(& __kstrtab_cxgb4_port_idx)}; void cxgb4_get_tcp_stats(struct pci_dev *pdev , struct tp_tcp_stats *v4 , struct tp_tcp_stats *v6 ) { struct adapter *adap ; void *tmp ; { tmp = pci_get_drvdata(pdev); adap = (struct adapter *)tmp; spin_lock(& adap->stats_lock); t4_tp_get_tcp_stats(adap, v4, v6); spin_unlock(& adap->stats_lock); return; } } static char const __kstrtab_cxgb4_get_tcp_stats[20U] = { 'c', 'x', 'g', 'b', '4', '_', 'g', 'e', 't', '_', 't', 'c', 'p', '_', 's', 't', 'a', 't', 's', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_get_tcp_stats ; struct kernel_symbol const __ksymtab_cxgb4_get_tcp_stats = {(unsigned long )(& cxgb4_get_tcp_stats), (char const *)(& __kstrtab_cxgb4_get_tcp_stats)}; void cxgb4_iscsi_init(struct net_device *dev , unsigned int tag_mask , unsigned int const *pgsz_order ) { struct adapter *adap ; struct adapter *tmp ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; t4_write_reg(adap, 102756U, tag_mask); t4_write_reg(adap, 102760U, (((unsigned int )*pgsz_order | (unsigned int )(*(pgsz_order + 1UL) << 8)) | (unsigned int )(*(pgsz_order + 2UL) << 16)) | (unsigned int )(*(pgsz_order + 3UL) << 24)); return; } } static char const __kstrtab_cxgb4_iscsi_init[17U] = { 'c', 'x', 'g', 'b', '4', '_', 'i', 's', 'c', 's', 'i', '_', 'i', 'n', 'i', 't', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_iscsi_init ; struct kernel_symbol const __ksymtab_cxgb4_iscsi_init = {(unsigned long )(& cxgb4_iscsi_init), (char const *)(& __kstrtab_cxgb4_iscsi_init)}; int cxgb4_flush_eq_cache(struct net_device *dev ) { struct adapter *adap ; struct adapter *tmp ; int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; tmp___0 = t4_sge_ctxt_flush(adap, adap->mbox); return (tmp___0); } } static char const __kstrtab_cxgb4_flush_eq_cache[21U] = { 'c', 'x', 'g', 'b', '4', '_', 'f', 'l', 'u', 's', 'h', '_', 'e', 'q', '_', 'c', 'a', 'c', 'h', 'e', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_flush_eq_cache ; struct kernel_symbol const __ksymtab_cxgb4_flush_eq_cache = {(unsigned long )(& cxgb4_flush_eq_cache), (char const *)(& __kstrtab_cxgb4_flush_eq_cache)}; static int read_eq_indices(struct adapter *adap , u16 qid , u16 *pidx , u16 *cidx ) { u32 addr ; u32 tmp ; __be64 indices ; int ret ; __u64 tmp___0 ; __u64 tmp___1 ; { tmp = t4_read_reg(adap, 4228U); addr = (tmp + (u32 )((int )qid * 24)) + 8U; spin_lock(& adap->win0_lock); ret = t4_memory_rw(adap, 0, 0, addr, 8U, (void *)(& indices), 1); spin_unlock(& adap->win0_lock); if (ret == 0) { tmp___0 = __fswab64(indices); *cidx = (u16 )(tmp___0 >> 25); tmp___1 = __fswab64(indices); *pidx = (u16 )(tmp___1 >> 9); } else { } return (ret); } } int cxgb4_sync_txq_pidx(struct net_device *dev , u16 qid , u16 pidx , u16 size ) { struct adapter *adap ; struct adapter *tmp ; u16 hw_pidx ; u16 hw_cidx ; int ret ; u16 delta ; u32 val ; int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; ret = read_eq_indices(adap, (int )qid, & hw_pidx, & hw_cidx); if (ret != 0) { goto out; } else { } if ((int )pidx != (int )hw_pidx) { if ((int )pidx >= (int )hw_pidx) { delta = (int )pidx - (int )hw_pidx; } else { delta = ((int )size - (int )hw_pidx) + (int )pidx; } tmp___0 = is_t4(adap->params.chip); if (tmp___0 != 0) { val = (u32 )delta; } else { val = (u32 )delta; } __asm__ volatile ("sfence": : : "memory"); t4_write_reg(adap, 110592U, (u32 )((int )qid << 15) | val); } else { } out: ; return (ret); } } static char const __kstrtab_cxgb4_sync_txq_pidx[20U] = { 'c', 'x', 'g', 'b', '4', '_', 's', 'y', 'n', 'c', '_', 't', 'x', 'q', '_', 'p', 'i', 'd', 'x', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_sync_txq_pidx ; struct kernel_symbol const __ksymtab_cxgb4_sync_txq_pidx = {(unsigned long )(& cxgb4_sync_txq_pidx), (char const *)(& __kstrtab_cxgb4_sync_txq_pidx)}; int cxgb4_read_tpte(struct net_device *dev , u32 stag , __be32 *tpte ) { struct adapter *adap ; u32 offset ; u32 memtype ; u32 memaddr ; u32 edc0_size ; u32 edc1_size ; u32 mc0_size ; u32 mc1_size ; u32 size ; u32 edc0_end ; u32 edc1_end ; u32 mc0_end ; u32 mc1_end ; int ret ; int tmp ; { adap = netdev2adap((struct net_device const *)dev); offset = (stag >> 8) * 32U + adap->vres.stag.start; size = t4_read_reg(adap, 30656U); edc0_size = size << 20; size = t4_read_reg(adap, 30660U); edc1_size = size << 20; size = t4_read_reg(adap, 30664U); mc0_size = size << 20; edc0_end = edc0_size; edc1_end = edc0_end + edc1_size; mc0_end = edc1_end + mc0_size; if (offset < edc0_end) { memtype = 0U; memaddr = offset; } else if (offset < edc1_end) { memtype = 1U; memaddr = offset - edc0_end; } else if (offset < mc0_end) { memtype = 2U; memaddr = offset - edc1_end; } else { tmp = is_t5(adap->params.chip); if (tmp != 0) { size = t4_read_reg(adap, 30728U); mc1_size = size << 20; mc1_end = mc0_end + mc1_size; if (offset < mc1_end) { memtype = 3U; memaddr = offset - mc0_end; } else { goto err; } } else { goto err; } } spin_lock(& adap->win0_lock); ret = t4_memory_rw(adap, 0, (int )memtype, memaddr, 32U, (void *)tpte, 1); spin_unlock(& adap->win0_lock); return (ret); err: dev_err((struct device const *)adap->pdev_dev, "stag %#x, offset %#x out of range\n", stag, offset); return (-22); } } static char const __kstrtab_cxgb4_read_tpte[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'a', 'd', '_', 't', 'p', 't', 'e', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_read_tpte ; struct kernel_symbol const __ksymtab_cxgb4_read_tpte = {(unsigned long )(& cxgb4_read_tpte), (char const *)(& __kstrtab_cxgb4_read_tpte)}; u64 cxgb4_read_sge_timestamp(struct net_device *dev ) { u32 hi ; u32 lo ; struct adapter *adap ; u32 tmp ; { adap = netdev2adap((struct net_device const *)dev); lo = t4_read_reg(adap, 4248U); tmp = t4_read_reg(adap, 4252U); hi = tmp & 268435455U; return (((unsigned long long )hi << 32) | (unsigned long long )lo); } } static char const __kstrtab_cxgb4_read_sge_timestamp[25U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'a', 'd', '_', 's', 'g', 'e', '_', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_read_sge_timestamp ; struct kernel_symbol const __ksymtab_cxgb4_read_sge_timestamp = {(unsigned long )(& cxgb4_read_sge_timestamp), (char const *)(& __kstrtab_cxgb4_read_sge_timestamp)}; int cxgb4_bar2_sge_qregs(struct net_device *dev , unsigned int qid , enum cxgb4_bar2_qtype qtype , int user , u64 *pbar2_qoffset , unsigned int *pbar2_qid ) { struct adapter *tmp ; int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); tmp___0 = t4_bar2_sge_qregs(tmp, qid, (unsigned int )qtype != 0U, user, pbar2_qoffset, pbar2_qid); return (tmp___0); } } static char const __kstrtab_cxgb4_bar2_sge_qregs[21U] = { 'c', 'x', 'g', 'b', '4', '_', 'b', 'a', 'r', '2', '_', 's', 'g', 'e', '_', 'q', 'r', 'e', 'g', 's', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_bar2_sge_qregs ; struct kernel_symbol const __ksymtab_cxgb4_bar2_sge_qregs = {(unsigned long )(& cxgb4_bar2_sge_qregs), (char const *)(& __kstrtab_cxgb4_bar2_sge_qregs)}; static struct pci_driver cxgb4_driver ; static void check_neigh_update(struct neighbour *neigh ) { struct device const *parent ; struct net_device const *netdev ; struct net_device *tmp ; void *tmp___0 ; { netdev = (struct net_device const *)neigh->dev; if ((int )netdev->priv_flags & 1) { tmp = vlan_dev_real_dev(netdev); netdev = (struct net_device const *)tmp; } else { } parent = (struct device const *)netdev->dev.parent; if ((unsigned long )parent != (unsigned long )((struct device const *)0) && (unsigned long )((struct device_driver *)parent->driver) == (unsigned long )(& cxgb4_driver.driver)) { tmp___0 = dev_get_drvdata(parent); t4_l2t_update((struct adapter *)tmp___0, neigh); } else { } return; } } static int netevent_cb(struct notifier_block *nb , unsigned long event , void *data ) { { switch (event) { case 1UL: check_neigh_update((struct neighbour *)data); goto ldv_59007; case 2UL: ; default: ; goto ldv_59007; } ldv_59007: ; return (0); } } static bool netevent_registered ; static struct notifier_block cxgb4_netevent_nb = {& netevent_cb, 0, 0}; static void drain_db_fifo(struct adapter *adap , int usecs ) { u32 v1 ; u32 v2 ; u32 lp_count ; u32 hp_count ; int tmp ; struct task_struct *tmp___0 ; long volatile __ret ; struct task_struct *tmp___1 ; struct task_struct *tmp___2 ; struct task_struct *tmp___3 ; struct task_struct *tmp___4 ; unsigned long tmp___5 ; { ldv_59029: v1 = t4_read_reg(adap, 4260U); v2 = t4_read_reg(adap, 4376U); tmp = is_t4(adap->params.chip); if (tmp != 0) { lp_count = v1 & 2047U; hp_count = (v1 >> 16) & 2047U; } else { lp_count = v1 & 262143U; hp_count = v2 & 1023U; } if (lp_count == 0U && hp_count == 0U) { goto ldv_59020; } else { } tmp___0 = get_current(); tmp___0->task_state_change = 0UL; __ret = 2L; switch (8UL) { case 1UL: tmp___1 = get_current(); __asm__ volatile ("xchgb %b0, %1\n": "+q" (__ret), "+m" (tmp___1->state): : "memory", "cc"); goto ldv_59023; case 2UL: tmp___2 = get_current(); __asm__ volatile ("xchgw %w0, %1\n": "+r" (__ret), "+m" (tmp___2->state): : "memory", "cc"); goto ldv_59023; case 4UL: tmp___3 = get_current(); __asm__ volatile ("xchgl %0, %1\n": "+r" (__ret), "+m" (tmp___3->state): : "memory", "cc"); goto ldv_59023; case 8UL: tmp___4 = get_current(); __asm__ volatile ("xchgq %q0, %1\n": "+r" (__ret), "+m" (tmp___4->state): : "memory", "cc"); goto ldv_59023; default: __xchg_wrong_size(); } ldv_59023: tmp___5 = usecs_to_jiffies((unsigned int const )usecs); schedule_timeout((long )tmp___5); goto ldv_59029; ldv_59020: ; return; } } static void disable_txq_db(struct sge_txq *q ) { unsigned long flags ; raw_spinlock_t *tmp ; { tmp = spinlock_check(& q->db_lock); flags = _raw_spin_lock_irqsave(tmp); q->db_disabled = 1; spin_unlock_irqrestore(& q->db_lock, flags); return; } } static void enable_txq_db(struct adapter *adap , struct sge_txq *q ) { { spin_lock_irq(& q->db_lock); if ((unsigned int )q->db_pidx_inc != 0U) { __asm__ volatile ("sfence": : : "memory"); t4_write_reg(adap, 110592U, (q->cntxt_id << 15) | (unsigned int )q->db_pidx_inc); q->db_pidx_inc = 0U; } else { } q->db_disabled = 0; spin_unlock_irq(& q->db_lock); return; } } static void disable_dbs(struct adapter *adap ) { int i ; { i = 0; goto ldv_59046; ldv_59045: disable_txq_db(& adap->sge.ethtxq[i].q); i = i + 1; ldv_59046: ; if ((int )adap->sge.ethqsets > i) { goto ldv_59045; } else { } i = 0; goto ldv_59049; ldv_59048: disable_txq_db(& adap->sge.ofldtxq[i].q); i = i + 1; ldv_59049: ; if ((int )adap->sge.ofldqsets > i) { goto ldv_59048; } else { } i = 0; goto ldv_59052; ldv_59051: disable_txq_db(& adap->sge.ctrlq[i].q); i = i + 1; ldv_59052: ; if ((int )adap->params.nports > i) { goto ldv_59051; } else { } return; } } static void enable_dbs(struct adapter *adap ) { int i ; { i = 0; goto ldv_59059; ldv_59058: enable_txq_db(adap, & adap->sge.ethtxq[i].q); i = i + 1; ldv_59059: ; if ((int )adap->sge.ethqsets > i) { goto ldv_59058; } else { } i = 0; goto ldv_59062; ldv_59061: enable_txq_db(adap, & adap->sge.ofldtxq[i].q); i = i + 1; ldv_59062: ; if ((int )adap->sge.ofldqsets > i) { goto ldv_59061; } else { } i = 0; goto ldv_59065; ldv_59064: enable_txq_db(adap, & adap->sge.ctrlq[i].q); i = i + 1; ldv_59065: ; if ((int )adap->params.nports > i) { goto ldv_59064; } else { } return; } } static void notify_rdma_uld(struct adapter *adap , enum cxgb4_control cmd ) { { if ((unsigned long )adap->uld_handle[0] != (unsigned long )((void *)0)) { (*(ulds[0].control))(adap->uld_handle[0], cmd); } else { } return; } } static void process_db_full(struct work_struct *work ) { struct adapter *adap ; struct work_struct const *__mptr ; { __mptr = (struct work_struct const *)work; adap = (struct adapter *)__mptr + 0xfffffffffffee918UL; drain_db_fifo(adap, dbfifo_drain_delay); enable_dbs(adap); notify_rdma_uld(adap, 1); if ((((unsigned int )adap->params.chip >> 4) & 15U) <= 5U) { t4_set_reg_field(adap, 4160U, 384U, 384U); } else { t4_set_reg_field(adap, 4160U, 128U, 128U); } return; } } static void sync_txq_pidx(struct adapter *adap , struct sge_txq *q ) { u16 hw_pidx ; u16 hw_cidx ; int ret ; u16 delta ; u32 val ; int tmp ; { spin_lock_irq(& q->db_lock); ret = read_eq_indices(adap, (int )((unsigned short )q->cntxt_id), & hw_pidx, & hw_cidx); if (ret != 0) { goto out; } else { } if ((int )q->db_pidx != (int )hw_pidx) { if ((int )q->db_pidx >= (int )hw_pidx) { delta = (int )q->db_pidx - (int )hw_pidx; } else { delta = ((int )((u16 )q->size) - (int )hw_pidx) + (int )q->db_pidx; } tmp = is_t4(adap->params.chip); if (tmp != 0) { val = (u32 )delta; } else { val = (u32 )delta; } __asm__ volatile ("sfence": : : "memory"); t4_write_reg(adap, 110592U, (q->cntxt_id << 15) | val); } else { } out: q->db_disabled = 0; q->db_pidx_inc = 0U; spin_unlock_irq(& q->db_lock); if (ret != 0) { dev_warn((struct device const *)adap->pdev_dev, "DB drop recovery failed.\n"); } else { } return; } } static void recover_all_queues(struct adapter *adap ) { int i ; { i = 0; goto ldv_59092; ldv_59091: sync_txq_pidx(adap, & adap->sge.ethtxq[i].q); i = i + 1; ldv_59092: ; if ((int )adap->sge.ethqsets > i) { goto ldv_59091; } else { } i = 0; goto ldv_59095; ldv_59094: sync_txq_pidx(adap, & adap->sge.ofldtxq[i].q); i = i + 1; ldv_59095: ; if ((int )adap->sge.ofldqsets > i) { goto ldv_59094; } else { } i = 0; goto ldv_59098; ldv_59097: sync_txq_pidx(adap, & adap->sge.ctrlq[i].q); i = i + 1; ldv_59098: ; if ((int )adap->params.nports > i) { goto ldv_59097; } else { } return; } } static void process_db_drop(struct work_struct *work ) { struct adapter *adap ; struct work_struct const *__mptr ; u32 dropped_db ; u32 tmp ; u16 qid ; u16 pidx_inc ; u64 bar2_qoffset ; unsigned int bar2_qid ; int ret ; int tmp___0 ; int tmp___1 ; { __mptr = (struct work_struct const *)work; adap = (struct adapter *)__mptr + 0xfffffffffffee8c8UL; tmp___1 = is_t4(adap->params.chip); if (tmp___1 != 0) { drain_db_fifo(adap, dbfifo_drain_delay); notify_rdma_uld(adap, 2); drain_db_fifo(adap, dbfifo_drain_delay); recover_all_queues(adap); drain_db_fifo(adap, dbfifo_drain_delay); enable_dbs(adap); notify_rdma_uld(adap, 1); } else { tmp___0 = is_t5(adap->params.chip); if (tmp___0 != 0) { tmp = t4_read_reg(adap, 4268U); dropped_db = tmp; qid = (u16 )(dropped_db >> 15); pidx_inc = (unsigned int )((u16 )dropped_db) & 8191U; ret = t4_bar2_sge_qregs(adap, (unsigned int )qid, 0, 0, & bar2_qoffset, & bar2_qid); if (ret != 0) { dev_err((struct device const *)adap->pdev_dev, "doorbell drop recovery: qid=%d, pidx_inc=%d\n", (int )qid, (int )pidx_inc); } else { writel((unsigned int )pidx_inc | (bar2_qid << 15), (void volatile *)(adap->bar2 + ((unsigned long )bar2_qoffset + 8UL))); } t4_set_reg_field(adap, 4272U, 32768U, 32768U); } else { } } if ((((unsigned int )adap->params.chip >> 4) & 15U) <= 5U) { t4_set_reg_field(adap, 4264U, 1U, 0U); } else { } return; } } void t4_db_full(struct adapter *adap ) { int tmp ; { tmp = is_t4(adap->params.chip); if (tmp != 0) { disable_dbs(adap); notify_rdma_uld(adap, 0); t4_set_reg_field(adap, 4160U, 384U, 0U); queue_work(adap->workq, & adap->db_full_task); } else { } return; } } void t4_db_dropped(struct adapter *adap ) { int tmp ; { tmp = is_t4(adap->params.chip); if (tmp != 0) { disable_dbs(adap); notify_rdma_uld(adap, 0); } else { } queue_work(adap->workq, & adap->db_drop_task); return; } } static void uld_attach(struct adapter *adap , unsigned int uld ) { void *handle ; struct cxgb4_lld_info lli ; unsigned short i ; u32 tmp ; long tmp___0 ; bool tmp___1 ; { lli.pdev = adap->pdev; lli.pf = adap->pf; lli.l2t = adap->l2t; lli.tids = & adap->tids; lli.ports = (struct net_device **)(& adap->port); lli.vr = (struct cxgb4_virt_res const *)(& adap->vres); lli.mtus = (unsigned short const *)(& adap->params.mtus); if (uld == 0U) { lli.rxq_ids = (unsigned short const *)(& adap->sge.rdma_rxq); lli.ciq_ids = (unsigned short const *)(& adap->sge.rdma_ciq); lli.nrxq = adap->sge.rdmaqs; lli.nciq = adap->sge.rdmaciqs; } else if (uld == 1U) { lli.rxq_ids = (unsigned short const *)(& adap->sge.ofld_rxq); lli.nrxq = adap->sge.ofldqsets; } else { } lli.ntxq = adap->sge.ofldqsets; lli.nchan = adap->params.nports; lli.nports = adap->params.nports; lli.wr_cred = (unsigned char )adap->params.ofldq_wr_cred; lli.adapter_type = (unsigned char )adap->params.chip; tmp = t4_read_reg(adap, 32104U); lli.iscsi_iolen = tmp >> 16; lli.cclk_ps = 1000000000U / adap->params.vpd.cclk; lli.udb_density = (unsigned short )(1 << (int )adap->params.sge.eq_qpp); lli.ucq_density = (unsigned short )(1 << (int )adap->params.sge.iq_qpp); lli.filt_mode = (unsigned short )adap->params.tp.vlan_pri_map; i = 0U; goto ldv_59126; ldv_59125: lli.tx_modq[(int )i] = i; i = (unsigned short )((int )i + 1); ldv_59126: ; if ((unsigned int )i <= 3U) { goto ldv_59125; } else { } lli.gts_reg = adap->regs + 110596UL; lli.db_reg = adap->regs + 110592UL; lli.fw_vers = adap->params.fw_vers; lli.dbfifo_int_thresh = dbfifo_int_thresh; lli.sge_ingpadboundary = adap->sge.fl_align; lli.sge_egrstatuspagesize = adap->sge.stat_len; lli.sge_pktshift = adap->sge.pktshift; lli.enable_fw_ofld_conn = (adap->flags & 512U) != 0U; lli.max_ordird_qp = adap->params.max_ordird_qp; lli.max_ird_adapter = adap->params.max_ird_adapter; lli.ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl; lli.nodeid = dev_to_node(adap->pdev_dev); handle = (*(ulds[uld].add))((struct cxgb4_lld_info const *)(& lli)); tmp___1 = IS_ERR((void const *)handle); if ((int )tmp___1) { tmp___0 = PTR_ERR((void const *)handle); dev_warn((struct device const *)adap->pdev_dev, "could not attach to the %s driver, error %ld\n", uld_str[uld], tmp___0); return; } else { } adap->uld_handle[uld] = handle; if (! netevent_registered) { register_netevent_notifier(& cxgb4_netevent_nb); netevent_registered = 1; } else { } if ((int )adap->flags & 1) { (*(ulds[uld].state_change))(handle, 0); } else { } return; } } static void attach_ulds(struct adapter *adap ) { unsigned int i ; { spin_lock(& adap_rcu_lock); list_add_tail_rcu(& adap->rcu_node, & adap_rcu_list); spin_unlock(& adap_rcu_lock); mutex_lock_nested(& uld_mutex, 0U); list_add_tail(& adap->list_node, & adapter_list); i = 0U; goto ldv_59133; ldv_59132: ; if ((unsigned long )ulds[i].add != (unsigned long )((void *(*)(struct cxgb4_lld_info const * ))0)) { uld_attach(adap, i); } else { } i = i + 1U; ldv_59133: ; if (i <= 1U) { goto ldv_59132; } else { } mutex_unlock(& uld_mutex); return; } } static void detach_ulds(struct adapter *adap ) { unsigned int i ; int tmp ; { mutex_lock_nested(& uld_mutex, 0U); list_del(& adap->list_node); i = 0U; goto ldv_59140; ldv_59139: ; if ((unsigned long )adap->uld_handle[i] != (unsigned long )((void *)0)) { (*(ulds[i].state_change))(adap->uld_handle[i], 3); adap->uld_handle[i] = (void *)0; } else { } i = i + 1U; ldv_59140: ; if (i <= 1U) { goto ldv_59139; } else { } if ((int )netevent_registered) { tmp = list_empty((struct list_head const *)(& adapter_list)); if (tmp != 0) { unregister_netevent_notifier(& cxgb4_netevent_nb); netevent_registered = 0; } else { } } else { } mutex_unlock(& uld_mutex); spin_lock(& adap_rcu_lock); list_del_rcu(& adap->rcu_node); spin_unlock(& adap_rcu_lock); return; } } static void notify_ulds(struct adapter *adap , enum cxgb4_state new_state ) { unsigned int i ; { mutex_lock_nested(& uld_mutex, 0U); i = 0U; goto ldv_59148; ldv_59147: ; if ((unsigned long )adap->uld_handle[i] != (unsigned long )((void *)0)) { (*(ulds[i].state_change))(adap->uld_handle[i], new_state); } else { } i = i + 1U; ldv_59148: ; if (i <= 1U) { goto ldv_59147; } else { } mutex_unlock(& uld_mutex); return; } } int cxgb4_register_uld(enum cxgb4_uld type , struct cxgb4_uld_info const *p ) { int ret ; struct adapter *adap ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { ret = 0; if ((unsigned int )type > 1U) { return (-22); } else { } mutex_lock_nested(& uld_mutex, 0U); if ((unsigned long )ulds[(unsigned int )type].add != (unsigned long )((void *(*)(struct cxgb4_lld_info const * ))0)) { ret = -16; goto out; } else { } ulds[(unsigned int )type] = *p; __mptr = (struct list_head const *)adapter_list.next; adap = (struct adapter *)__mptr + 0xfffffffffffeeb28UL; goto ldv_59162; ldv_59161: uld_attach(adap, (unsigned int )type); __mptr___0 = (struct list_head const *)adap->list_node.next; adap = (struct adapter *)__mptr___0 + 0xfffffffffffeeb28UL; ldv_59162: ; if ((unsigned long )(& adap->list_node) != (unsigned long )(& adapter_list)) { goto ldv_59161; } else { } out: mutex_unlock(& uld_mutex); return (ret); } } static char const __kstrtab_cxgb4_register_uld[19U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'g', 'i', 's', 't', 'e', 'r', '_', 'u', 'l', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_register_uld ; struct kernel_symbol const __ksymtab_cxgb4_register_uld = {(unsigned long )(& cxgb4_register_uld), (char const *)(& __kstrtab_cxgb4_register_uld)}; int cxgb4_unregister_uld(enum cxgb4_uld type ) { struct adapter *adap ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { if ((unsigned int )type > 1U) { return (-22); } else { } mutex_lock_nested(& uld_mutex, 0U); __mptr = (struct list_head const *)adapter_list.next; adap = (struct adapter *)__mptr + 0xfffffffffffeeb28UL; goto ldv_59181; ldv_59180: adap->uld_handle[(unsigned int )type] = (void *)0; __mptr___0 = (struct list_head const *)adap->list_node.next; adap = (struct adapter *)__mptr___0 + 0xfffffffffffeeb28UL; ldv_59181: ; if ((unsigned long )(& adap->list_node) != (unsigned long )(& adapter_list)) { goto ldv_59180; } else { } ulds[(unsigned int )type].add = (void *(*)(struct cxgb4_lld_info const * ))0; mutex_unlock(& uld_mutex); return (0); } } static char const __kstrtab_cxgb4_unregister_uld[21U] = { 'c', 'x', 'g', 'b', '4', '_', 'u', 'n', 'r', 'e', 'g', 'i', 's', 't', 'e', 'r', '_', 'u', 'l', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_unregister_uld ; struct kernel_symbol const __ksymtab_cxgb4_unregister_uld = {(unsigned long )(& cxgb4_unregister_uld), (char const *)(& __kstrtab_cxgb4_unregister_uld)}; static int cxgb4_inet6addr_handler(struct notifier_block *this , unsigned long event , void *data ) { struct inet6_ifaddr *ifa ; struct net_device *event_dev ; struct device const *parent ; struct adapter *adap ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { ifa = (struct inet6_ifaddr *)data; event_dev = (ifa->idev)->dev; parent = (struct device const *)0; if ((int )event_dev->priv_flags & 1) { event_dev = vlan_dev_real_dev((struct net_device const *)event_dev); } else { } if ((event_dev->flags & 1024U) != 0U) { __mptr = (struct list_head const *)adapter_list.next; adap = (struct adapter *)__mptr + 0xfffffffffffeeb28UL; goto ldv_59208; ldv_59207: ; switch (event) { case 1UL: cxgb4_clip_get((struct net_device const *)adap->port[0], (u32 const *)ifa, 1); goto ldv_59204; case 2UL: cxgb4_clip_release((struct net_device const *)adap->port[0], (u32 const *)ifa, 1); goto ldv_59204; default: ; goto ldv_59204; } ldv_59204: __mptr___0 = (struct list_head const *)adap->list_node.next; adap = (struct adapter *)__mptr___0 + 0xfffffffffffeeb28UL; ldv_59208: ; if ((unsigned long )(& adap->list_node) != (unsigned long )(& adapter_list)) { goto ldv_59207; } else { } return (1); } else { } if ((unsigned long )event_dev != (unsigned long )((struct net_device *)0)) { parent = (struct device const *)event_dev->dev.parent; } else { } if ((unsigned long )parent != (unsigned long )((struct device const *)0) && (unsigned long )((struct device_driver *)parent->driver) == (unsigned long )(& cxgb4_driver.driver)) { switch (event) { case 1UL: cxgb4_clip_get((struct net_device const *)event_dev, (u32 const *)ifa, 1); goto ldv_59211; case 2UL: cxgb4_clip_release((struct net_device const *)event_dev, (u32 const *)ifa, 1); goto ldv_59211; default: ; goto ldv_59211; } ldv_59211: ; } else { } return (1); } } static bool inet6addr_registered ; static struct notifier_block cxgb4_inet6addr_notifier = {& cxgb4_inet6addr_handler, 0, 0}; static void update_clip(struct adapter const *adap ) { int i ; struct net_device *dev ; int ret ; { rcu_read_lock(); i = 0; goto ldv_59224; ldv_59223: dev = adap->port[i]; ret = 0; if ((unsigned long )dev != (unsigned long )((struct net_device *)0)) { ret = cxgb4_update_root_dev_clip(dev); } else { } if (ret < 0) { goto ldv_59222; } else { } i = i + 1; ldv_59224: ; if (i <= 3) { goto ldv_59223; } else { } ldv_59222: rcu_read_unlock(); return; } } static int cxgb_up(struct adapter *adap ) { int err ; irq_handler_t tmp ; { err = setup_sge_queues(adap); if (err != 0) { goto out; } else { } err = setup_rss(adap); if (err != 0) { goto freeq; } else { } if ((adap->flags & 8U) != 0U) { name_msix_vecs(adap); err = ldv_request_irq_27((unsigned int )adap->msix_info[0].vec, & t4_nondata_intr, 0UL, (char const *)(& adap->msix_info[0].desc), (void *)adap); if (err != 0) { goto irq_err; } else { } err = request_msix_queue_irqs(adap); if (err != 0) { ldv_free_irq_28((unsigned int )adap->msix_info[0].vec, (void *)adap); goto irq_err; } else { } } else { tmp = t4_intr_handler(adap); err = ldv_request_irq_29((adap->pdev)->irq, tmp, (adap->flags & 4U) != 0U ? 0UL : 128UL, (char const *)(& (adap->port[0])->name), (void *)adap); if (err != 0) { goto irq_err; } else { } } enable_rx(adap); t4_sge_start(adap); t4_intr_enable(adap); adap->flags = adap->flags | 1U; notify_ulds(adap, 0); update_clip((struct adapter const *)adap); out: ; return (err); irq_err: dev_err((struct device const *)adap->pdev_dev, "request_irq failed, err %d\n", err); freeq: t4_free_sge_resources(adap); goto out; } } static void cxgb_down(struct adapter *adapter ) { { ldv_cancel_work_sync_30(& adapter->tid_release_task); ldv_cancel_work_sync_31(& adapter->db_full_task); ldv_cancel_work_sync_32(& adapter->db_drop_task); adapter->tid_release_task_busy = 0; adapter->tid_release_head = (void **)0; t4_sge_stop(adapter); t4_free_sge_resources(adapter); adapter->flags = adapter->flags & 4294967294U; return; } } static int cxgb_open(struct net_device *dev ) { int err ; struct port_info *pi ; void *tmp ; struct adapter *adapter ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adapter = pi->adapter; netif_carrier_off(dev); if ((adapter->flags & 1U) == 0U) { err = cxgb_up(adapter); if (err < 0) { return (err); } else { } } else { } err = link_start(dev); if (err == 0) { netif_tx_start_all_queues(dev); } else { } return (err); } } static int cxgb_close(struct net_device *dev ) { struct port_info *pi ; void *tmp ; struct adapter *adapter ; int tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adapter = pi->adapter; netif_tx_stop_all_queues(dev); netif_carrier_off(dev); tmp___0 = t4_enable_vi(adapter, adapter->pf, (unsigned int )pi->viid, 0, 0); return (tmp___0); } } static int writable_filter(struct filter_entry *f ) { { if ((unsigned int )*((unsigned char *)f + 0UL) != 0U) { return (-1); } else { } if ((unsigned int )*((unsigned char *)f + 0UL) != 0U) { return (-16); } else { } return (0); } } static int delete_filter(struct adapter *adapter , unsigned int fidx ) { struct filter_entry *f ; int ret ; int tmp ; { if (adapter->tids.nftids + adapter->tids.nsftids <= fidx) { return (-22); } else { } f = adapter->tids.ftid_tab + (unsigned long )fidx; ret = writable_filter(f); if (ret != 0) { return (ret); } else { } if ((unsigned int )*((unsigned char *)f + 0UL) != 0U) { tmp = del_filter_wr(adapter, (int )fidx); return (tmp); } else { } return (0); } } int cxgb4_create_server_filter(struct net_device const *dev , unsigned int stid , __be32 sip , __be16 sport , __be16 vlan , unsigned int queue , unsigned char port , unsigned char mask ) { int ret ; struct filter_entry *f ; struct adapter *adap ; int i ; u8 *val ; __u16 tmp ; { adap = netdev2adap(dev); stid = stid - adap->tids.sftid_base; stid = adap->tids.nftids + stid; f = adap->tids.ftid_tab + (unsigned long )stid; ret = writable_filter(f); if (ret != 0) { return (ret); } else { } if ((unsigned int )*((unsigned char *)f + 0UL) != 0U) { clear_filter(adap, f); } else { } memset((void *)(& f->fs), 0, 124UL); tmp = __fswab16((int )sport); f->fs.val.lport = tmp; f->fs.mask.lport = 65535U; val = (u8 *)(& sip); if ((unsigned int )((((int )*val | (int )*(val + 1UL)) | (int )*(val + 2UL)) | (int )*(val + 3UL)) != 0U) { i = 0; goto ldv_59271; ldv_59270: f->fs.val.lip[i] = *(val + (unsigned long )i); f->fs.mask.lip[i] = 255U; i = i + 1; ldv_59271: ; if (i <= 3) { goto ldv_59270; } else { } if ((adap->params.tp.vlan_pri_map & 2U) != 0U) { f->fs.val.iport = port; f->fs.mask.iport = mask; } else { } } else { } if ((adap->params.tp.vlan_pri_map & 32U) != 0U) { f->fs.val.proto = 6U; f->fs.mask.proto = 255U; } else { } f->fs.dirsteer = 1U; f->fs.iq = (unsigned short )queue; f->locked = 1U; f->fs.rpttid = 1U; ret = set_filter_wr(adap, (int )stid); if (ret != 0) { clear_filter(adap, f); return (ret); } else { } return (0); } } static char const __kstrtab_cxgb4_create_server_filter[27U] = { 'c', 'x', 'g', 'b', '4', '_', 'c', 'r', 'e', 'a', 't', 'e', '_', 's', 'e', 'r', 'v', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_create_server_filter ; struct kernel_symbol const __ksymtab_cxgb4_create_server_filter = {(unsigned long )(& cxgb4_create_server_filter), (char const *)(& __kstrtab_cxgb4_create_server_filter)}; int cxgb4_remove_server_filter(struct net_device const *dev , unsigned int stid , unsigned int queue , bool ipv6 ) { int ret ; struct filter_entry *f ; struct adapter *adap ; { adap = netdev2adap(dev); stid = stid - adap->tids.sftid_base; stid = adap->tids.nftids + stid; f = adap->tids.ftid_tab + (unsigned long )stid; f->locked = 0U; ret = delete_filter(adap, stid); if (ret != 0) { return (ret); } else { } return (0); } } static char const __kstrtab_cxgb4_remove_server_filter[27U] = { 'c', 'x', 'g', 'b', '4', '_', 'r', 'e', 'm', 'o', 'v', 'e', '_', 's', 'e', 'r', 'v', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_remove_server_filter ; struct kernel_symbol const __ksymtab_cxgb4_remove_server_filter = {(unsigned long )(& cxgb4_remove_server_filter), (char const *)(& __kstrtab_cxgb4_remove_server_filter)}; static struct rtnl_link_stats64 *cxgb_get_stats(struct net_device *dev , struct rtnl_link_stats64 *ns ) { struct port_stats stats ; struct port_info *p ; void *tmp ; struct adapter *adapter ; bool tmp___0 ; int tmp___1 ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info *)tmp; adapter = p->adapter; spin_lock(& adapter->stats_lock); tmp___0 = netif_device_present(dev); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { spin_unlock(& adapter->stats_lock); return (ns); } else { } t4_get_port_stats_offset(adapter, (int )p->tx_chan, & stats, & p->stats_base); spin_unlock(& adapter->stats_lock); ns->tx_bytes = stats.tx_octets; ns->tx_packets = stats.tx_frames; ns->rx_bytes = stats.rx_octets; ns->rx_packets = stats.rx_frames; ns->multicast = stats.rx_mcast_frames; ns->rx_length_errors = (stats.rx_jabber + stats.rx_too_long) + stats.rx_runt; ns->rx_over_errors = 0ULL; ns->rx_crc_errors = stats.rx_fcs_err; ns->rx_frame_errors = stats.rx_symbol_err; ns->rx_fifo_errors = ((((((stats.rx_ovflow0 + stats.rx_ovflow1) + stats.rx_ovflow2) + stats.rx_ovflow3) + stats.rx_trunc0) + stats.rx_trunc1) + stats.rx_trunc2) + stats.rx_trunc3; ns->rx_missed_errors = 0ULL; ns->tx_aborted_errors = 0ULL; ns->tx_carrier_errors = 0ULL; ns->tx_fifo_errors = 0ULL; ns->tx_heartbeat_errors = 0ULL; ns->tx_window_errors = 0ULL; ns->tx_errors = stats.tx_error_frames; ns->rx_errors = (((stats.rx_symbol_err + stats.rx_fcs_err) + ns->rx_length_errors) + stats.rx_len_err) + ns->rx_fifo_errors; return (ns); } } static int cxgb_ioctl(struct net_device *dev , struct ifreq *req , int cmd ) { unsigned int mbox ; int ret ; int prtad ; int devad ; struct port_info *pi ; void *tmp ; struct mii_ioctl_data *data ; __u16 tmp___0 ; __u16 tmp___1 ; bool tmp___2 ; { ret = 0; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; data = (struct mii_ioctl_data *)(& req->ifr_ifru.ifru_data); switch (cmd) { case 35143: ; if ((int )pi->mdio_addr < 0) { return (-95); } else { } data->phy_id = (__u16 )pi->mdio_addr; goto ldv_59325; case 35144: ; case 35145: tmp___2 = mdio_phy_id_is_c45((int )data->phy_id); if ((int )tmp___2) { tmp___0 = mdio_phy_id_prtad((int )data->phy_id); prtad = (int )tmp___0; tmp___1 = mdio_phy_id_devad((int )data->phy_id); devad = (int )tmp___1; } else if ((unsigned int )data->phy_id <= 31U) { prtad = (int )data->phy_id; devad = 0; data->reg_num = (unsigned int )data->reg_num & 31U; } else { return (-22); } mbox = (pi->adapter)->pf; if (cmd == 35144) { ret = t4_mdio_rd(pi->adapter, mbox, (unsigned int )prtad, (unsigned int )devad, (unsigned int )data->reg_num, & data->val_out); } else { ret = t4_mdio_wr(pi->adapter, mbox, (unsigned int )prtad, (unsigned int )devad, (unsigned int )data->reg_num, (int )data->val_in); } goto ldv_59325; default: ; return (-95); } ldv_59325: ; return (ret); } } static void cxgb_set_rxmode(struct net_device *dev ) { { set_rxmode(dev, -1, 0); return; } } static int cxgb_change_mtu(struct net_device *dev , int new_mtu ) { int ret ; struct port_info *pi ; void *tmp ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; if (new_mtu <= 80 || new_mtu > 9600) { return (-22); } else { } ret = t4_set_rxmode(pi->adapter, (pi->adapter)->pf, (unsigned int )pi->viid, new_mtu, -1, -1, -1, -1, 1); if (ret == 0) { dev->mtu = (unsigned int )new_mtu; } else { } return (ret); } } static int cxgb_set_mac_addr(struct net_device *dev , void *p ) { int ret ; struct sockaddr *addr ; struct port_info *pi ; void *tmp ; bool tmp___0 ; int tmp___1 ; { addr = (struct sockaddr *)p; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; tmp___0 = is_valid_ether_addr((u8 const *)(& addr->sa_data)); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { return (-99); } else { } ret = t4_change_mac(pi->adapter, (pi->adapter)->pf, (unsigned int )pi->viid, (int )pi->xact_addr_filt, (u8 const *)(& addr->sa_data), 1, 1); if (ret < 0) { return (ret); } else { } memcpy((void *)dev->dev_addr, (void const *)(& addr->sa_data), (size_t )dev->addr_len); pi->xact_addr_filt = (s16 )ret; return (0); } } static void cxgb_netpoll(struct net_device *dev ) { struct port_info *pi ; void *tmp ; struct adapter *adap ; int i ; struct sge_eth_rxq *rx ; irq_handler_t tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adap = pi->adapter; if ((adap->flags & 8U) != 0U) { rx = (struct sge_eth_rxq *)(& adap->sge.ethrxq) + (unsigned long )pi->first_qset; i = (int )pi->nqsets; goto ldv_59353; ldv_59352: t4_sge_intr_msix(0, (void *)(& rx->rspq)); i = i - 1; rx = rx + 1; ldv_59353: ; if (i != 0) { goto ldv_59352; } else { } } else { tmp___0 = t4_intr_handler(adap); (*tmp___0)(0, (void *)adap); } return; } } static struct net_device_ops const cxgb4_netdev_ops = {0, 0, & cxgb_open, & cxgb_close, & t4_eth_xmit, & cxgb_select_queue, 0, & cxgb_set_rxmode, & cxgb_set_mac_addr, & eth_validate_addr, & cxgb_ioctl, 0, & cxgb_change_mtu, 0, 0, & cxgb_get_stats, 0, 0, 0, & cxgb_netpoll, 0, 0, & cxgb_busy_poll, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cxgb_fcoe_enable, & cxgb_fcoe_disable, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cxgb_set_features, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void t4_fatal_err(struct adapter *adap ) { { t4_set_reg_field(adap, 4104U, 1U, 0U); t4_intr_disable(adap); dev_alert((struct device const *)adap->pdev_dev, "encountered fatal error, adapter stopped\n"); return; } } static void setup_memwin(struct adapter *adap ) { u32 nic_win_base ; u32 tmp ; { tmp = t4_get_util_window(adap); nic_win_base = tmp; t4_setup_memwin(adap, nic_win_base, 0U); return; } } static void setup_memwin_rdma(struct adapter *adap ) { u32 start ; unsigned int sz_kb ; unsigned long tmp ; unsigned long tmp___0 ; int tmp___1 ; { if (adap->vres.ocq.size != 0U) { start = t4_read_pcie_cfg4(adap, 24); start = start & 4294967280U; tmp = __roundup_pow_of_two((unsigned long )adap->vres.ocq.size); start = (((adap->pdev)->resource[2].start != 0ULL || (adap->pdev)->resource[2].end != (adap->pdev)->resource[2].start ? ((u32 )(adap->pdev)->resource[2].end - (u32 )(adap->pdev)->resource[2].start) + 1U : 0U) - (u32 )tmp) + start; tmp___0 = __roundup_pow_of_two((unsigned long )adap->vres.ocq.size); sz_kb = (unsigned int )(tmp___0 >> 10); tmp___1 = __ilog2_u32(sz_kb); t4_write_reg(adap, 12416U, ((u32 )tmp___1 | start) | 256U); t4_write_reg(adap, 12420U, adap->vres.ocq.start); t4_read_reg(adap, 12420U); } else { } return; } } static int adap_init1(struct adapter *adap , struct fw_caps_config_cmd *c ) { u32 v ; int ret ; int tmp ; int tmp___0 ; { memset((void *)c, 0, 48UL); c->op_to_write = 49159U; c->cfvalid_to_len16 = 50331648U; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)c, 48, (void *)c); if (ret < 0) { return (ret); } else { } if (((int )c->niccaps & 512) != 0) { if (! vf_acls) { c->niccaps = (__be16 )((unsigned int )c->niccaps ^ 512U); } else { c->niccaps = 512U; } } else if ((int )vf_acls) { dev_err((struct device const *)adap->pdev_dev, "virtualization ACLs not supported"); return (ret); } else { } c->op_to_write = 40967U; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)c, 48, (void *)0); if (ret < 0) { return (ret); } else { } ret = t4_config_glbl_rss(adap, (int )adap->pf, 1U, 6U); if (ret < 0) { return (ret); } else { } ret = t4_cfg_pfvf(adap, adap->mbox, adap->pf, 0U, adap->sge.egr_sz, 64U, 90U, 0U, 0U, 4U, 15U, 15U, 16U, 1U, 1U); if (ret < 0) { return (ret); } else { } t4_sge_init(adap); t4_write_reg(adap, 32192U, 105875529U); t4_write_reg(adap, 102776U, 0U); t4_write_reg(adap, 32320U, 321U); v = t4_read_reg(adap, 32324U); t4_write_reg(adap, 32324U, v & 4294966271U); adap->params.tp.tx_modq_map = 228U; t4_write_reg(adap, 32296U, (u32 )adap->params.tp.tx_modq_map); v = 2216789025U; t4_write_indirect(adap, 32320U, 32324U, (u32 const *)(& v), 1U, 35U); t4_write_indirect(adap, 32320U, 32324U, (u32 const *)(& v), 1U, 36U); t4_write_indirect(adap, 32320U, 32324U, (u32 const *)(& v), 1U, 37U); tmp = is_offload((struct adapter const *)adap); if (tmp != 0) { t4_write_reg(adap, 32304U, 269488144U); t4_write_reg(adap, 32308U, 269488144U); } else { } tmp___0 = t4_early_init(adap, adap->pf); return (tmp___0); } } static int adap_init0_tweaks(struct adapter *adapter ) { { t4_fixup_host_params(adapter, 4096U, 64U); if (rx_dma_offset != 2 && rx_dma_offset != 0) { dev_err((struct device const *)(& (adapter->pdev)->dev), "Ignoring illegal rx_dma_offset=%d, using 2\n", rx_dma_offset); rx_dma_offset = 2; } else { } t4_set_reg_field(adapter, 4104U, 7168U, (u32 )(rx_dma_offset << 10)); t4_tp_wr_bits_indirect(adapter, 321U, 1024U, 0U); return (0); } } static int phy_aq1202_version(u8 const *phy_fw_data , size_t phy_fw_size ) { int offset ; { offset = (((int )*(phy_fw_data + 8UL) | ((int )*(phy_fw_data + 9U) << 8)) | ((int )*(phy_fw_data + 10U) << 16)) << 12; offset = ((int )*(phy_fw_data + ((unsigned long )offset + 10UL)) | ((int )*(phy_fw_data + ((unsigned long )offset + 11UL)) << 8)) | ((int )*(phy_fw_data + ((unsigned long )offset + 12UL)) << 16); return (((int )*(phy_fw_data + ((unsigned long )offset + 638UL)) << 8) | (int )*(phy_fw_data + ((unsigned long )offset + 639UL))); } } static struct info_10gbt_phy_fw phy_info_array[3U] = { {17417U, (char *)"cxgb4/aq1202_fw.cld", & phy_aq1202_version, 1}, {17542U, (char *)"cxgb4/bcm8483.bin", (int (*)(u8 const * , size_t ))0, 0}, {0U, (char *)0, (int (*)(u8 const * , size_t ))0, 0}}; static struct info_10gbt_phy_fw *find_phy_info(int devid ) { int i ; { i = 0; goto ldv_59397; ldv_59396: ; if (phy_info_array[i].phy_fw_id == (unsigned int )devid) { return ((struct info_10gbt_phy_fw *)(& phy_info_array) + (unsigned long )i); } else { } i = i + 1; ldv_59397: ; if ((unsigned int )i <= 2U) { goto ldv_59396; } else { } return ((struct info_10gbt_phy_fw *)0); } } static int adap_init0_phy(struct adapter *adap ) { struct firmware const *phyf ; int ret ; struct info_10gbt_phy_fw *phy_info ; int cur_phy_fw_ver ; int new_phy_fw_ver ; { phy_info = find_phy_info((int )(adap->pdev)->device); if ((unsigned long )phy_info == (unsigned long )((struct info_10gbt_phy_fw *)0)) { dev_warn((struct device const *)adap->pdev_dev, "No PHY Firmware file found for this PHY\n"); return (-95); } else { } ret = request_firmware_direct(& phyf, (char const *)phy_info->phy_fw_file, adap->pdev_dev); if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "unable to find PHY Firmware image /lib/firmware/%s, error %d\n", phy_info->phy_fw_file, - ret); if (phy_info->phy_flash != 0) { cur_phy_fw_ver = 0; t4_phy_fw_ver(adap, & cur_phy_fw_ver); dev_warn((struct device const *)adap->pdev_dev, "continuing with, on-adapter FLASH copy, version %#x\n", cur_phy_fw_ver); ret = 0; } else { } return (ret); } else { } ret = t4_load_phy_fw(adap, 0, & adap->win0_lock, phy_info->phy_fw_version, (u8 const *)phyf->data, phyf->size); if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "PHY Firmware transfer error %d\n", - ret); } else if (ret > 0) { new_phy_fw_ver = 0; if ((unsigned long )phy_info->phy_fw_version != (unsigned long )((int (*)(u8 const * , size_t ))0)) { new_phy_fw_ver = (*(phy_info->phy_fw_version))(phyf->data, phyf->size); } else { } _dev_info((struct device const *)adap->pdev_dev, "Successfully transferred PHY Firmware /lib/firmware/%s, version %#x\n", phy_info->phy_fw_file, new_phy_fw_ver); } else { } release_firmware(phyf); return (ret); } } static int adap_init0_config(struct adapter *adapter , int reset ) { struct fw_caps_config_cmd caps_cmd ; struct firmware const *cf ; unsigned long mtype ; unsigned long maddr ; u32 finiver ; u32 finicsum ; u32 cfcsum ; int ret ; int config_issued ; char *fw_config_file ; char fw_config_file_path[256U] ; char *config_name ; int tmp ; unsigned int tmp___0 ; u32 params[7U] ; u32 val[7U] ; size_t resid ; size_t size ; __be32 *data ; union __anonunion_last_393 last ; int i ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; { mtype = 0UL; maddr = 0UL; config_issued = 0; config_name = (char *)0; if (reset != 0) { ret = t4_fw_reset(adapter, adapter->mbox, 3); if (ret < 0) { goto bye; } else { } } else { } tmp = is_10gbt_device((int )(adapter->pdev)->device); if (tmp != 0) { ret = adap_init0_phy(adapter); if (ret < 0) { goto bye; } else { } } else { } switch (((unsigned int )adapter->params.chip >> 4) & 15U) { case 4U: fw_config_file = (char *)"cxgb4/t4-config.txt"; goto ldv_59425; case 5U: fw_config_file = (char *)"cxgb4/t5-config.txt"; goto ldv_59425; case 6U: fw_config_file = (char *)"cxgb4/t6-config.txt"; goto ldv_59425; default: dev_err((struct device const *)adapter->pdev_dev, "Device %d is not supported\n", (int )(adapter->pdev)->device); ret = -22; goto bye; } ldv_59425: ret = request_firmware(& cf, (char const *)fw_config_file, adapter->pdev_dev); if (ret < 0) { config_name = (char *)"On FLASH"; mtype = 4UL; tmp___0 = t4_flash_cfg_addr(adapter); maddr = (unsigned long )tmp___0; } else { sprintf((char *)(& fw_config_file_path), "/lib/firmware/%s", fw_config_file); config_name = (char *)(& fw_config_file_path); if ((unsigned long )cf->size > 65535UL) { ret = -12; } else { params[0] = 17629184U; ret = t4_query_params(adapter, adapter->mbox, adapter->pf, 0U, 1U, (u32 const *)(& params), (u32 *)(& val)); if (ret == 0) { resid = (unsigned long )cf->size & 3UL; size = (unsigned long )cf->size & 0xfffffffffffffffcUL; data = (__be32 *)cf->data; mtype = (unsigned long )(val[0] >> 8) & 255UL; maddr = (unsigned long )((val[0] & 255U) << 16); spin_lock(& adapter->win0_lock); ret = t4_memory_rw(adapter, 0, (int )mtype, (u32 )maddr, (u32 )size, (void *)data, 0); if (ret == 0 && resid != 0UL) { last.word = *(data + (size >> 2)); i = (int )resid; goto ldv_59440; ldv_59439: last.buf[i] = 0; i = i + 1; ldv_59440: ; if (i <= 3) { goto ldv_59439; } else { } ret = t4_memory_rw(adapter, 0, (int )mtype, (u32 )maddr + (u32 )size, 4U, (void *)(& last.word), 0); } else { } spin_unlock(& adapter->win0_lock); } else { } } release_firmware(cf); if (ret != 0) { goto bye; } else { } } memset((void *)(& caps_cmd), 0, 48UL); caps_cmd.op_to_write = 49159U; tmp___1 = __fswab32((((__u32 )mtype << 24U) | ((__u32 )maddr & 4294901760U)) | 134217731U); caps_cmd.cfvalid_to_len16 = tmp___1; ret = t4_wr_mbox(adapter, (int )adapter->mbox, (void const *)(& caps_cmd), 48, (void *)(& caps_cmd)); if (ret == -2) { memset((void *)(& caps_cmd), 0, 48UL); caps_cmd.op_to_write = 49159U; caps_cmd.cfvalid_to_len16 = 50331648U; ret = t4_wr_mbox(adapter, (int )adapter->mbox, (void const *)(& caps_cmd), 48, (void *)(& caps_cmd)); config_name = (char *)"Firmware Default"; } else { } config_issued = 1; if (ret < 0) { goto bye; } else { } tmp___2 = __fswab32(caps_cmd.finiver); finiver = tmp___2; tmp___3 = __fswab32(caps_cmd.finicsum); finicsum = tmp___3; tmp___4 = __fswab32(caps_cmd.cfcsum); cfcsum = tmp___4; if (finicsum != cfcsum) { dev_warn((struct device const *)adapter->pdev_dev, "Configuration File checksum mismatch: [fini] csum=%#x, computed csum=%#x\n", finicsum, cfcsum); } else { } caps_cmd.op_to_write = 40967U; caps_cmd.cfvalid_to_len16 = 50331648U; ret = t4_wr_mbox(adapter, (int )adapter->mbox, (void const *)(& caps_cmd), 48, (void *)0); if (ret < 0) { goto bye; } else { } ret = adap_init0_tweaks(adapter); if (ret < 0) { goto bye; } else { } ret = t4_fw_initialize(adapter, adapter->mbox); if (ret < 0) { goto bye; } else { } _dev_info((struct device const *)adapter->pdev_dev, "Successfully configured using Firmware Configuration File \"%s\", version %#x, computed checksum %#x\n", config_name, finiver, cfcsum); return (0); bye: ; if (config_issued != 0 && ret != -2) { dev_warn((struct device const *)adapter->pdev_dev, "\"%s\" configuration file error %d\n", config_name, - ret); } else { } return (ret); } } static struct fw_info fw_info_array[3U] = { {4U, (char *)"cxgb4/t4-config.txt", (char *)"cxgb4/t4fw.bin", {(unsigned char)0, 0U, (unsigned short)0, 0U, 0U, 0U, 0U, (unsigned char)0, 0U, (unsigned char)0, 0U, (unsigned char)0, 0U, 0U, 0U, 0U, 0U, {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U}}}, {5U, (char *)"cxgb4/t5-config.txt", (char *)"cxgb4/t5fw.bin", {(unsigned char)0, 1U, (unsigned short)0, 0U, 0U, 0U, 0U, (unsigned char)0, 0U, (unsigned char)0, 0U, (unsigned char)0, 0U, 0U, 0U, 0U, 0U, {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U}}}, {6U, (char *)"cxgb4/t6-config.txt", (char *)"cxgb4/t6fw.bin", {(unsigned char)0, 2U, (unsigned short)0, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U}}}}; static struct fw_info *find_fw_info(int chip ) { int i ; { i = 0; goto ldv_59450; ldv_59449: ; if ((int )fw_info_array[i].chip == chip) { return ((struct fw_info *)(& fw_info_array) + (unsigned long )i); } else { } i = i + 1; ldv_59450: ; if ((unsigned int )i <= 2U) { goto ldv_59449; } else { } return ((struct fw_info *)0); } } static int adap_init0(struct adapter *adap ) { int ret ; u32 v ; u32 port_vec ; enum dev_state state ; u32 params[7U] ; u32 val[7U] ; struct fw_caps_config_cmd caps_cmd ; int reset ; struct fw_info *fw_info ; struct fw_hdr *card_fw ; struct firmware const *fw ; u8 const *fw_data ; unsigned int fw_size ; void *tmp ; unsigned int tmp___0 ; int tmp___1 ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; void *tmp___5 ; void *tmp___6 ; int tmp___7 ; unsigned int _min1 ; unsigned int _min2 ; int tmp___8 ; int i ; { reset = 1; ret = t4_init_devlog_params(adap); if (ret < 0) { return (ret); } else { } ret = t4_fw_hello(adap, adap->mbox, adap->mbox, 1, & state); if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "could not connect to FW, error %d\n", ret); return (ret); } else { } if ((unsigned int )ret == adap->mbox) { adap->flags = adap->flags | 128U; } else { } t4_get_fw_version(adap, & adap->params.fw_vers); t4_get_tp_version(adap, & adap->params.tp_vers); if ((adap->flags & 128U) != 0U && (unsigned int )state != 1U) { fw_data = (u8 const *)0U; fw_size = 0U; fw_info = find_fw_info((int )((unsigned int )adap->params.chip >> 4) & 15); if ((unsigned long )fw_info == (unsigned long )((struct fw_info *)0)) { dev_err((struct device const *)adap->pdev_dev, "unable to get firmware info for chip %d.\n", ((unsigned int )adap->params.chip >> 4) & 15U); return (-22); } else { } tmp = t4_alloc_mem(128UL); card_fw = (struct fw_hdr *)tmp; ret = request_firmware(& fw, (char const *)fw_info->fw_mod_name, adap->pdev_dev); if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "unable to load firmware image %s, error %d\n", fw_info->fw_mod_name, ret); } else { fw_data = fw->data; fw_size = (unsigned int )fw->size; } ret = t4_prep_fw(adap, fw_info, fw_data, fw_size, card_fw, state, & reset); release_firmware(fw); t4_free_mem((void *)card_fw); if (ret < 0) { goto bye; } else { } } else { } ret = t4_get_vpd_params(adap, & adap->params.vpd); if (ret < 0) { goto bye; } else { } v = 16842752U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& v), & port_vec); if (ret < 0) { goto bye; } else { } tmp___0 = __arch_hweight32(port_vec); adap->params.nports = (unsigned char )tmp___0; adap->params.portvec = (unsigned char )port_vec; if ((unsigned int )state == 1U) { _dev_info((struct device const *)adap->pdev_dev, "Coming up as %s: Adapter already initialized\n", (adap->flags & 128U) != 0U ? (char *)"MASTER" : (char *)"SLAVE"); } else { _dev_info((struct device const *)adap->pdev_dev, "Coming up as MASTER: Initializing adapter\n"); params[0] = 17629184U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "firmware doesn\'t support Firmware Configuration Files\n"); goto bye; } else { } ret = adap_init0_config(adap, reset); if (ret == -2) { dev_err((struct device const *)adap->pdev_dev, "no Configuration File present on adapter.\n"); goto bye; } else { } if (ret < 0) { dev_err((struct device const *)adap->pdev_dev, "could not initialize adapter, error %d\n", - ret); goto bye; } else { } } ret = t4_sge_init(adap); if (ret < 0) { goto bye; } else { } tmp___1 = is_bypass_device((int )(adap->pdev)->device); if (tmp___1 != 0) { adap->params.bypass = 1U; } else { } params[0] = 36372480U; params[1] = 34799616U; params[2] = 34865152U; params[3] = 33882112U; params[4] = 33947648U; params[5] = 36241408U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 6U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->sge.egr_start = val[0]; adap->l2t_start = val[1]; adap->l2t_end = val[2]; adap->tids.ftid_base = val[3]; adap->tids.nftids = (val[4] - val[3]) + 1U; adap->sge.ingr_start = val[5]; params[0] = 36438016U; params[1] = 36306944U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->sge.egr_sz = (val[0] - adap->sge.egr_start) + 1U; adap->sge.ingr_sz = (val[1] - adap->sge.ingr_start) + 1U; tmp___2 = kcalloc((size_t )adap->sge.egr_sz, 8UL, 208U); adap->sge.egr_map = (void **)tmp___2; if ((unsigned long )adap->sge.egr_map == (unsigned long )((void **)0)) { ret = -12; goto bye; } else { } tmp___3 = kcalloc((size_t )adap->sge.ingr_sz, 8UL, 208U); adap->sge.ingr_map = (struct sge_rspq **)tmp___3; if ((unsigned long )adap->sge.ingr_map == (unsigned long )((struct sge_rspq **)0)) { ret = -12; goto bye; } else { } tmp___4 = kcalloc(((unsigned long )adap->sge.egr_sz + 63UL) / 64UL, 8UL, 208U); adap->sge.starving_fl = (unsigned long *)tmp___4; if ((unsigned long )adap->sge.starving_fl == (unsigned long )((unsigned long *)0UL)) { ret = -12; goto bye; } else { } tmp___5 = kcalloc(((unsigned long )adap->sge.egr_sz + 63UL) / 64UL, 8UL, 208U); adap->sge.txq_maperr = (unsigned long *)tmp___5; if ((unsigned long )adap->sge.txq_maperr == (unsigned long )((unsigned long *)0UL)) { ret = -12; goto bye; } else { } tmp___6 = kcalloc(((unsigned long )adap->sge.egr_sz + 63UL) / 64UL, 8UL, 208U); adap->sge.blocked_fl = (unsigned long *)tmp___6; if ((unsigned long )adap->sge.blocked_fl == (unsigned long )((unsigned long *)0UL)) { ret = -12; goto bye; } else { } params[0] = 33751040U; params[1] = 33816576U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->clipt_start = val[0]; adap->clipt_end = val[1]; params[0] = 36503552U; params[1] = 36569088U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& params), (u32 *)(& val)); if (val[0] != val[1] && ret >= 0) { adap->flags = adap->flags | 512U; adap->tids.aftid_base = val[0]; adap->tids.aftid_end = val[1]; } else { } params[0] = 36765696U; val[0] = 1U; t4_set_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& params), (u32 const *)(& val)); tmp___7 = is_t4(adap->params.chip); if (tmp___7 != 0) { adap->params.ulptx_memwrite_dsgl = 0; } else { params[0] = 18284544U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& params), (u32 *)(& val)); adap->params.ulptx_memwrite_dsgl = (bool )(ret == 0 && val[0] != 0U); } memset((void *)(& caps_cmd), 0, 48UL); caps_cmd.op_to_write = 49159U; caps_cmd.cfvalid_to_len16 = 50331648U; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& caps_cmd), 48, (void *)(& caps_cmd)); if (ret < 0) { goto bye; } else { } if ((unsigned int )caps_cmd.ofldcaps != 0U) { params[0] = 16908288U; params[1] = 34013184U; params[2] = 34078720U; params[3] = 34144256U; params[4] = 34209792U; params[5] = 16973824U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 6U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->tids.ntids = val[0]; _min1 = adap->tids.ntids / 2U; _min2 = 8192U; adap->tids.natids = _min1 < _min2 ? _min1 : _min2; adap->tids.stid_base = val[1]; adap->tids.nstids = (val[2] - val[1]) + 1U; if ((adap->flags & 512U) != 0U) { tmp___8 = is_bypass(adap); if (tmp___8 == 0) { adap->tids.sftid_base = adap->tids.ftid_base + (adap->tids.nftids + 2U) / 3U; adap->tids.nsftids = adap->tids.nftids - (adap->tids.nftids + 2U) / 3U; adap->tids.nftids = adap->tids.sftid_base - adap->tids.ftid_base; } else { } } else { } adap->vres.ddp.start = val[3]; adap->vres.ddp.size = (val[4] - val[3]) + 1U; adap->params.ofldq_wr_cred = val[5]; adap->params.offload = 1U; } else { } if ((unsigned int )caps_cmd.rdmacaps != 0U) { params[0] = 34406400U; params[1] = 34471936U; params[2] = 35586048U; params[3] = 34603008U; params[4] = 34668544U; params[5] = 34734080U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 6U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->vres.stag.start = val[0]; adap->vres.stag.size = (val[1] - val[0]) + 1U; adap->vres.rq.start = val[2]; adap->vres.rq.size = (val[3] - val[2]) + 1U; adap->vres.pbl.start = val[4]; adap->vres.pbl.size = (val[5] - val[4]) + 1U; params[0] = 34930688U; params[1] = 34996224U; params[2] = 35061760U; params[3] = 35127296U; params[4] = 36044800U; params[5] = 36110336U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 6U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->vres.qp.start = val[0]; adap->vres.qp.size = (val[1] - val[0]) + 1U; adap->vres.cq.start = val[2]; adap->vres.cq.size = (val[3] - val[2]) + 1U; adap->vres.ocq.start = val[4]; adap->vres.ocq.size = (val[5] - val[4]) + 1U; params[0] = 18022400U; params[1] = 18087936U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { adap->params.max_ordird_qp = 8U; adap->params.max_ird_adapter = adap->tids.ntids * 32U; ret = 0; } else { adap->params.max_ordird_qp = val[0]; adap->params.max_ird_adapter = val[1]; } _dev_info((struct device const *)adap->pdev_dev, "max_ordird_qp %d max_ird_adapter %d\n", adap->params.max_ordird_qp, adap->params.max_ird_adapter); } else { } if ((unsigned int )caps_cmd.iscsicaps != 0U) { params[0] = 34275328U; params[1] = 34340864U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& params), (u32 *)(& val)); if (ret < 0) { goto bye; } else { } adap->vres.iscsi.start = val[0]; adap->vres.iscsi.size = (val[1] - val[0]) + 1U; } else { } t4_read_mtu_tbl(adap, (u16 *)(& adap->params.mtus), (u8 *)0U); if ((unsigned int )state != 1U) { i = 0; goto ldv_59475; ldv_59474: ; if ((unsigned int )adap->params.mtus[i] == 1492U) { adap->params.mtus[i] = 1488U; goto ldv_59473; } else { } i = i + 1; ldv_59475: ; if (i <= 15) { goto ldv_59474; } else { } ldv_59473: t4_load_mtus(adap, (unsigned short const *)(& adap->params.mtus), (unsigned short const *)(& adap->params.a_wnd), (unsigned short const *)(& adap->params.b_wnd)); } else { } t4_init_sge_params(adap); adap->flags = adap->flags | 16U; t4_init_tp_params(adap); return (0); bye: kfree((void const *)adap->sge.egr_map); kfree((void const *)adap->sge.ingr_map); kfree((void const *)adap->sge.starving_fl); kfree((void const *)adap->sge.txq_maperr); kfree((void const *)adap->sge.blocked_fl); if (ret != -110 && ret != -5) { t4_fw_bye(adap, adap->mbox); } else { } return (ret); } } static pci_ers_result_t eeh_err_detected(struct pci_dev *pdev , pci_channel_state_t state ) { int i ; struct adapter *adap ; void *tmp ; struct net_device *dev ; { tmp = pci_get_drvdata(pdev); adap = (struct adapter *)tmp; if ((unsigned long )adap == (unsigned long )((struct adapter *)0)) { goto out; } else { } rtnl_lock(); adap->flags = adap->flags & 4294967279U; notify_ulds(adap, 1); spin_lock(& adap->stats_lock); i = 0; goto ldv_59485; ldv_59484: dev = adap->port[i]; netif_device_detach(dev); netif_carrier_off(dev); i = i + 1; ldv_59485: ; if ((int )adap->params.nports > i) { goto ldv_59484; } else { } spin_unlock(& adap->stats_lock); disable_interrupts(adap); if ((int )adap->flags & 1) { cxgb_down(adap); } else { } rtnl_unlock(); if ((adap->flags & 2U) != 0U) { pci_disable_device(pdev); adap->flags = adap->flags & 4294967293U; } else { } out: ; return (state == 3U ? 4U : 3U); } } static pci_ers_result_t eeh_slot_reset(struct pci_dev *pdev ) { int i ; int ret ; struct fw_caps_config_cmd c ; struct adapter *adap ; void *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; struct port_info *p ; struct port_info *tmp___4 ; int tmp___5 ; { tmp = pci_get_drvdata(pdev); adap = (struct adapter *)tmp; if ((unsigned long )adap == (unsigned long )((struct adapter *)0)) { pci_restore_state(pdev); pci_save_state(pdev); return (5U); } else { } if ((adap->flags & 2U) == 0U) { tmp___0 = pci_enable_device(pdev); if (tmp___0 != 0) { dev_err((struct device const *)(& pdev->dev), "Cannot reenable PCI device after reset\n"); return (4U); } else { } adap->flags = adap->flags | 2U; } else { } pci_set_master(pdev); pci_restore_state(pdev); pci_save_state(pdev); pci_cleanup_aer_uncorrect_error_status(pdev); tmp___1 = t4_wait_dev_ready(adap->regs); if (tmp___1 < 0) { return (4U); } else { } tmp___2 = t4_fw_hello(adap, adap->mbox, adap->pf, 2, (enum dev_state *)0); if (tmp___2 < 0) { return (4U); } else { } adap->flags = adap->flags | 16U; tmp___3 = adap_init1(adap, & c); if (tmp___3 != 0) { return (4U); } else { } i = 0; goto ldv_59496; ldv_59495: tmp___4 = adap2pinfo(adap, i); p = tmp___4; ret = t4_alloc_vi(adap, adap->mbox, (unsigned int )p->tx_chan, adap->pf, 0U, 1U, (u8 *)0U, (unsigned int *)0U); if (ret < 0) { return (4U); } else { } p->viid = (u16 )ret; p->xact_addr_filt = -1; i = i + 1; ldv_59496: ; if ((int )adap->params.nports > i) { goto ldv_59495; } else { } t4_load_mtus(adap, (unsigned short const *)(& adap->params.mtus), (unsigned short const *)(& adap->params.a_wnd), (unsigned short const *)(& adap->params.b_wnd)); setup_memwin(adap); tmp___5 = cxgb_up(adap); if (tmp___5 != 0) { return (4U); } else { } return (5U); } } static void eeh_resume(struct pci_dev *pdev ) { int i ; struct adapter *adap ; void *tmp ; struct net_device *dev ; bool tmp___0 ; { tmp = pci_get_drvdata(pdev); adap = (struct adapter *)tmp; if ((unsigned long )adap == (unsigned long )((struct adapter *)0)) { return; } else { } rtnl_lock(); i = 0; goto ldv_59505; ldv_59504: dev = adap->port[i]; tmp___0 = netif_running((struct net_device const *)dev); if ((int )tmp___0) { link_start(dev); cxgb_set_rxmode(dev); } else { } netif_device_attach(dev); i = i + 1; ldv_59505: ; if ((int )adap->params.nports > i) { goto ldv_59504; } else { } rtnl_unlock(); return; } } static struct pci_error_handlers const cxgb4_eeh = {(pci_ers_result_t (*)(struct pci_dev * , enum pci_channel_state ))(& eeh_err_detected), 0, 0, & eeh_slot_reset, 0, & eeh_resume}; __inline static bool is_x_10g_port(struct link_config const *lc ) { { return ((bool )(((int )lc->supported & 8) != 0 || ((int )lc->supported & 16) != 0)); } } __inline static void init_rspq(struct adapter *adap , struct sge_rspq *q , unsigned int us , unsigned int cnt , unsigned int size , unsigned int iqe_size ) { { q->adap = adap; cxgb4_set_rspq_intr_params(q, us, cnt); q->iqe_len = iqe_size; q->size = size; return; } } static void cfg_queues(struct adapter *adap ) { struct sge *s ; int i ; int n10g ; int qidx ; int ciq_size ; struct port_info *tmp ; bool tmp___0 ; long tmp___1 ; struct port_info *pi ; struct port_info *tmp___2 ; int __min1 ; int __min2 ; unsigned int tmp___3 ; unsigned char __y ; int __min1___0 ; int __min2___0 ; unsigned int tmp___4 ; int __max1 ; int __max2 ; int tmp___5 ; struct sge_eth_rxq *r ; struct sge_ofld_rxq *r___0 ; struct sge_ofld_rxq *r___1 ; struct sge_ofld_rxq *r___2 ; { s = & adap->sge; n10g = 0; qidx = 0; i = 0; goto ldv_59528; ldv_59527: tmp = adap2pinfo(adap, i); tmp___0 = is_x_10g_port((struct link_config const *)(& tmp->link_cfg)); n10g = (int )tmp___0 + n10g; i = i + 1; ldv_59528: ; if ((int )adap->params.nports > i) { goto ldv_59527; } else { } if ((int )adap->params.nports * 8 > 32) { dev_err((struct device const *)adap->pdev_dev, "MAX_ETH_QSETS=%d < %d!\n", 32, (int )adap->params.nports * 8); tmp___1 = ldv__builtin_expect(1L, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c"), "i" (4246), "i" (12UL)); ldv_59530: ; goto ldv_59530; } else { } } else { } i = 0; goto ldv_59533; ldv_59532: tmp___2 = adap2pinfo(adap, i); pi = tmp___2; pi->first_qset = (u8 )qidx; pi->nqsets = 8U; qidx = (int )pi->nqsets + qidx; i = i + 1; ldv_59533: ; if ((int )adap->params.nports > i) { goto ldv_59532; } else { } s->ethqsets = (u16 )qidx; s->max_ethqsets = (u16 )qidx; tmp___5 = is_offload((struct adapter const *)adap); if (tmp___5 != 0) { if (n10g != 0) { __min1 = 16; tmp___3 = cpumask_weight(cpu_online_mask); __min2 = (int )tmp___3; i = __min1 < __min2 ? __min1 : __min2; __y = adap->params.nports; s->ofldqsets = (u16 )(((((int )__y + -1) + i) / (int )__y) * (int )__y); } else { s->ofldqsets = (u16 )adap->params.nports; } s->rdmaqs = (u16 )adap->params.nports; __min1___0 = 32; tmp___4 = cpumask_weight(cpu_online_mask); __min2___0 = (int )tmp___4; s->rdmaciqs = (u16 )(__min1___0 < __min2___0 ? __min1___0 : __min2___0); s->rdmaciqs = (int )((u16 )((int )s->rdmaciqs / (int )adap->params.nports)) * (int )((u16 )adap->params.nports); __max1 = (int )s->rdmaciqs; __max2 = (int )adap->params.nports; s->rdmaciqs = (u16 )(__max1 > __max2 ? __max1 : __max2); } else { } i = 0; goto ldv_59552; ldv_59551: r = (struct sge_eth_rxq *)(& s->ethrxq) + (unsigned long )i; init_rspq(adap, & r->rspq, 5U, 10U, 1024U, 64U); r->fl.size = 72U; i = i + 1; ldv_59552: ; if ((unsigned int )i <= 31U) { goto ldv_59551; } else { } i = 0; goto ldv_59557; ldv_59556: s->ethtxq[i].q.size = 1024U; i = i + 1; ldv_59557: ; if ((unsigned int )i <= 31U) { goto ldv_59556; } else { } i = 0; goto ldv_59562; ldv_59561: s->ctrlq[i].q.size = 512U; i = i + 1; ldv_59562: ; if ((unsigned int )i <= 3U) { goto ldv_59561; } else { } i = 0; goto ldv_59567; ldv_59566: s->ofldtxq[i].q.size = 1024U; i = i + 1; ldv_59567: ; if ((unsigned int )i <= 15U) { goto ldv_59566; } else { } i = 0; goto ldv_59573; ldv_59572: r___0 = (struct sge_ofld_rxq *)(& s->ofldrxq) + (unsigned long )i; init_rspq(adap, & r___0->rspq, 5U, 1U, 1024U, 64U); r___0->rspq.uld = 1U; r___0->fl.size = 72U; i = i + 1; ldv_59573: ; if ((unsigned int )i <= 15U) { goto ldv_59572; } else { } i = 0; goto ldv_59579; ldv_59578: r___1 = (struct sge_ofld_rxq *)(& s->rdmarxq) + (unsigned long )i; init_rspq(adap, & r___1->rspq, 5U, 1U, 511U, 64U); r___1->rspq.uld = 0U; r___1->fl.size = 72U; i = i + 1; ldv_59579: ; if ((unsigned int )i <= 3U) { goto ldv_59578; } else { } ciq_size = (int )((adap->vres.cq.size + adap->tids.nftids) + 64U); if (ciq_size > 65520) { dev_warn((struct device const *)adap->pdev_dev, "CIQ size too small for available IQs\n"); ciq_size = 65520; } else { } i = 0; goto ldv_59585; ldv_59584: r___2 = (struct sge_ofld_rxq *)(& s->rdmaciq) + (unsigned long )i; init_rspq(adap, & r___2->rspq, 5U, 1U, (unsigned int )ciq_size, 64U); r___2->rspq.uld = 0U; i = i + 1; ldv_59585: ; if ((unsigned int )i <= 31U) { goto ldv_59584; } else { } init_rspq(adap, & s->fw_evtq, 0U, 1U, 1024U, 64U); init_rspq(adap, & s->intrq, 0U, 1U, 180U, 64U); return; } } static void reduce_ethqs(struct adapter *adap , int n ) { int i ; struct port_info *pi ; { goto ldv_59597; ldv_59596: i = 0; goto ldv_59595; ldv_59594: pi = adap2pinfo(adap, i); if ((unsigned int )pi->nqsets > 1U) { pi->nqsets = (u8 )((int )pi->nqsets - 1); adap->sge.ethqsets = (u16 )((int )adap->sge.ethqsets - 1); if ((int )adap->sge.ethqsets <= n) { goto ldv_59593; } else { } } else { } i = i + 1; ldv_59595: ; if ((int )adap->params.nports > i) { goto ldv_59594; } else { } ldv_59593: ; ldv_59597: ; if ((int )adap->sge.ethqsets > n) { goto ldv_59596; } else { } n = 0; i = 0; goto ldv_59600; ldv_59599: pi = adap2pinfo(adap, i); pi->first_qset = (u8 )n; n = (int )pi->nqsets + n; i = i + 1; ldv_59600: ; if ((int )adap->params.nports > i) { goto ldv_59599; } else { } return; } } static int enable_msix(struct adapter *adap ) { int ofld_need ; int i ; int want ; int need ; int allocated ; struct sge *s ; unsigned int nchan ; struct msix_entry *entries ; void *tmp ; int tmp___0 ; int tmp___1 ; { ofld_need = 0; s = & adap->sge; nchan = (unsigned int )adap->params.nports; tmp = kmalloc(728UL, 208U); entries = (struct msix_entry *)tmp; if ((unsigned long )entries == (unsigned long )((struct msix_entry *)0)) { return (-12); } else { } i = 0; goto ldv_59614; ldv_59613: (entries + (unsigned long )i)->entry = (u16 )i; i = i + 1; ldv_59614: ; if (i <= 90) { goto ldv_59613; } else { } want = (int )s->max_ethqsets + 2; tmp___0 = is_offload((struct adapter const *)adap); if (tmp___0 != 0) { want = (((int )s->rdmaqs + (int )s->rdmaciqs) + (int )s->ofldqsets) + want; ofld_need = (int )(nchan * 3U); } else { } need = ((int )adap->params.nports * 8 + 2) + ofld_need; allocated = pci_enable_msix_range(adap->pdev, entries, need, want); if (allocated < 0) { _dev_info((struct device const *)adap->pdev_dev, "not enough MSI-X vectors left, not using MSI-X\n"); kfree((void const *)entries); return (allocated); } else { } i = (allocated + -2) - ofld_need; if ((int )s->max_ethqsets > i) { s->max_ethqsets = (u16 )i; if ((int )s->ethqsets > i) { reduce_ethqs(adap, i); } else { } } else { } tmp___1 = is_offload((struct adapter const *)adap); if (tmp___1 != 0) { if (allocated < want) { s->rdmaqs = (u16 )nchan; s->rdmaciqs = (u16 )nchan; } else { } i = (((allocated + -2) - (int )s->max_ethqsets) - (int )s->rdmaqs) - (int )s->rdmaciqs; s->ofldqsets = (int )((u16 )((unsigned int )i / nchan)) * (int )((u16 )nchan); } else { } i = 0; goto ldv_59617; ldv_59616: adap->msix_info[i].vec = (unsigned short )(entries + (unsigned long )i)->vector; i = i + 1; ldv_59617: ; if (i < allocated) { goto ldv_59616; } else { } kfree((void const *)entries); return (0); } } static int init_rss(struct adapter *adap ) { unsigned int i ; int err ; struct port_info *pi ; struct port_info *tmp ; void *tmp___0 ; { err = t4_init_rss_mode(adap, (int )adap->mbox); if (err != 0) { return (err); } else { } i = 0U; goto ldv_59626; ldv_59625: tmp = adap2pinfo(adap, (int )i); pi = tmp; tmp___0 = kcalloc((size_t )pi->rss_size, 2UL, 208U); pi->rss = (u16 *)tmp___0; if ((unsigned long )pi->rss == (unsigned long )((u16 *)0U)) { return (-12); } else { } i = i + 1U; ldv_59626: ; if ((unsigned int )adap->params.nports > i) { goto ldv_59625; } else { } return (0); } } static void print_port_info(struct net_device const *dev ) { char buf[80U] ; char *bufp ; char const *spd ; struct port_info const *pi ; void *tmp ; struct adapter const *adap ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; char const *tmp___4 ; int tmp___5 ; { bufp = (char *)(& buf); spd = ""; tmp = netdev_priv(dev); pi = (struct port_info const *)tmp; adap = (struct adapter const *)pi->adapter; if ((unsigned int )((unsigned char )adap->params.pci.speed) == 1U) { spd = " 2.5 GT/s"; } else if ((unsigned int )((unsigned char )adap->params.pci.speed) == 2U) { spd = " 5 GT/s"; } else if ((unsigned int )((unsigned char )adap->params.pci.speed) == 3U) { spd = " 8 GT/s"; } else { } if ((int )pi->link_cfg.supported & 1) { tmp___0 = sprintf(bufp, "100/"); bufp = bufp + (unsigned long )tmp___0; } else { } if (((int )pi->link_cfg.supported & 2) != 0) { tmp___1 = sprintf(bufp, "1000/"); bufp = bufp + (unsigned long )tmp___1; } else { } if (((int )pi->link_cfg.supported & 8) != 0) { tmp___2 = sprintf(bufp, "10G/"); bufp = bufp + (unsigned long )tmp___2; } else { } if (((int )pi->link_cfg.supported & 16) != 0) { tmp___3 = sprintf(bufp, "40G/"); bufp = bufp + (unsigned long )tmp___3; } else { } if ((unsigned long )((char *)(& buf)) != (unsigned long )bufp) { bufp = bufp - 1; } else { } tmp___4 = t4_get_port_type_description(pi->port_type); sprintf(bufp, "BASE-%s", tmp___4); tmp___5 = is_offload(adap); netdev_info(dev, "Chelsio %s rev %d %s %sNIC PCIe x%d%s%s\n", (u8 const *)(& adap->params.vpd.id), (unsigned int )adap->params.chip & 15U, (char *)(& buf), tmp___5 != 0 ? (char *)"R" : (char *)"", (int )adap->params.pci.width, spd, ((unsigned int )adap->flags & 8U) == 0U ? (((unsigned int )adap->flags & 4U) != 0U ? (char *)" MSI" : (char *)"") : (char *)" MSI-X"); netdev_info(dev, "S/N: %s, P/N: %s\n", (u8 const *)(& adap->params.vpd.sn), (u8 const *)(& adap->params.vpd.pn)); return; } } static void enable_pcie_relaxed_ordering(struct pci_dev *dev ) { { pcie_capability_set_word(dev, 8, 16); return; } } static void free_some_resources(struct adapter *adapter ) { unsigned int i ; struct port_info *pi ; struct port_info *tmp ; struct port_info *tmp___0 ; { t4_free_mem((void *)adapter->l2t); t4_free_mem((void *)adapter->tids.tid_tab); kfree((void const *)adapter->sge.egr_map); kfree((void const *)adapter->sge.ingr_map); kfree((void const *)adapter->sge.starving_fl); kfree((void const *)adapter->sge.txq_maperr); kfree((void const *)adapter->sge.blocked_fl); disable_msi(adapter); i = 0U; goto ldv_59645; ldv_59644: ; if ((unsigned long )adapter->port[i] != (unsigned long )((struct net_device *)0)) { tmp = adap2pinfo(adapter, (int )i); pi = tmp; if ((unsigned int )pi->viid != 0U) { t4_free_vi(adapter, adapter->mbox, adapter->pf, 0U, (unsigned int )pi->viid); } else { } tmp___0 = adap2pinfo(adapter, (int )i); kfree((void const *)tmp___0->rss); ldv_free_netdev_33(adapter->port[i]); } else { } i = i + 1U; ldv_59645: ; if ((unsigned int )adapter->params.nports > i) { goto ldv_59644; } else { } if ((adapter->flags & 16U) != 0U) { t4_fw_bye(adapter, adapter->pf); } else { } return; } } static int init_one(struct pci_dev *pdev , struct pci_device_id const *ent ) { int func ; int i ; int err ; int s_qpp ; int qpp ; int num_seg ; struct port_info *pi ; bool highdma ; struct adapter *adapter ; void *regs ; bool __print_once ; unsigned int tmp ; int tmp___0 ; void *tmp___1 ; struct lock_class_key __key ; char const *__lock_name ; struct workqueue_struct *tmp___2 ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; atomic_long_t __constr_expr_0 ; struct lock_class_key __key___4 ; atomic_long_t __constr_expr_1 ; struct lock_class_key __key___5 ; atomic_long_t __constr_expr_2 ; u32 tmp___3 ; int tmp___4 ; struct net_device *netdev ; void *tmp___5 ; u8 hw_addr[6U] ; u8 *na ; unsigned int tmp___6 ; unsigned int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; char const *tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; { highdma = 0; adapter = (struct adapter *)0; if (! __print_once) { __print_once = 1; printk("\016%s - version %s\n", (char *)"Chelsio T4/T5 Network Driver", (char *)"2.0.0-ko"); } else { } err = pci_request_regions(pdev, "cxgb4"); if (err != 0) { _dev_info((struct device const *)(& pdev->dev), "cannot obtain PCI resources\n"); return (err); } else { } err = pci_enable_device(pdev); if (err != 0) { dev_err((struct device const *)(& pdev->dev), "cannot enable PCI device\n"); goto out_release_regions; } else { } regs = pci_ioremap_bar(pdev, 0); if ((unsigned long )regs == (unsigned long )((void *)0)) { dev_err((struct device const *)(& pdev->dev), "cannot map device registers\n"); err = -12; goto out_disable_device; } else { } err = t4_wait_dev_ready(regs); if (err < 0) { goto out_unmap_bar0; } else { } tmp = readl((void const volatile *)regs + 103424U); func = (int )(tmp >> 8) & 7; if ((unsigned long )func != (unsigned long )ent->driver_data) { iounmap((void volatile *)regs); pci_disable_device(pdev); pci_save_state(pdev); goto sriov; } else { } tmp___0 = pci_set_dma_mask(pdev, 0xffffffffffffffffULL); if (tmp___0 == 0) { highdma = 1; err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); if (err != 0) { dev_err((struct device const *)(& pdev->dev), "unable to obtain 64-bit DMA for coherent allocations\n"); goto out_unmap_bar0; } else { } } else { err = pci_set_dma_mask(pdev, 4294967295ULL); if (err != 0) { dev_err((struct device const *)(& pdev->dev), "no usable DMA configuration\n"); goto out_unmap_bar0; } else { } } pci_enable_pcie_error_reporting(pdev); enable_pcie_relaxed_ordering(pdev); pci_set_master(pdev); pci_save_state(pdev); tmp___1 = kzalloc(71808UL, 208U); adapter = (struct adapter *)tmp___1; if ((unsigned long )adapter == (unsigned long )((struct adapter *)0)) { err = -12; goto out_unmap_bar0; } else { } __lock_name = "\"%s\"\"cxgb4\""; tmp___2 = __alloc_workqueue_key("%s", 131082U, 1, & __key, __lock_name, (char *)"cxgb4"); adapter->workq = tmp___2; if ((unsigned long )adapter->workq == (unsigned long )((struct workqueue_struct *)0)) { err = -12; goto out_free_adapter; } else { } adapter->flags = adapter->flags | 2U; adapter->regs = regs; adapter->pdev = pdev; adapter->pdev_dev = & pdev->dev; adapter->mbox = (unsigned int )func; adapter->pf = (unsigned int )func; adapter->msg_enable = dflt_msg_enable; memset((void *)(& adapter->chan_map), 255, 4UL); spinlock_check(& adapter->stats_lock); __raw_spin_lock_init(& adapter->stats_lock.__annonCompField18.rlock, "&(&adapter->stats_lock)->rlock", & __key___0); spinlock_check(& adapter->tid_release_lock); __raw_spin_lock_init(& adapter->tid_release_lock.__annonCompField18.rlock, "&(&adapter->tid_release_lock)->rlock", & __key___1); spinlock_check(& adapter->win0_lock); __raw_spin_lock_init(& adapter->win0_lock.__annonCompField18.rlock, "&(&adapter->win0_lock)->rlock", & __key___2); __init_work(& adapter->tid_release_task, 0); __constr_expr_0.counter = 137438953408L; adapter->tid_release_task.data = __constr_expr_0; lockdep_init_map(& adapter->tid_release_task.lockdep_map, "(&adapter->tid_release_task)", & __key___3, 0); INIT_LIST_HEAD(& adapter->tid_release_task.entry); adapter->tid_release_task.func = & process_tid_release_list; __init_work(& adapter->db_full_task, 0); __constr_expr_1.counter = 137438953408L; adapter->db_full_task.data = __constr_expr_1; lockdep_init_map(& adapter->db_full_task.lockdep_map, "(&adapter->db_full_task)", & __key___4, 0); INIT_LIST_HEAD(& adapter->db_full_task.entry); adapter->db_full_task.func = & process_db_full; __init_work(& adapter->db_drop_task, 0); __constr_expr_2.counter = 137438953408L; adapter->db_drop_task.data = __constr_expr_2; lockdep_init_map(& adapter->db_drop_task.lockdep_map, "(&adapter->db_drop_task)", & __key___5, 0); INIT_LIST_HEAD(& adapter->db_drop_task.entry); adapter->db_drop_task.func = & process_db_drop; err = t4_prep_adapter(adapter); if (err != 0) { goto out_free_adapter; } else { } tmp___4 = is_t4(adapter->params.chip); if (tmp___4 == 0) { s_qpp = (int )(adapter->pf * 4U); tmp___3 = t4_read_reg(adapter, 4112U); qpp = 1 << ((int )(tmp___3 >> s_qpp) & 15); num_seg = 32; if (qpp > num_seg) { dev_err((struct device const *)(& pdev->dev), "Incorrect number of egress queues per page\n"); err = -22; goto out_free_adapter; } else { } adapter->bar2 = ioremap_wc(pdev->resource[2].start, pdev->resource[2].start != 0ULL || pdev->resource[2].end != pdev->resource[2].start ? (unsigned long )((pdev->resource[2].end - pdev->resource[2].start) + 1ULL) : 0UL); if ((unsigned long )adapter->bar2 == (unsigned long )((void *)0)) { dev_err((struct device const *)(& pdev->dev), "cannot map device bar2 region\n"); err = -12; goto out_free_adapter; } else { } t4_write_reg(adapter, 4332U, 3584U); } else { } setup_memwin(adapter); err = adap_init0(adapter); bitmap_zero(adapter->sge.blocked_fl, adapter->sge.egr_sz); setup_memwin_rdma(adapter); if (err != 0) { goto out_unmap_bar; } else { } i = 0; goto ldv_59683; ldv_59682: netdev = alloc_etherdev_mqs(600, 32U, 32U); if ((unsigned long )netdev == (unsigned long )((struct net_device *)0)) { err = -12; goto out_free_dev; } else { } netdev->dev.parent = & pdev->dev; adapter->port[i] = netdev; tmp___5 = netdev_priv((struct net_device const *)netdev); pi = (struct port_info *)tmp___5; pi->adapter = adapter; pi->xact_addr_filt = -1; pi->port_id = (u8 )i; netdev->irq = (int )pdev->irq; netdev->hw_features = 25771442579ULL; if ((int )highdma) { netdev->hw_features = netdev->hw_features | 32ULL; } else { } netdev->features = netdev->features | netdev->hw_features; netdev->vlan_features = netdev->features & 1638451ULL; netdev->priv_flags = netdev->priv_flags | 131072U; netdev->netdev_ops = & cxgb4_netdev_ops; netdev->dcbnl_ops = & cxgb4_dcb_ops; cxgb4_dcb_state_init(netdev); cxgb4_set_ethtool_ops(netdev); i = i + 1; ldv_59683: ; if ((int )adapter->params.nports > i) { goto ldv_59682; } else { } pci_set_drvdata(pdev, (void *)adapter); if ((adapter->flags & 16U) != 0U) { err = t4_port_init(adapter, func, func, 0); if (err != 0) { goto out_free_dev; } else { } } else if ((unsigned int )adapter->params.nports == 1U) { na = (u8 *)(& adapter->params.vpd.na); err = t4_get_raw_vpd_params(adapter, & adapter->params.vpd); if (err == 0) { i = 0; goto ldv_59688; ldv_59687: tmp___6 = hex2val((int )((char )*(na + (unsigned long )(i * 2)))); tmp___7 = hex2val((int )((char )*(na + ((unsigned long )(i * 2) + 1UL)))); hw_addr[i] = (unsigned int )((u8 )tmp___6) * 16U + (unsigned int )((u8 )tmp___7); i = i + 1; ldv_59688: ; if (i <= 5) { goto ldv_59687; } else { } t4_set_hw_addr(adapter, 0, (u8 *)(& hw_addr)); } else { } } else { } cfg_queues(adapter); adapter->l2t = t4_init_l2t(); if ((unsigned long )adapter->l2t == (unsigned long )((struct l2t_data *)0)) { dev_warn((struct device const *)(& pdev->dev), "could not allocate L2T, continuing\n"); adapter->params.offload = 0U; } else { } adapter->clipt = t4_init_clip_tbl(adapter->clipt_start, adapter->clipt_end); if ((unsigned long )adapter->clipt == (unsigned long )((struct clip_tbl *)0)) { dev_warn((struct device const *)(& pdev->dev), "could not allocate Clip table, continuing\n"); adapter->params.offload = 0U; } else { } tmp___8 = is_offload((struct adapter const *)adapter); if (tmp___8 != 0) { tmp___9 = tid_init(& adapter->tids); if (tmp___9 < 0) { dev_warn((struct device const *)(& pdev->dev), "could not allocate TID table, continuing\n"); adapter->params.offload = 0U; } else { } } else { } if (msi > 1) { tmp___11 = enable_msix(adapter); if (tmp___11 == 0) { adapter->flags = adapter->flags | 8U; } else { goto _L; } } else _L: /* CIL Label */ if (msi > 0) { tmp___10 = pci_enable_msi_exact(pdev, 1); if (tmp___10 == 0) { adapter->flags = adapter->flags | 4U; } else { } } else { } err = init_rss(adapter); if (err != 0) { goto out_free_dev; } else { } i = 0; goto ldv_59692; ldv_59691: pi = adap2pinfo(adapter, i); netif_set_real_num_tx_queues(adapter->port[i], (unsigned int )pi->nqsets); netif_set_real_num_rx_queues(adapter->port[i], (unsigned int )pi->nqsets); err = ldv_register_netdev_34(adapter->port[i]); if (err != 0) { goto ldv_59690; } else { } adapter->chan_map[(int )pi->tx_chan] = (u8 )i; print_port_info((struct net_device const *)adapter->port[i]); i = i + 1; ldv_59692: ; if ((int )adapter->params.nports > i) { goto ldv_59691; } else { } ldv_59690: ; if (i == 0) { dev_err((struct device const *)(& pdev->dev), "could not register any net devices\n"); goto out_free_dev; } else { } if (err != 0) { dev_warn((struct device const *)(& pdev->dev), "only %d net devices registered\n", i); err = 0; } else { } if ((unsigned long )cxgb4_debugfs_root != (unsigned long )((struct dentry *)0)) { tmp___12 = pci_name((struct pci_dev const *)pdev); adapter->debugfs_root = debugfs_create_dir(tmp___12, cxgb4_debugfs_root); setup_debugfs(adapter); } else { } pdev->needs_freset = 1U; tmp___13 = is_offload((struct adapter const *)adapter); if (tmp___13 != 0) { attach_ulds(adapter); } else { } sriov: ; if ((unsigned int )func <= 3U && num_vf[func] != 0U) { tmp___14 = pci_enable_sriov(pdev, (int )num_vf[func]); if (tmp___14 == 0) { _dev_info((struct device const *)(& pdev->dev), "instantiated %u virtual functions\n", num_vf[func]); } else { } } else { } return (0); out_free_dev: free_some_resources(adapter); out_unmap_bar: tmp___15 = is_t4(adapter->params.chip); if (tmp___15 == 0) { iounmap((void volatile *)adapter->bar2); } else { } out_free_adapter: ; if ((unsigned long )adapter->workq != (unsigned long )((struct workqueue_struct *)0)) { ldv_destroy_workqueue_35(adapter->workq); } else { } kfree((void const *)adapter); out_unmap_bar0: iounmap((void volatile *)regs); out_disable_device: pci_disable_pcie_error_reporting(pdev); pci_disable_device(pdev); out_release_regions: pci_release_regions(pdev); return (err); } } static void remove_one(struct pci_dev *pdev ) { struct adapter *adapter ; void *tmp ; int i ; int tmp___0 ; struct filter_entry *f ; int tmp___1 ; { tmp = pci_get_drvdata(pdev); adapter = (struct adapter *)tmp; pci_disable_sriov(pdev); if ((unsigned long )adapter != (unsigned long )((struct adapter *)0)) { ldv_destroy_workqueue_36(adapter->workq); tmp___0 = is_offload((struct adapter const *)adapter); if (tmp___0 != 0) { detach_ulds(adapter); } else { } disable_interrupts(adapter); i = 0; goto ldv_59701; ldv_59700: ; if ((unsigned int )(adapter->port[i])->reg_state == 1U) { ldv_unregister_netdev_37(adapter->port[i]); } else { } i = i + 1; ldv_59701: ; if ((int )adapter->params.nports > i) { goto ldv_59700; } else { } debugfs_remove_recursive(adapter->debugfs_root); if ((unsigned long )adapter->tids.ftid_tab != (unsigned long )((struct filter_entry *)0)) { f = adapter->tids.ftid_tab; i = 0; goto ldv_59705; ldv_59704: ; if ((unsigned int )*((unsigned char *)f + 0UL) != 0U) { clear_filter(adapter, f); } else { } i = i + 1; f = f + 1; ldv_59705: ; if ((unsigned int )i < adapter->tids.nftids + adapter->tids.nsftids) { goto ldv_59704; } else { } } else { } if ((int )adapter->flags & 1) { cxgb_down(adapter); } else { } free_some_resources(adapter); t4_cleanup_clip_tbl(adapter); iounmap((void volatile *)adapter->regs); tmp___1 = is_t4(adapter->params.chip); if (tmp___1 == 0) { iounmap((void volatile *)adapter->bar2); } else { } pci_disable_pcie_error_reporting(pdev); if ((adapter->flags & 2U) != 0U) { pci_disable_device(pdev); adapter->flags = adapter->flags & 4294967293U; } else { } pci_release_regions(pdev); synchronize_rcu(); kfree((void const *)adapter); } else { pci_release_regions(pdev); } return; } } static struct pci_driver cxgb4_driver = {{0, 0}, "cxgb4", (struct pci_device_id const *)(& cxgb4_pci_tbl), & init_one, & remove_one, 0, 0, 0, 0, & remove_one, 0, & cxgb4_eeh, {0, 0, 0, 0, (_Bool)0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {{{{{{0}}, 0U, 0U, 0, {0, {0, 0}, 0, 0, 0UL}}}}, {0, 0}}}; static int cxgb4_init_module(void) { int ret ; { cxgb4_debugfs_root = debugfs_create_dir("cxgb4", (struct dentry *)0); if ((unsigned long )cxgb4_debugfs_root == (unsigned long )((struct dentry *)0)) { printk("\fcxgb4: could not create debugfs entry, continuing\n"); } else { } ret = ldv___pci_register_driver_38(& cxgb4_driver, & __this_module, "cxgb4"); if (ret < 0) { debugfs_remove(cxgb4_debugfs_root); } else { } if (! inet6addr_registered) { register_inet6addr_notifier(& cxgb4_inet6addr_notifier); inet6addr_registered = 1; } else { } return (ret); } } static void cxgb4_cleanup_module(void) { { if ((int )inet6addr_registered) { unregister_inet6addr_notifier(& cxgb4_inet6addr_notifier); inet6addr_registered = 0; } else { } ldv_pci_unregister_driver_39(& cxgb4_driver); debugfs_remove(cxgb4_debugfs_root); return; } } extern int ldv_probe_47(void) ; int ldv_retval_20 ; extern int ldv_release_47(void) ; int ldv_retval_21 ; extern int ldv_suspend_47(void) ; int ldv_retval_24 ; extern int ldv_ndo_uninit_48(void) ; int ldv_retval_23 ; extern int ldv_ndo_init_48(void) ; extern void ldv_initialize(void) ; void ldv_check_final_state(void) ; void activate_suitable_irq_4(int line , void *data ) { { if (ldv_irq_4_0 == 0) { ldv_irq_line_4_0 = line; ldv_irq_data_4_0 = data; ldv_irq_4_0 = 1; return; } else { } if (ldv_irq_4_1 == 0) { ldv_irq_line_4_1 = line; ldv_irq_data_4_1 = data; ldv_irq_4_1 = 1; return; } else { } if (ldv_irq_4_2 == 0) { ldv_irq_line_4_2 = line; ldv_irq_data_4_2 = data; ldv_irq_4_2 = 1; return; } else { } if (ldv_irq_4_3 == 0) { ldv_irq_line_4_3 = line; ldv_irq_data_4_3 = data; ldv_irq_4_3 = 1; return; } else { } return; } } int ldv_irq_3(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_sge_intr_msix(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_59754; default: ldv_stop(); } ldv_59754: ; } else { } return (state); } } void disable_suitable_irq_2(int line , void *data ) { { if (ldv_irq_2_0 != 0 && line == ldv_irq_line_2_0) { ldv_irq_2_0 = 0; return; } else { } if (ldv_irq_2_1 != 0 && line == ldv_irq_line_2_1) { ldv_irq_2_1 = 0; return; } else { } if (ldv_irq_2_2 != 0 && line == ldv_irq_line_2_2) { ldv_irq_2_2 = 0; return; } else { } if (ldv_irq_2_3 != 0 && line == ldv_irq_line_2_3) { ldv_irq_2_3 = 0; return; } else { } return; } } void activate_suitable_irq_3(int line , void *data ) { { if (ldv_irq_3_0 == 0) { ldv_irq_line_3_0 = line; ldv_irq_data_3_0 = data; ldv_irq_3_0 = 1; return; } else { } if (ldv_irq_3_1 == 0) { ldv_irq_line_3_1 = line; ldv_irq_data_3_1 = data; ldv_irq_3_1 = 1; return; } else { } if (ldv_irq_3_2 == 0) { ldv_irq_line_3_2 = line; ldv_irq_data_3_2 = data; ldv_irq_3_2 = 1; return; } else { } if (ldv_irq_3_3 == 0) { ldv_irq_line_3_3 = line; ldv_irq_data_3_3 = data; ldv_irq_3_3 = 1; return; } else { } return; } } int reg_check_1(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_sge_intr_msix)) { return (1); } else { } return (0); } } void choose_interrupt_4(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_4_0 = ldv_irq_4(ldv_irq_4_0, ldv_irq_line_4_0, ldv_irq_data_4_0); goto ldv_59773; case 1: ldv_irq_4_0 = ldv_irq_4(ldv_irq_4_1, ldv_irq_line_4_1, ldv_irq_data_4_1); goto ldv_59773; case 2: ldv_irq_4_0 = ldv_irq_4(ldv_irq_4_2, ldv_irq_line_4_2, ldv_irq_data_4_2); goto ldv_59773; case 3: ldv_irq_4_0 = ldv_irq_4(ldv_irq_4_3, ldv_irq_line_4_3, ldv_irq_data_4_3); goto ldv_59773; default: ldv_stop(); } ldv_59773: ; return; } } void work_init_9(void) { { ldv_work_9_0 = 0; ldv_work_9_1 = 0; ldv_work_9_2 = 0; ldv_work_9_3 = 0; return; } } void invoke_work_8(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_work_8_0 == 2 || ldv_work_8_0 == 3) { ldv_work_8_0 = 4; process_db_full(ldv_work_struct_8_0); ldv_work_8_0 = 1; } else { } goto ldv_59787; case 1: ; if (ldv_work_8_1 == 2 || ldv_work_8_1 == 3) { ldv_work_8_1 = 4; process_db_full(ldv_work_struct_8_0); ldv_work_8_1 = 1; } else { } goto ldv_59787; case 2: ; if (ldv_work_8_2 == 2 || ldv_work_8_2 == 3) { ldv_work_8_2 = 4; process_db_full(ldv_work_struct_8_0); ldv_work_8_2 = 1; } else { } goto ldv_59787; case 3: ; if (ldv_work_8_3 == 2 || ldv_work_8_3 == 3) { ldv_work_8_3 = 4; process_db_full(ldv_work_struct_8_0); ldv_work_8_3 = 1; } else { } goto ldv_59787; default: ldv_stop(); } ldv_59787: ; return; } } void disable_work_7(struct work_struct *work ) { { if ((ldv_work_7_0 == 3 || ldv_work_7_0 == 2) && (unsigned long )ldv_work_struct_7_0 == (unsigned long )work) { ldv_work_7_0 = 1; } else { } if ((ldv_work_7_1 == 3 || ldv_work_7_1 == 2) && (unsigned long )ldv_work_struct_7_1 == (unsigned long )work) { ldv_work_7_1 = 1; } else { } if ((ldv_work_7_2 == 3 || ldv_work_7_2 == 2) && (unsigned long )ldv_work_struct_7_2 == (unsigned long )work) { ldv_work_7_2 = 1; } else { } if ((ldv_work_7_3 == 3 || ldv_work_7_3 == 2) && (unsigned long )ldv_work_struct_7_3 == (unsigned long )work) { ldv_work_7_3 = 1; } else { } return; } } int ldv_irq_6(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_nondata_intr(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_59802; default: ldv_stop(); } ldv_59802: ; } else { } return (state); } } void activate_suitable_irq_6(int line , void *data ) { { if (ldv_irq_6_0 == 0) { ldv_irq_line_6_0 = line; ldv_irq_data_6_0 = data; ldv_irq_6_0 = 1; return; } else { } if (ldv_irq_6_1 == 0) { ldv_irq_line_6_1 = line; ldv_irq_data_6_1 = data; ldv_irq_6_1 = 1; return; } else { } if (ldv_irq_6_2 == 0) { ldv_irq_line_6_2 = line; ldv_irq_data_6_2 = data; ldv_irq_6_2 = 1; return; } else { } if (ldv_irq_6_3 == 0) { ldv_irq_line_6_3 = line; ldv_irq_data_6_3 = data; ldv_irq_6_3 = 1; return; } else { } return; } } void call_and_disable_work_7(struct work_struct *work ) { { if ((ldv_work_7_0 == 2 || ldv_work_7_0 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_7_0) { process_tid_release_list(work); ldv_work_7_0 = 1; return; } else { } if ((ldv_work_7_1 == 2 || ldv_work_7_1 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_7_1) { process_tid_release_list(work); ldv_work_7_1 = 1; return; } else { } if ((ldv_work_7_2 == 2 || ldv_work_7_2 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_7_2) { process_tid_release_list(work); ldv_work_7_2 = 1; return; } else { } if ((ldv_work_7_3 == 2 || ldv_work_7_3 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_7_3) { process_tid_release_list(work); ldv_work_7_3 = 1; return; } else { } return; } } void choose_interrupt_5(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_5_0 = ldv_irq_5(ldv_irq_5_0, ldv_irq_line_5_0, ldv_irq_data_5_0); goto ldv_59817; case 1: ldv_irq_5_0 = ldv_irq_5(ldv_irq_5_1, ldv_irq_line_5_1, ldv_irq_data_5_1); goto ldv_59817; case 2: ldv_irq_5_0 = ldv_irq_5(ldv_irq_5_2, ldv_irq_line_5_2, ldv_irq_data_5_2); goto ldv_59817; case 3: ldv_irq_5_0 = ldv_irq_5(ldv_irq_5_3, ldv_irq_line_5_3, ldv_irq_data_5_3); goto ldv_59817; default: ldv_stop(); } ldv_59817: ; return; } } void disable_suitable_irq_5(int line , void *data ) { { if (ldv_irq_5_0 != 0 && line == ldv_irq_line_5_0) { ldv_irq_5_0 = 0; return; } else { } if (ldv_irq_5_1 != 0 && line == ldv_irq_line_5_1) { ldv_irq_5_1 = 0; return; } else { } if (ldv_irq_5_2 != 0 && line == ldv_irq_line_5_2) { ldv_irq_5_2 = 0; return; } else { } if (ldv_irq_5_3 != 0 && line == ldv_irq_line_5_3) { ldv_irq_5_3 = 0; return; } else { } return; } } void activate_suitable_irq_2(int line , void *data ) { { if (ldv_irq_2_0 == 0) { ldv_irq_line_2_0 = line; ldv_irq_data_2_0 = data; ldv_irq_2_0 = 1; return; } else { } if (ldv_irq_2_1 == 0) { ldv_irq_line_2_1 = line; ldv_irq_data_2_1 = data; ldv_irq_2_1 = 1; return; } else { } if (ldv_irq_2_2 == 0) { ldv_irq_line_2_2 = line; ldv_irq_data_2_2 = data; ldv_irq_2_2 = 1; return; } else { } if (ldv_irq_2_3 == 0) { ldv_irq_line_2_3 = line; ldv_irq_data_2_3 = data; ldv_irq_2_3 = 1; return; } else { } return; } } int ldv_irq_5(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_sge_intr_msix(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_59837; default: ldv_stop(); } ldv_59837: ; } else { } return (state); } } void work_init_8(void) { { ldv_work_8_0 = 0; ldv_work_8_1 = 0; ldv_work_8_2 = 0; ldv_work_8_3 = 0; return; } } void ldv_net_device_ops_48(void) { void *tmp ; { tmp = ldv_init_zalloc(3008UL); cxgb4_netdev_ops_group1 = (struct net_device *)tmp; return; } } void call_and_disable_all_9(int state ) { { if (ldv_work_9_0 == state) { call_and_disable_work_9(ldv_work_struct_9_0); } else { } if (ldv_work_9_1 == state) { call_and_disable_work_9(ldv_work_struct_9_1); } else { } if (ldv_work_9_2 == state) { call_and_disable_work_9(ldv_work_struct_9_2); } else { } if (ldv_work_9_3 == state) { call_and_disable_work_9(ldv_work_struct_9_3); } else { } return; } } void choose_interrupt_1(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_0, ldv_irq_line_1_0, ldv_irq_data_1_0); goto ldv_59852; case 1: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_1, ldv_irq_line_1_1, ldv_irq_data_1_1); goto ldv_59852; case 2: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_2, ldv_irq_line_1_2, ldv_irq_data_1_2); goto ldv_59852; case 3: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_3, ldv_irq_line_1_3, ldv_irq_data_1_3); goto ldv_59852; default: ldv_stop(); } ldv_59852: ; return; } } int reg_check_2(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_sge_intr_msix)) { return (1); } else { } return (0); } } void call_and_disable_work_8(struct work_struct *work ) { { if ((ldv_work_8_0 == 2 || ldv_work_8_0 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_8_0) { process_db_full(work); ldv_work_8_0 = 1; return; } else { } if ((ldv_work_8_1 == 2 || ldv_work_8_1 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_8_1) { process_db_full(work); ldv_work_8_1 = 1; return; } else { } if ((ldv_work_8_2 == 2 || ldv_work_8_2 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_8_2) { process_db_full(work); ldv_work_8_2 = 1; return; } else { } if ((ldv_work_8_3 == 2 || ldv_work_8_3 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_8_3) { process_db_full(work); ldv_work_8_3 = 1; return; } else { } return; } } void ldv_pci_driver_46(void) { void *tmp ; { tmp = ldv_init_zalloc(2976UL); cxgb4_driver_group1 = (struct pci_dev *)tmp; return; } } int reg_check_3(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_sge_intr_msix)) { return (1); } else { } return (0); } } void invoke_work_9(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_work_9_0 == 2 || ldv_work_9_0 == 3) { ldv_work_9_0 = 4; process_db_drop(ldv_work_struct_9_0); ldv_work_9_0 = 1; } else { } goto ldv_59881; case 1: ; if (ldv_work_9_1 == 2 || ldv_work_9_1 == 3) { ldv_work_9_1 = 4; process_db_drop(ldv_work_struct_9_0); ldv_work_9_1 = 1; } else { } goto ldv_59881; case 2: ; if (ldv_work_9_2 == 2 || ldv_work_9_2 == 3) { ldv_work_9_2 = 4; process_db_drop(ldv_work_struct_9_0); ldv_work_9_2 = 1; } else { } goto ldv_59881; case 3: ; if (ldv_work_9_3 == 2 || ldv_work_9_3 == 3) { ldv_work_9_3 = 4; process_db_drop(ldv_work_struct_9_0); ldv_work_9_3 = 1; } else { } goto ldv_59881; default: ldv_stop(); } ldv_59881: ; return; } } void disable_work_8(struct work_struct *work ) { { if ((ldv_work_8_0 == 3 || ldv_work_8_0 == 2) && (unsigned long )ldv_work_struct_8_0 == (unsigned long )work) { ldv_work_8_0 = 1; } else { } if ((ldv_work_8_1 == 3 || ldv_work_8_1 == 2) && (unsigned long )ldv_work_struct_8_1 == (unsigned long )work) { ldv_work_8_1 = 1; } else { } if ((ldv_work_8_2 == 3 || ldv_work_8_2 == 2) && (unsigned long )ldv_work_struct_8_2 == (unsigned long )work) { ldv_work_8_2 = 1; } else { } if ((ldv_work_8_3 == 3 || ldv_work_8_3 == 2) && (unsigned long )ldv_work_struct_8_3 == (unsigned long )work) { ldv_work_8_3 = 1; } else { } return; } } void activate_work_9(struct work_struct *work , int state ) { { if (ldv_work_9_0 == 0) { ldv_work_struct_9_0 = work; ldv_work_9_0 = state; return; } else { } if (ldv_work_9_1 == 0) { ldv_work_struct_9_1 = work; ldv_work_9_1 = state; return; } else { } if (ldv_work_9_2 == 0) { ldv_work_struct_9_2 = work; ldv_work_9_2 = state; return; } else { } if (ldv_work_9_3 == 0) { ldv_work_struct_9_3 = work; ldv_work_9_3 = state; return; } else { } return; } } int reg_check_6(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_nondata_intr)) { return (1); } else { } return (0); } } void call_and_disable_all_7(int state ) { { if (ldv_work_7_0 == state) { call_and_disable_work_7(ldv_work_struct_7_0); } else { } if (ldv_work_7_1 == state) { call_and_disable_work_7(ldv_work_struct_7_1); } else { } if (ldv_work_7_2 == state) { call_and_disable_work_7(ldv_work_struct_7_2); } else { } if (ldv_work_7_3 == state) { call_and_disable_work_7(ldv_work_struct_7_3); } else { } return; } } int ldv_irq_4(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_sge_intr_msix(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_59908; default: ldv_stop(); } ldv_59908: ; } else { } return (state); } } void choose_interrupt_6(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_6_0 = ldv_irq_6(ldv_irq_6_0, ldv_irq_line_6_0, ldv_irq_data_6_0); goto ldv_59914; case 1: ldv_irq_6_0 = ldv_irq_6(ldv_irq_6_1, ldv_irq_line_6_1, ldv_irq_data_6_1); goto ldv_59914; case 2: ldv_irq_6_0 = ldv_irq_6(ldv_irq_6_2, ldv_irq_line_6_2, ldv_irq_data_6_2); goto ldv_59914; case 3: ldv_irq_6_0 = ldv_irq_6(ldv_irq_6_3, ldv_irq_line_6_3, ldv_irq_data_6_3); goto ldv_59914; default: ldv_stop(); } ldv_59914: ; return; } } void ldv_initialize_pci_error_handlers_47(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); cxgb4_eeh_group0 = (struct pci_dev *)tmp; return; } } void disable_suitable_irq_6(int line , void *data ) { { if (ldv_irq_6_0 != 0 && line == ldv_irq_line_6_0) { ldv_irq_6_0 = 0; return; } else { } if (ldv_irq_6_1 != 0 && line == ldv_irq_line_6_1) { ldv_irq_6_1 = 0; return; } else { } if (ldv_irq_6_2 != 0 && line == ldv_irq_line_6_2) { ldv_irq_6_2 = 0; return; } else { } if (ldv_irq_6_3 != 0 && line == ldv_irq_line_6_3) { ldv_irq_6_3 = 0; return; } else { } return; } } void work_init_7(void) { { ldv_work_7_0 = 0; ldv_work_7_1 = 0; ldv_work_7_2 = 0; ldv_work_7_3 = 0; return; } } void invoke_work_7(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_work_7_0 == 2 || ldv_work_7_0 == 3) { ldv_work_7_0 = 4; process_tid_release_list(ldv_work_struct_7_0); ldv_work_7_0 = 1; } else { } goto ldv_59935; case 1: ; if (ldv_work_7_1 == 2 || ldv_work_7_1 == 3) { ldv_work_7_1 = 4; process_tid_release_list(ldv_work_struct_7_0); ldv_work_7_1 = 1; } else { } goto ldv_59935; case 2: ; if (ldv_work_7_2 == 2 || ldv_work_7_2 == 3) { ldv_work_7_2 = 4; process_tid_release_list(ldv_work_struct_7_0); ldv_work_7_2 = 1; } else { } goto ldv_59935; case 3: ; if (ldv_work_7_3 == 2 || ldv_work_7_3 == 3) { ldv_work_7_3 = 4; process_tid_release_list(ldv_work_struct_7_0); ldv_work_7_3 = 1; } else { } goto ldv_59935; default: ldv_stop(); } ldv_59935: ; return; } } void activate_suitable_irq_5(int line , void *data ) { { if (ldv_irq_5_0 == 0) { ldv_irq_line_5_0 = line; ldv_irq_data_5_0 = data; ldv_irq_5_0 = 1; return; } else { } if (ldv_irq_5_1 == 0) { ldv_irq_line_5_1 = line; ldv_irq_data_5_1 = data; ldv_irq_5_1 = 1; return; } else { } if (ldv_irq_5_2 == 0) { ldv_irq_line_5_2 = line; ldv_irq_data_5_2 = data; ldv_irq_5_2 = 1; return; } else { } if (ldv_irq_5_3 == 0) { ldv_irq_line_5_3 = line; ldv_irq_data_5_3 = data; ldv_irq_5_3 = 1; return; } else { } return; } } void call_and_disable_all_8(int state ) { { if (ldv_work_8_0 == state) { call_and_disable_work_8(ldv_work_struct_8_0); } else { } if (ldv_work_8_1 == state) { call_and_disable_work_8(ldv_work_struct_8_1); } else { } if (ldv_work_8_2 == state) { call_and_disable_work_8(ldv_work_struct_8_2); } else { } if (ldv_work_8_3 == state) { call_and_disable_work_8(ldv_work_struct_8_3); } else { } return; } } void call_and_disable_work_9(struct work_struct *work ) { { if ((ldv_work_9_0 == 2 || ldv_work_9_0 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_9_0) { process_db_drop(work); ldv_work_9_0 = 1; return; } else { } if ((ldv_work_9_1 == 2 || ldv_work_9_1 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_9_1) { process_db_drop(work); ldv_work_9_1 = 1; return; } else { } if ((ldv_work_9_2 == 2 || ldv_work_9_2 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_9_2) { process_db_drop(work); ldv_work_9_2 = 1; return; } else { } if ((ldv_work_9_3 == 2 || ldv_work_9_3 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_9_3) { process_db_drop(work); ldv_work_9_3 = 1; return; } else { } return; } } void disable_suitable_irq_1(int line , void *data ) { { if (ldv_irq_1_0 != 0 && line == ldv_irq_line_1_0) { ldv_irq_1_0 = 0; return; } else { } if (ldv_irq_1_1 != 0 && line == ldv_irq_line_1_1) { ldv_irq_1_1 = 0; return; } else { } if (ldv_irq_1_2 != 0 && line == ldv_irq_line_1_2) { ldv_irq_1_2 = 0; return; } else { } if (ldv_irq_1_3 != 0 && line == ldv_irq_line_1_3) { ldv_irq_1_3 = 0; return; } else { } return; } } void activate_suitable_irq_1(int line , void *data ) { { if (ldv_irq_1_0 == 0) { ldv_irq_line_1_0 = line; ldv_irq_data_1_0 = data; ldv_irq_1_0 = 1; return; } else { } if (ldv_irq_1_1 == 0) { ldv_irq_line_1_1 = line; ldv_irq_data_1_1 = data; ldv_irq_1_1 = 1; return; } else { } if (ldv_irq_1_2 == 0) { ldv_irq_line_1_2 = line; ldv_irq_data_1_2 = data; ldv_irq_1_2 = 1; return; } else { } if (ldv_irq_1_3 == 0) { ldv_irq_line_1_3 = line; ldv_irq_data_1_3 = data; ldv_irq_1_3 = 1; return; } else { } return; } } int reg_check_4(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_sge_intr_msix)) { return (1); } else { } return (0); } } void activate_work_8(struct work_struct *work , int state ) { { if (ldv_work_8_0 == 0) { ldv_work_struct_8_0 = work; ldv_work_8_0 = state; return; } else { } if (ldv_work_8_1 == 0) { ldv_work_struct_8_1 = work; ldv_work_8_1 = state; return; } else { } if (ldv_work_8_2 == 0) { ldv_work_struct_8_2 = work; ldv_work_8_2 = state; return; } else { } if (ldv_work_8_3 == 0) { ldv_work_struct_8_3 = work; ldv_work_8_3 = state; return; } else { } return; } } int ldv_irq_2(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_sge_intr_msix(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_59976; default: ldv_stop(); } ldv_59976: ; } else { } return (state); } } void choose_interrupt_2(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_2_0 = ldv_irq_2(ldv_irq_2_0, ldv_irq_line_2_0, ldv_irq_data_2_0); goto ldv_59982; case 1: ldv_irq_2_0 = ldv_irq_2(ldv_irq_2_1, ldv_irq_line_2_1, ldv_irq_data_2_1); goto ldv_59982; case 2: ldv_irq_2_0 = ldv_irq_2(ldv_irq_2_2, ldv_irq_line_2_2, ldv_irq_data_2_2); goto ldv_59982; case 3: ldv_irq_2_0 = ldv_irq_2(ldv_irq_2_3, ldv_irq_line_2_3, ldv_irq_data_2_3); goto ldv_59982; default: ldv_stop(); } ldv_59982: ; return; } } void disable_work_9(struct work_struct *work ) { { if ((ldv_work_9_0 == 3 || ldv_work_9_0 == 2) && (unsigned long )ldv_work_struct_9_0 == (unsigned long )work) { ldv_work_9_0 = 1; } else { } if ((ldv_work_9_1 == 3 || ldv_work_9_1 == 2) && (unsigned long )ldv_work_struct_9_1 == (unsigned long )work) { ldv_work_9_1 = 1; } else { } if ((ldv_work_9_2 == 3 || ldv_work_9_2 == 2) && (unsigned long )ldv_work_struct_9_2 == (unsigned long )work) { ldv_work_9_2 = 1; } else { } if ((ldv_work_9_3 == 3 || ldv_work_9_3 == 2) && (unsigned long )ldv_work_struct_9_3 == (unsigned long )work) { ldv_work_9_3 = 1; } else { } return; } } void disable_suitable_irq_4(int line , void *data ) { { if (ldv_irq_4_0 != 0 && line == ldv_irq_line_4_0) { ldv_irq_4_0 = 0; return; } else { } if (ldv_irq_4_1 != 0 && line == ldv_irq_line_4_1) { ldv_irq_4_1 = 0; return; } else { } if (ldv_irq_4_2 != 0 && line == ldv_irq_line_4_2) { ldv_irq_4_2 = 0; return; } else { } if (ldv_irq_4_3 != 0 && line == ldv_irq_line_4_3) { ldv_irq_4_3 = 0; return; } else { } return; } } void activate_work_7(struct work_struct *work , int state ) { { if (ldv_work_7_0 == 0) { ldv_work_struct_7_0 = work; ldv_work_7_0 = state; return; } else { } if (ldv_work_7_1 == 0) { ldv_work_struct_7_1 = work; ldv_work_7_1 = state; return; } else { } if (ldv_work_7_2 == 0) { ldv_work_struct_7_2 = work; ldv_work_7_2 = state; return; } else { } if (ldv_work_7_3 == 0) { ldv_work_struct_7_3 = work; ldv_work_7_3 = state; return; } else { } return; } } void disable_suitable_irq_3(int line , void *data ) { { if (ldv_irq_3_0 != 0 && line == ldv_irq_line_3_0) { ldv_irq_3_0 = 0; return; } else { } if (ldv_irq_3_1 != 0 && line == ldv_irq_line_3_1) { ldv_irq_3_1 = 0; return; } else { } if (ldv_irq_3_2 != 0 && line == ldv_irq_line_3_2) { ldv_irq_3_2 = 0; return; } else { } if (ldv_irq_3_3 != 0 && line == ldv_irq_line_3_3) { ldv_irq_3_3 = 0; return; } else { } return; } } int ldv_irq_1(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; int tmp___0 ; { tmp = __VERIFIER_nondet_int(); irq_retval = (irqreturn_t )tmp; if (state != 0) { tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = t4_sge_intr_msix(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_60009; default: ldv_stop(); } ldv_60009: ; } else { } return (state); } } void choose_interrupt_3(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_3_0 = ldv_irq_3(ldv_irq_3_0, ldv_irq_line_3_0, ldv_irq_data_3_0); goto ldv_60017; case 1: ldv_irq_3_0 = ldv_irq_3(ldv_irq_3_1, ldv_irq_line_3_1, ldv_irq_data_3_1); goto ldv_60017; case 2: ldv_irq_3_0 = ldv_irq_3(ldv_irq_3_2, ldv_irq_line_3_2, ldv_irq_data_3_2); goto ldv_60017; case 3: ldv_irq_3_0 = ldv_irq_3(ldv_irq_3_3, ldv_irq_line_3_3, ldv_irq_data_3_3); goto ldv_60017; default: ldv_stop(); } ldv_60017: ; return; } } int reg_check_5(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& t4_sge_intr_msix)) { return (1); } else { } return (0); } } void ldv_main_exported_35(void) ; void ldv_main_exported_33(void) ; void ldv_main_exported_32(void) ; void ldv_main_exported_21(void) ; void ldv_main_exported_26(void) ; void ldv_main_exported_17(void) ; void ldv_main_exported_22(void) ; void ldv_main_exported_18(void) ; void ldv_main_exported_30(void) ; void ldv_main_exported_23(void) ; void ldv_main_exported_13(void) ; void ldv_main_exported_16(void) ; void ldv_main_exported_29(void) ; void ldv_main_exported_25(void) ; void ldv_main_exported_27(void) ; void ldv_main_exported_39(void) ; void ldv_main_exported_28(void) ; void ldv_main_exported_40(void) ; void ldv_main_exported_36(void) ; void ldv_main_exported_41(void) ; void ldv_main_exported_12(void) ; void ldv_main_exported_14(void) ; void ldv_main_exported_15(void) ; void ldv_main_exported_20(void) ; void ldv_main_exported_38(void) ; void ldv_main_exported_34(void) ; void ldv_main_exported_37(void) ; void ldv_main_exported_24(void) ; void ldv_main_exported_19(void) ; void ldv_main_exported_31(void) ; void ldv_main_exported_45(void) ; void ldv_main_exported_44(void) ; void ldv_main_exported_43(void) ; void ldv_main_exported_42(void) ; int main(void) { struct notifier_block *ldvarg77 ; void *tmp ; unsigned long ldvarg79 ; void *ldvarg78 ; void *tmp___0 ; u16 (*ldvarg95)(struct net_device * , struct sk_buff * ) ; netdev_features_t ldvarg94 ; void *ldvarg91 ; void *tmp___1 ; struct rtnl_link_stats64 *ldvarg90 ; void *tmp___2 ; struct napi_struct *ldvarg100 ; void *tmp___3 ; int ldvarg93 ; int ldvarg98 ; struct sk_buff *ldvarg97 ; void *tmp___4 ; struct sk_buff *ldvarg92 ; void *tmp___5 ; void *ldvarg96 ; void *tmp___6 ; struct ifreq *ldvarg99 ; void *tmp___7 ; struct pci_device_id *ldvarg149 ; void *tmp___8 ; unsigned long ldvarg167 ; struct notifier_block *ldvarg165 ; void *tmp___9 ; void *ldvarg166 ; void *tmp___10 ; enum pci_channel_state ldvarg186 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; { tmp = ldv_init_zalloc(24UL); ldvarg77 = (struct notifier_block *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg78 = tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg91 = tmp___1; tmp___2 = ldv_init_zalloc(184UL); ldvarg90 = (struct rtnl_link_stats64 *)tmp___2; tmp___3 = ldv_init_zalloc(280UL); ldvarg100 = (struct napi_struct *)tmp___3; tmp___4 = ldv_init_zalloc(232UL); ldvarg97 = (struct sk_buff *)tmp___4; tmp___5 = ldv_init_zalloc(232UL); ldvarg92 = (struct sk_buff *)tmp___5; tmp___6 = ldv_init_zalloc(1UL); ldvarg96 = tmp___6; tmp___7 = ldv_init_zalloc(40UL); ldvarg99 = (struct ifreq *)tmp___7; tmp___8 = ldv_init_zalloc(32UL); ldvarg149 = (struct pci_device_id *)tmp___8; tmp___9 = ldv_init_zalloc(24UL); ldvarg165 = (struct notifier_block *)tmp___9; tmp___10 = ldv_init_zalloc(1UL); ldvarg166 = tmp___10; ldv_initialize(); ldv_memset((void *)(& ldvarg79), 0, 8UL); ldv_memset((void *)(& ldvarg95), 0, 8UL); ldv_memset((void *)(& ldvarg94), 0, 8UL); ldv_memset((void *)(& ldvarg93), 0, 4UL); ldv_memset((void *)(& ldvarg98), 0, 4UL); ldv_memset((void *)(& ldvarg167), 0, 8UL); ldv_memset((void *)(& ldvarg186), 0, 4UL); ldv_state_variable_33 = 0; ldv_state_variable_32 = 0; ldv_state_variable_21 = 0; work_init_7(); ldv_state_variable_7 = 1; ldv_state_variable_26 = 0; ldv_state_variable_17 = 0; ldv_state_variable_2 = 1; ldv_state_variable_1 = 1; ldv_state_variable_18 = 0; ldv_state_variable_30 = 0; ldv_state_variable_16 = 0; ldv_state_variable_44 = 0; ldv_state_variable_27 = 0; ldv_state_variable_25 = 0; ldv_state_variable_28 = 0; ldv_state_variable_40 = 0; ldv_state_variable_20 = 0; ldv_state_variable_14 = 0; ldv_state_variable_49 = 0; ldv_state_variable_24 = 0; timer_init_10(); ldv_state_variable_10 = 1; ldv_state_variable_31 = 0; ldv_state_variable_35 = 0; timer_init_11(); ldv_state_variable_11 = 1; ldv_state_variable_48 = 0; ldv_state_variable_42 = 0; ldv_state_variable_22 = 0; ref_cnt = 0; ldv_state_variable_0 = 1; ldv_state_variable_46 = 0; ldv_state_variable_13 = 0; ldv_state_variable_23 = 0; ldv_state_variable_29 = 0; ldv_state_variable_6 = 1; ldv_state_variable_50 = 0; ldv_state_variable_39 = 0; ldv_state_variable_36 = 0; ldv_state_variable_3 = 1; work_init_9(); ldv_state_variable_9 = 1; ldv_state_variable_41 = 0; ldv_state_variable_12 = 0; ldv_state_variable_47 = 0; ldv_state_variable_15 = 0; ldv_state_variable_38 = 0; work_init_8(); ldv_state_variable_8 = 1; ldv_state_variable_4 = 1; ldv_state_variable_34 = 0; ldv_state_variable_45 = 0; ldv_state_variable_37 = 0; ldv_state_variable_43 = 0; ldv_state_variable_19 = 0; ldv_state_variable_5 = 1; ldv_60229: tmp___11 = __VERIFIER_nondet_int(); switch (tmp___11) { case 0: ; if (ldv_state_variable_33 != 0) { ldv_main_exported_33(); } else { } goto ldv_60134; case 1: ; if (ldv_state_variable_32 != 0) { ldv_main_exported_32(); } else { } goto ldv_60134; case 2: ; if (ldv_state_variable_21 != 0) { ldv_main_exported_21(); } else { } goto ldv_60134; case 3: ; if (ldv_state_variable_7 != 0) { invoke_work_7(); } else { } goto ldv_60134; case 4: ; if (ldv_state_variable_26 != 0) { ldv_main_exported_26(); } else { } goto ldv_60134; case 5: ; if (ldv_state_variable_17 != 0) { ldv_main_exported_17(); } else { } goto ldv_60134; case 6: ; if (ldv_state_variable_2 != 0) { choose_interrupt_2(); } else { } goto ldv_60134; case 7: ; if (ldv_state_variable_1 != 0) { choose_interrupt_1(); } else { } goto ldv_60134; case 8: ; if (ldv_state_variable_18 != 0) { ldv_main_exported_18(); } else { } goto ldv_60134; case 9: ; if (ldv_state_variable_30 != 0) { ldv_main_exported_30(); } else { } goto ldv_60134; case 10: ; if (ldv_state_variable_16 != 0) { ldv_main_exported_16(); } else { } goto ldv_60134; case 11: ; if (ldv_state_variable_44 != 0) { ldv_main_exported_44(); } else { } goto ldv_60134; case 12: ; if (ldv_state_variable_27 != 0) { ldv_main_exported_27(); } else { } goto ldv_60134; case 13: ; if (ldv_state_variable_25 != 0) { ldv_main_exported_25(); } else { } goto ldv_60134; case 14: ; if (ldv_state_variable_28 != 0) { ldv_main_exported_28(); } else { } goto ldv_60134; case 15: ; if (ldv_state_variable_40 != 0) { ldv_main_exported_40(); } else { } goto ldv_60134; case 16: ; if (ldv_state_variable_20 != 0) { ldv_main_exported_20(); } else { } goto ldv_60134; case 17: ; if (ldv_state_variable_14 != 0) { ldv_main_exported_14(); } else { } goto ldv_60134; case 18: ; if (ldv_state_variable_49 != 0) { tmp___12 = __VERIFIER_nondet_int(); switch (tmp___12) { case 0: ; if (ldv_state_variable_49 == 1) { cxgb4_inet6addr_handler(ldvarg77, ldvarg79, ldvarg78); ldv_state_variable_49 = 1; } else { } goto ldv_60154; default: ldv_stop(); } ldv_60154: ; } else { } goto ldv_60134; case 19: ; if (ldv_state_variable_24 != 0) { ldv_main_exported_24(); } else { } goto ldv_60134; case 20: ; goto ldv_60134; case 21: ; if (ldv_state_variable_31 != 0) { ldv_main_exported_31(); } else { } goto ldv_60134; case 22: ; if (ldv_state_variable_35 != 0) { ldv_main_exported_35(); } else { } goto ldv_60134; case 23: ; goto ldv_60134; case 24: ; if (ldv_state_variable_48 != 0) { tmp___13 = __VERIFIER_nondet_int(); switch (tmp___13) { case 0: ; if (ldv_state_variable_48 == 3) { cxgb_close(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 1: ; if (ldv_state_variable_48 == 1) { cxgb_set_rxmode(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_set_rxmode(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_set_rxmode(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 2: ; if (ldv_state_variable_48 == 1) { eth_validate_addr(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { eth_validate_addr(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { eth_validate_addr(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 3: ; if (ldv_state_variable_48 == 1) { cxgb_busy_poll(ldvarg100); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_busy_poll(ldvarg100); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_busy_poll(ldvarg100); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 4: ; if (ldv_state_variable_48 == 1) { cxgb_ioctl(cxgb4_netdev_ops_group1, ldvarg99, ldvarg98); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_ioctl(cxgb4_netdev_ops_group1, ldvarg99, ldvarg98); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_ioctl(cxgb4_netdev_ops_group1, ldvarg99, ldvarg98); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 5: ; if (ldv_state_variable_48 == 1) { cxgb_netpoll(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_netpoll(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_netpoll(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 6: ; if (ldv_state_variable_48 == 1) { cxgb_select_queue(cxgb4_netdev_ops_group1, ldvarg97, ldvarg96, ldvarg95); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_select_queue(cxgb4_netdev_ops_group1, ldvarg97, ldvarg96, ldvarg95); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_select_queue(cxgb4_netdev_ops_group1, ldvarg97, ldvarg96, ldvarg95); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 7: ; if (ldv_state_variable_48 == 1) { cxgb_set_features(cxgb4_netdev_ops_group1, ldvarg94); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_set_features(cxgb4_netdev_ops_group1, ldvarg94); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_set_features(cxgb4_netdev_ops_group1, ldvarg94); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 8: ; if (ldv_state_variable_48 == 1) { cxgb_fcoe_enable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_fcoe_enable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_fcoe_enable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 9: ; if (ldv_state_variable_48 == 3) { cxgb_change_mtu(cxgb4_netdev_ops_group1, ldvarg93); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_change_mtu(cxgb4_netdev_ops_group1, ldvarg93); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 10: ; if (ldv_state_variable_48 == 2) { ldv_retval_21 = cxgb_open(cxgb4_netdev_ops_group1); if (ldv_retval_21 == 0) { ldv_state_variable_48 = 3; } else { } } else { } goto ldv_60163; case 11: ; if (ldv_state_variable_48 == 3) { t4_eth_xmit(ldvarg92, cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } goto ldv_60163; case 12: ; if (ldv_state_variable_48 == 1) { cxgb_fcoe_disable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_fcoe_disable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_fcoe_disable(cxgb4_netdev_ops_group1); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 13: ; if (ldv_state_variable_48 == 1) { cxgb_set_mac_addr(cxgb4_netdev_ops_group1, ldvarg91); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_set_mac_addr(cxgb4_netdev_ops_group1, ldvarg91); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_set_mac_addr(cxgb4_netdev_ops_group1, ldvarg91); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 14: ; if (ldv_state_variable_48 == 1) { cxgb_get_stats(cxgb4_netdev_ops_group1, ldvarg90); ldv_state_variable_48 = 1; } else { } if (ldv_state_variable_48 == 3) { cxgb_get_stats(cxgb4_netdev_ops_group1, ldvarg90); ldv_state_variable_48 = 3; } else { } if (ldv_state_variable_48 == 2) { cxgb_get_stats(cxgb4_netdev_ops_group1, ldvarg90); ldv_state_variable_48 = 2; } else { } goto ldv_60163; case 15: ; if (ldv_state_variable_48 == 1) { ldv_retval_20 = ldv_ndo_init_48(); if (ldv_retval_20 == 0) { ldv_state_variable_48 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_60163; case 16: ; if (ldv_state_variable_48 == 2) { ldv_ndo_uninit_48(); ldv_state_variable_48 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_60163; default: ldv_stop(); } ldv_60163: ; } else { } goto ldv_60134; case 25: ; if (ldv_state_variable_42 != 0) { ldv_main_exported_42(); } else { } goto ldv_60134; case 26: ; if (ldv_state_variable_22 != 0) { ldv_main_exported_22(); } else { } goto ldv_60134; case 27: ; if (ldv_state_variable_0 != 0) { tmp___14 = __VERIFIER_nondet_int(); switch (tmp___14) { case 0: ; if (ldv_state_variable_0 == 2 && ref_cnt == 0) { cxgb4_cleanup_module(); ldv_state_variable_0 = 3; goto ldv_final; } else { } goto ldv_60186; case 1: ; if (ldv_state_variable_0 == 1) { ldv_retval_23 = cxgb4_init_module(); if (ldv_retval_23 != 0) { ldv_state_variable_0 = 3; goto ldv_final; } else { } if (ldv_retval_23 == 0) { ldv_state_variable_0 = 2; ldv_state_variable_43 = 1; ldv_initialize_ethtool_ops_43(); ldv_state_variable_19 = 1; ldv_file_operations_19(); ldv_state_variable_37 = 1; ldv_file_operations_37(); ldv_state_variable_34 = 1; ldv_file_operations_34(); ldv_state_variable_38 = 1; ldv_file_operations_38(); ldv_state_variable_47 = 1; ldv_initialize_pci_error_handlers_47(); ldv_state_variable_12 = 1; ldv_file_operations_12(); ldv_state_variable_36 = 1; ldv_file_operations_36(); ldv_state_variable_39 = 1; ldv_file_operations_39(); ldv_state_variable_50 = 1; ldv_state_variable_29 = 1; ldv_file_operations_29(); ldv_state_variable_23 = 1; ldv_file_operations_23(); ldv_state_variable_13 = 1; ldv_file_operations_13(); ldv_state_variable_42 = 1; ldv_initialize_dcbnl_rtnl_ops_42(); ldv_state_variable_22 = 1; ldv_file_operations_22(); ldv_state_variable_35 = 1; ldv_file_operations_35(); ldv_state_variable_31 = 1; ldv_file_operations_31(); ldv_state_variable_49 = 1; ldv_state_variable_20 = 1; ldv_file_operations_20(); ldv_state_variable_14 = 1; ldv_file_operations_14(); ldv_state_variable_40 = 1; ldv_file_operations_40(); ldv_state_variable_27 = 1; ldv_file_operations_27(); ldv_state_variable_25 = 1; ldv_file_operations_25(); ldv_state_variable_44 = 1; ldv_file_operations_44(); ldv_state_variable_16 = 1; ldv_file_operations_16(); ldv_state_variable_30 = 1; ldv_file_operations_30(); ldv_state_variable_18 = 1; ldv_file_operations_18(); ldv_state_variable_17 = 1; ldv_file_operations_17(); ldv_state_variable_26 = 1; ldv_file_operations_26(); ldv_state_variable_21 = 1; ldv_file_operations_21(); ldv_state_variable_32 = 1; ldv_file_operations_32(); ldv_state_variable_33 = 1; ldv_file_operations_33(); } else { } } else { } goto ldv_60186; default: ldv_stop(); } ldv_60186: ; } else { } goto ldv_60134; case 28: ; if (ldv_state_variable_46 != 0) { tmp___15 = __VERIFIER_nondet_int(); switch (tmp___15) { case 0: ; if (ldv_state_variable_46 == 1) { ldv_retval_24 = init_one(cxgb4_driver_group1, (struct pci_device_id const *)ldvarg149); if (ldv_retval_24 == 0) { ldv_state_variable_46 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_60191; case 1: ; if (ldv_state_variable_46 == 2) { remove_one(cxgb4_driver_group1); ldv_state_variable_46 = 2; } else { } goto ldv_60191; case 2: ; if (ldv_state_variable_46 == 2) { remove_one(cxgb4_driver_group1); ldv_state_variable_46 = 1; } else { } goto ldv_60191; default: ldv_stop(); } ldv_60191: ; } else { } goto ldv_60134; case 29: ; if (ldv_state_variable_13 != 0) { ldv_main_exported_13(); } else { } goto ldv_60134; case 30: ; if (ldv_state_variable_23 != 0) { ldv_main_exported_23(); } else { } goto ldv_60134; case 31: ; if (ldv_state_variable_29 != 0) { ldv_main_exported_29(); } else { } goto ldv_60134; case 32: ; if (ldv_state_variable_6 != 0) { choose_interrupt_6(); } else { } goto ldv_60134; case 33: ; if (ldv_state_variable_50 != 0) { tmp___16 = __VERIFIER_nondet_int(); switch (tmp___16) { case 0: ; if (ldv_state_variable_50 == 1) { netevent_cb(ldvarg165, ldvarg167, ldvarg166); ldv_state_variable_50 = 1; } else { } goto ldv_60201; default: ldv_stop(); } ldv_60201: ; } else { } goto ldv_60134; case 34: ; if (ldv_state_variable_39 != 0) { ldv_main_exported_39(); } else { } goto ldv_60134; case 35: ; if (ldv_state_variable_36 != 0) { ldv_main_exported_36(); } else { } goto ldv_60134; case 36: ; if (ldv_state_variable_3 != 0) { choose_interrupt_3(); } else { } goto ldv_60134; case 37: ; if (ldv_state_variable_9 != 0) { invoke_work_9(); } else { } goto ldv_60134; case 38: ; if (ldv_state_variable_41 != 0) { ldv_main_exported_41(); } else { } goto ldv_60134; case 39: ; if (ldv_state_variable_12 != 0) { ldv_main_exported_12(); } else { } goto ldv_60134; case 40: ; if (ldv_state_variable_47 != 0) { tmp___17 = __VERIFIER_nondet_int(); switch (tmp___17) { case 0: ; if (ldv_state_variable_47 == 1) { eeh_slot_reset(cxgb4_eeh_group0); ldv_state_variable_47 = 1; } else { } if (ldv_state_variable_47 == 3) { eeh_slot_reset(cxgb4_eeh_group0); ldv_state_variable_47 = 3; } else { } if (ldv_state_variable_47 == 2) { eeh_slot_reset(cxgb4_eeh_group0); ldv_state_variable_47 = 2; } else { } goto ldv_60211; case 1: ; if (ldv_state_variable_47 == 1) { eeh_err_detected(cxgb4_eeh_group0, (pci_channel_state_t )ldvarg186); ldv_state_variable_47 = 1; } else { } if (ldv_state_variable_47 == 3) { eeh_err_detected(cxgb4_eeh_group0, (pci_channel_state_t )ldvarg186); ldv_state_variable_47 = 3; } else { } if (ldv_state_variable_47 == 2) { eeh_err_detected(cxgb4_eeh_group0, (pci_channel_state_t )ldvarg186); ldv_state_variable_47 = 2; } else { } goto ldv_60211; case 2: ; if (ldv_state_variable_47 == 3) { eeh_resume(cxgb4_eeh_group0); ldv_state_variable_47 = 2; } else { } goto ldv_60211; case 3: ; if (ldv_state_variable_47 == 2) { ldv_suspend_47(); ldv_state_variable_47 = 3; } else { } goto ldv_60211; case 4: ; if (ldv_state_variable_47 == 3) { ldv_release_47(); ldv_state_variable_47 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_47 == 2) { ldv_release_47(); ldv_state_variable_47 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_60211; case 5: ; if (ldv_state_variable_47 == 1) { ldv_probe_47(); ldv_state_variable_47 = 2; ref_cnt = ref_cnt + 1; } else { } goto ldv_60211; default: ldv_stop(); } ldv_60211: ; } else { } goto ldv_60134; case 41: ; if (ldv_state_variable_15 != 0) { ldv_main_exported_15(); } else { } goto ldv_60134; case 42: ; if (ldv_state_variable_38 != 0) { ldv_main_exported_38(); } else { } goto ldv_60134; case 43: ; if (ldv_state_variable_8 != 0) { invoke_work_8(); } else { } goto ldv_60134; case 44: ; if (ldv_state_variable_4 != 0) { choose_interrupt_4(); } else { } goto ldv_60134; case 45: ; if (ldv_state_variable_34 != 0) { ldv_main_exported_34(); } else { } goto ldv_60134; case 46: ; if (ldv_state_variable_45 != 0) { ldv_main_exported_45(); } else { } goto ldv_60134; case 47: ; if (ldv_state_variable_37 != 0) { ldv_main_exported_37(); } else { } goto ldv_60134; case 48: ; if (ldv_state_variable_43 != 0) { ldv_main_exported_43(); } else { } goto ldv_60134; case 49: ; if (ldv_state_variable_19 != 0) { ldv_main_exported_19(); } else { } goto ldv_60134; case 50: ; if (ldv_state_variable_5 != 0) { choose_interrupt_5(); } else { } goto ldv_60134; default: ldv_stop(); } ldv_60134: ; goto ldv_60229; ldv_final: ldv_check_final_state(); return 0; } } __inline static long PTR_ERR(void const *ptr ) { long tmp ; { tmp = ldv_ptr_err(ptr); return (tmp); } } __inline static bool IS_ERR(void const *ptr ) { bool tmp ; { tmp = ldv_is_err(ptr); return (tmp); } } __inline static bool IS_ERR_OR_NULL(void const *ptr ) { bool tmp ; { tmp = ldv_is_err_or_null(ptr); return (tmp); } } bool ldv_queue_work_on_5(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_6(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_7(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_8(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_9(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } __inline static int ldv_request_irq_10(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } __inline static int ldv_request_irq_11(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } __inline static int ldv_request_irq_12(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___5 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } __inline static int ldv_request_irq_13(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___6 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } __inline static int ldv_request_irq_14(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___7 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } void ldv_free_irq_15(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_16(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_17(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_18(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_19(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_20(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_21(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_22(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_23(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_24(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_25(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_free_irq_26(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } __inline static int ldv_request_irq_27(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___8 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } void ldv_free_irq_28(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_2((int )ldv_func_arg1, ldv_func_arg2); return; } } __inline static int ldv_request_irq_29(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___9 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_2(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_2((int )irq, dev); } else { } return (ldv_func_res); } } bool ldv_cancel_work_sync_30(struct work_struct *ldv_func_arg1 ) { ldv_func_ret_type___10 ldv_func_res ; bool tmp ; { tmp = cancel_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_7(ldv_func_arg1); return (ldv_func_res); } } bool ldv_cancel_work_sync_31(struct work_struct *ldv_func_arg1 ) { ldv_func_ret_type___11 ldv_func_res ; bool tmp ; { tmp = cancel_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_7(ldv_func_arg1); return (ldv_func_res); } } bool ldv_cancel_work_sync_32(struct work_struct *ldv_func_arg1 ) { ldv_func_ret_type___12 ldv_func_res ; bool tmp ; { tmp = cancel_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_7(ldv_func_arg1); return (ldv_func_res); } } void ldv_free_netdev_33(struct net_device *dev ) { { free_netdev(dev); ldv_state_variable_48 = 0; return; } } int ldv_register_netdev_34(struct net_device *dev ) { ldv_func_ret_type___13 ldv_func_res ; int tmp ; { tmp = register_netdev(dev); ldv_func_res = tmp; ldv_state_variable_48 = 1; ldv_net_device_ops_48(); return (ldv_func_res); } } void ldv_destroy_workqueue_35(struct workqueue_struct *ldv_func_arg1 ) { { destroy_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } void ldv_destroy_workqueue_36(struct workqueue_struct *ldv_func_arg1 ) { { destroy_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } void ldv_unregister_netdev_37(struct net_device *dev ) { { unregister_netdev(dev); ldv_state_variable_48 = 0; return; } } int ldv___pci_register_driver_38(struct pci_driver *ldv_func_arg1 , struct module *ldv_func_arg2 , char const *ldv_func_arg3 ) { ldv_func_ret_type___14 ldv_func_res ; int tmp ; { tmp = __pci_register_driver(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; ldv_state_variable_46 = 1; ldv_pci_driver_46(); return (ldv_func_res); } } void ldv_pci_unregister_driver_39(struct pci_driver *ldv_func_arg1 ) { { pci_unregister_driver(ldv_func_arg1); ldv_state_variable_46 = 0; return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static __u32 rol32(__u32 word , unsigned int shift ) { { return ((word << shift) | (word >> (8UL * sizeof(word) - (unsigned long )shift))); } } extern int memcmp(void const * , void const * , size_t ) ; extern void __xadd_wrong_size(void) ; __inline static int atomic_read(atomic_t const *v ) { int __var ; { __var = 0; return ((int )*((int const volatile *)(& v->counter))); } } __inline static void atomic_inc(atomic_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; incl %0": "+m" (v->counter)); return; } } __inline static int atomic_dec_and_test(atomic_t *v ) { char c ; { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; decl %0; sete %1": "+m" (v->counter), "=qm" (c): : "memory"); return ((int )((signed char )c) != 0); } } __inline static int atomic_add_return(int i , atomic_t *v ) { int __ret ; { __ret = i; switch (4UL) { case 1UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddb %b0, %1\n": "+q" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5659; case 2UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddw %w0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5659; case 4UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddl %0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5659; case 8UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddq %q0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5659; default: __xadd_wrong_size(); } ldv_5659: ; return (__ret + i); } } extern void __rwlock_init(rwlock_t * , char const * , struct lock_class_key * ) ; extern void _raw_read_lock_bh(rwlock_t * ) ; extern void _raw_write_lock_bh(rwlock_t * ) ; extern void _raw_read_unlock(rwlock_t * ) ; extern void _raw_read_unlock_bh(rwlock_t * ) ; extern void _raw_write_unlock_bh(rwlock_t * ) ; extern unsigned long volatile jiffies ; bool ldv_queue_work_on_79(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_81(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_80(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_83(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_82(struct workqueue_struct *ldv_func_arg1 ) ; void ldv_seq_operations_45(void) ; void ldv_seq_operations_28(void) ; extern int seq_open(struct file * , struct seq_operations const * ) ; int ldv_seq_open_84(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) ; extern ssize_t seq_read(struct file * , char * , size_t , loff_t * ) ; extern loff_t seq_lseek(struct file * , loff_t , int ) ; extern int seq_release(struct inode * , struct file * ) ; int ldv_seq_release_85(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; extern int seq_puts(struct seq_file * , char const * ) ; extern int seq_printf(struct seq_file * , char const * , ...) ; __inline static unsigned char *__skb_put___0(struct sk_buff *skb , unsigned int len ) { unsigned char *tmp ; unsigned char *tmp___0 ; bool tmp___1 ; long tmp___2 ; { tmp___0 = skb_tail_pointer((struct sk_buff const *)skb); tmp = tmp___0; tmp___1 = skb_is_nonlinear((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect((long )tmp___1, 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (1696), "i" (12UL)); ldv_27570: ; goto ldv_27570; } else { } skb->tail = skb->tail + len; skb->len = skb->len + len; return (tmp); } } extern u16 vlan_dev_vlan_id(struct net_device const * ) ; __inline static u32 __jhash_nwords(u32 a , u32 b , u32 c , u32 initval ) { __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; { a = a + initval; b = b + initval; c = c + initval; c = c ^ b; tmp = rol32(b, 14U); c = c - tmp; a = a ^ c; tmp___0 = rol32(c, 11U); a = a - tmp___0; b = b ^ a; tmp___1 = rol32(a, 25U); b = b - tmp___1; c = c ^ b; tmp___2 = rol32(b, 16U); c = c - tmp___2; a = a ^ c; tmp___3 = rol32(c, 4U); a = a - tmp___3; b = b ^ a; tmp___4 = rol32(a, 14U); b = b - tmp___4; c = c ^ b; tmp___5 = rol32(b, 24U); c = c - tmp___5; return (c); } } __inline static u32 jhash_2words(u32 a , u32 b , u32 initval ) { u32 tmp ; { tmp = __jhash_nwords(a, b, 0U, initval + 3735928567U); return (tmp); } } extern void neigh_destroy(struct neighbour * ) ; extern int __neigh_event_send(struct neighbour * , struct sk_buff * ) ; __inline static void neigh_release(struct neighbour *neigh ) { int tmp ; { tmp = atomic_dec_and_test(& neigh->refcnt); if (tmp != 0) { neigh_destroy(neigh); } else { } return; } } __inline static int neigh_event_send(struct neighbour *neigh , struct sk_buff *skb ) { unsigned long now ; int tmp ; { now = jiffies; if (neigh->used != now) { neigh->used = now; } else { } if (((int )neigh->nud_state & 218) == 0) { tmp = __neigh_event_send(neigh, skb); return (tmp); } else { } return (0); } } int cxgb4_l2t_send(struct net_device *dev , struct sk_buff *skb , struct l2t_entry *e ) ; struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d , struct neighbour *neigh , struct net_device const *physdev , unsigned int priority ) ; u64 cxgb4_select_ntuple(struct net_device *dev , struct l2t_entry const *l2t ) ; struct file_operations const t4_l2t_fops ; __inline static unsigned int vlan_prio(struct l2t_entry const *e ) { { return ((unsigned int )((int )((unsigned short )e->vlan) >> 13)); } } __inline static void l2t_hold(struct l2t_data *d , struct l2t_entry *e ) { int tmp ; { tmp = atomic_add_return(1, & e->refcnt); if (tmp == 1) { atomic_dec(& d->nfree); } else { } return; } } __inline static unsigned int arp_hash(u32 const *key , int ifindex ) { u32 tmp ; { tmp = jhash_2words(*key, (u32 )ifindex, 0U); return (tmp & 2047U); } } __inline static unsigned int ipv6_hash(u32 const *key , int ifindex ) { u32 xor ; u32 tmp ; { xor = (((unsigned int )*key ^ (unsigned int )*(key + 1UL)) ^ (unsigned int )*(key + 2UL)) ^ (unsigned int )*(key + 3UL); tmp = jhash_2words(xor, (u32 )ifindex, 0U); return ((tmp & 2047U) + 2048U); } } static unsigned int addr_hash(u32 const *addr , int addr_len , int ifindex ) { unsigned int tmp ; unsigned int tmp___0 ; unsigned int tmp___1 ; { if (addr_len == 4) { tmp = arp_hash(addr, ifindex); tmp___1 = tmp; } else { tmp___0 = ipv6_hash(addr, ifindex); tmp___1 = tmp___0; } return (tmp___1); } } static int addreq(struct l2t_entry const *e , u32 const *addr ) { { if ((unsigned int )((unsigned char )e->v6) != 0U) { return ((int )((((e->addr[0] ^ (unsigned int )*addr) | (e->addr[1] ^ (unsigned int )*(addr + 1UL))) | (e->addr[2] ^ (unsigned int )*(addr + 2UL))) | (e->addr[3] ^ (unsigned int )*(addr + 3UL)))); } else { } return ((int )(e->addr[0] ^ (unsigned int )*addr)); } } static void neigh_replace(struct l2t_entry *e , struct neighbour *n ) { { atomic_inc(& n->refcnt); if ((unsigned long )e->neigh != (unsigned long )((struct neighbour *)0)) { neigh_release(e->neigh); } else { } e->neigh = n; return; } } static int write_l2e(struct adapter *adap , struct l2t_entry *e , int sync ) { struct sk_buff *skb ; struct cpl_l2t_write_req *req ; unsigned char *tmp ; __u32 tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; __u16 tmp___3 ; { skb = alloc_skb(32U, 32U); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-12); } else { } tmp = __skb_put___0(skb, 32U); req = (struct cpl_l2t_write_req *)tmp; req->wr.wr_hi = 268435461U; req->wr.wr_mid = 33554432U; req->wr.wr_lo = 0ULL; tmp___0 = __fswab32((__u32 )((((int )e->idx | (sync != 0 ? 4096 : 0)) | ((int )adap->sge.fw_evtq.abs_id << 14)) | 301989888)); req->ot.opcode_tid = tmp___0; tmp___1 = __fswab16((int )((__u16 )((int )((short )((int )e->lport << 8)) | (sync == 0 ? -32768 : 0)))); req->params = tmp___1; tmp___2 = __fswab16((int )e->idx); req->l2t_idx = tmp___2; tmp___3 = __fswab16((int )e->vlan); req->vlan = tmp___3; if ((unsigned long )e->neigh != (unsigned long )((struct neighbour *)0) && (((e->neigh)->dev)->flags & 8U) == 0U) { memcpy((void *)(& e->dmac), (void const *)(& (e->neigh)->ha), 6UL); } else { } memcpy((void *)(& req->dst_mac), (void const *)(& e->dmac), 6UL); set_wr_txq(skb, 1, 0); t4_ofld_send(adap, skb); if (sync != 0 && (unsigned int )e->state != 4U) { e->state = 3U; } else { } return (0); } } static void send_pending(struct adapter *adap , struct l2t_entry *e ) { struct sk_buff *skb ; { goto ldv_51596; ldv_51595: skb = e->arpq_head; e->arpq_head = skb->__annonCompField79.__annonCompField78.next; skb->__annonCompField79.__annonCompField78.next = (struct sk_buff *)0; t4_ofld_send(adap, skb); ldv_51596: ; if ((unsigned long )e->arpq_head != (unsigned long )((struct sk_buff *)0)) { goto ldv_51595; } else { } e->arpq_tail = (struct sk_buff *)0; return; } } void do_l2t_write_rpl(struct adapter *adap , struct cpl_l2t_write_rpl const *rpl ) { unsigned int tid ; __u32 tmp ; unsigned int idx ; long tmp___0 ; struct l2t_entry *e ; { tmp = __fswab32(rpl->ot.opcode_tid); tid = tmp & 16777215U; idx = tid & 4095U; tmp___0 = ldv__builtin_expect((unsigned int )((unsigned char )rpl->status) != 0U, 0L); if (tmp___0 != 0L) { dev_err((struct device const *)adap->pdev_dev, "Unexpected L2T_WRITE_RPL status %u for entry %u\n", (int )rpl->status, idx); return; } else { } if ((tid & 4096U) != 0U) { e = (struct l2t_entry *)(& (adap->l2t)->l2tab) + (unsigned long )idx; spin_lock(& e->lock); if ((unsigned int )e->state != 4U) { send_pending(adap, e); e->state = ((int )(e->neigh)->nud_state & 4) != 0; } else { } spin_unlock(& e->lock); } else { } return; } } __inline static void arpq_enqueue(struct l2t_entry *e , struct sk_buff *skb ) { { skb->__annonCompField79.__annonCompField78.next = (struct sk_buff *)0; if ((unsigned long )e->arpq_head != (unsigned long )((struct sk_buff *)0)) { (e->arpq_tail)->__annonCompField79.__annonCompField78.next = skb; } else { e->arpq_head = skb; } e->arpq_tail = skb; return; } } int cxgb4_l2t_send(struct net_device *dev , struct sk_buff *skb , struct l2t_entry *e ) { struct adapter *adap ; struct adapter *tmp ; int tmp___0 ; int tmp___1 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; again: ; switch ((int )e->state) { case 1: neigh_event_send(e->neigh, (struct sk_buff *)0); spin_lock_bh(& e->lock); if ((unsigned int )e->state == 1U) { e->state = 0U; } else { } spin_unlock_bh(& e->lock); case 0: tmp___0 = t4_ofld_send(adap, skb); return (tmp___0); case 2: ; case 3: spin_lock_bh(& e->lock); if ((unsigned int )e->state != 3U && (unsigned int )e->state != 2U) { spin_unlock_bh(& e->lock); goto again; } else { } arpq_enqueue(e, skb); spin_unlock_bh(& e->lock); if ((unsigned int )e->state == 2U) { tmp___1 = neigh_event_send(e->neigh, (struct sk_buff *)0); if (tmp___1 == 0) { spin_lock_bh(& e->lock); if ((unsigned int )e->state == 2U && (unsigned long )e->arpq_head != (unsigned long )((struct sk_buff *)0)) { write_l2e(adap, e, 1); } else { } spin_unlock_bh(& e->lock); } else { } } else { } } return (0); } } static char const __kstrtab_cxgb4_l2t_send[15U] = { 'c', 'x', 'g', 'b', '4', '_', 'l', '2', 't', '_', 's', 'e', 'n', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_l2t_send ; struct kernel_symbol const __ksymtab_cxgb4_l2t_send = {(unsigned long )(& cxgb4_l2t_send), (char const *)(& __kstrtab_cxgb4_l2t_send)}; static struct l2t_entry *alloc_l2e(struct l2t_data *d ) { struct l2t_entry *end ; struct l2t_entry *e ; struct l2t_entry **p ; int tmp ; int tmp___0 ; int tmp___1 ; { tmp = atomic_read((atomic_t const *)(& d->nfree)); if (tmp == 0) { return ((struct l2t_entry *)0); } else { } e = d->rover; end = (struct l2t_entry *)(& d->l2tab) + 4096UL; goto ldv_51637; ldv_51636: tmp___0 = atomic_read((atomic_t const *)(& e->refcnt)); if (tmp___0 == 0) { goto found; } else { } e = e + 1; ldv_51637: ; if ((unsigned long )e != (unsigned long )end) { goto ldv_51636; } else { } e = (struct l2t_entry *)(& d->l2tab); goto ldv_51640; ldv_51639: e = e + 1; ldv_51640: tmp___1 = atomic_read((atomic_t const *)(& e->refcnt)); if (tmp___1 != 0) { goto ldv_51639; } else { } found: d->rover = e + 1UL; atomic_dec(& d->nfree); if ((unsigned int )e->state <= 3U) { p = & d->l2tab[(int )e->hash].first; goto ldv_51644; ldv_51643: ; if ((unsigned long )*p == (unsigned long )e) { *p = e->next; e->next = (struct l2t_entry *)0; goto ldv_51642; } else { } p = & (*p)->next; ldv_51644: ; if ((unsigned long )*p != (unsigned long )((struct l2t_entry *)0)) { goto ldv_51643; } else { } ldv_51642: ; } else { } e->state = 5U; return (e); } } static void t4_l2e_free(struct l2t_entry *e ) { struct l2t_data *d ; struct sk_buff *skb ; int tmp ; struct l2t_entry const *__mptr ; { spin_lock_bh(& e->lock); tmp = atomic_read((atomic_t const *)(& e->refcnt)); if (tmp == 0) { if ((unsigned long )e->neigh != (unsigned long )((struct neighbour *)0)) { neigh_release(e->neigh); e->neigh = (struct neighbour *)0; } else { } goto ldv_51651; ldv_51650: skb = e->arpq_head; e->arpq_head = skb->__annonCompField79.__annonCompField78.next; kfree_skb(skb); ldv_51651: ; if ((unsigned long )e->arpq_head != (unsigned long )((struct sk_buff *)0)) { goto ldv_51650; } else { } e->arpq_tail = (struct sk_buff *)0; } else { } spin_unlock_bh(& e->lock); __mptr = (struct l2t_entry const *)e; d = (struct l2t_data *)__mptr + - ((unsigned long )e->idx * 152UL + 88UL); atomic_inc(& d->nfree); return; } } void cxgb4_l2t_release(struct l2t_entry *e ) { int tmp ; { tmp = atomic_dec_and_test(& e->refcnt); if (tmp != 0) { t4_l2e_free(e); } else { } return; } } static char const __kstrtab_cxgb4_l2t_release[18U] = { 'c', 'x', 'g', 'b', '4', '_', 'l', '2', 't', '_', 'r', 'e', 'l', 'e', 'a', 's', 'e', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_l2t_release ; struct kernel_symbol const __ksymtab_cxgb4_l2t_release = {(unsigned long )(& cxgb4_l2t_release), (char const *)(& __kstrtab_cxgb4_l2t_release)}; static void reuse_entry(struct l2t_entry *e , struct neighbour *neigh ) { unsigned int nud_state ; int tmp ; { spin_lock(& e->lock); if ((unsigned long )e->neigh != (unsigned long )neigh) { neigh_replace(e, neigh); } else { } nud_state = (unsigned int )neigh->nud_state; tmp = memcmp((void const *)(& e->dmac), (void const *)(& neigh->ha), 6UL); if (tmp != 0 || (nud_state & 222U) == 0U) { e->state = 2U; } else if ((nud_state & 194U) != 0U) { e->state = 0U; } else { e->state = 1U; } spin_unlock(& e->lock); return; } } struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d , struct neighbour *neigh , struct net_device const *physdev , unsigned int priority ) { u8 lport ; u16 vlan ; struct l2t_entry *e ; int addr_len ; u32 *addr ; int ifidx ; int hash ; unsigned int tmp ; struct port_info *tmp___0 ; struct port_info *tmp___1 ; int tmp___2 ; int tmp___3 ; { addr_len = (neigh->tbl)->key_len; addr = (u32 *)(& neigh->primary_key); ifidx = (neigh->dev)->ifindex; tmp = addr_hash((u32 const *)addr, addr_len, ifidx); hash = (int )tmp; if (((neigh->dev)->flags & 8U) != 0U) { tmp___0 = netdev2pinfo(physdev); lport = (unsigned int )tmp___0->tx_chan + 4U; } else { tmp___1 = netdev2pinfo(physdev); lport = tmp___1->lport; } if ((int )(neigh->dev)->priv_flags & 1) { vlan = vlan_dev_vlan_id((struct net_device const *)neigh->dev); } else { vlan = 4095U; } _raw_write_lock_bh(& d->lock); e = d->l2tab[hash].first; goto ldv_51685; ldv_51684: tmp___3 = addreq((struct l2t_entry const *)e, (u32 const *)addr); if (((tmp___3 == 0 && e->ifindex == ifidx) && (int )e->vlan == (int )vlan) && (int )e->lport == (int )lport) { l2t_hold(d, e); tmp___2 = atomic_read((atomic_t const *)(& e->refcnt)); if (tmp___2 == 1) { reuse_entry(e, neigh); } else { } goto done; } else { } e = e->next; ldv_51685: ; if ((unsigned long )e != (unsigned long )((struct l2t_entry *)0)) { goto ldv_51684; } else { } e = alloc_l2e(d); if ((unsigned long )e != (unsigned long )((struct l2t_entry *)0)) { spin_lock(& e->lock); e->state = 2U; if (((neigh->dev)->flags & 8U) != 0U) { memcpy((void *)(& e->dmac), (void const *)physdev->dev_addr, 6UL); } else { } memcpy((void *)(& e->addr), (void const *)addr, (size_t )addr_len); e->ifindex = ifidx; e->hash = (u16 )hash; e->lport = lport; e->v6 = addr_len == 16; atomic_set(& e->refcnt, 1); neigh_replace(e, neigh); e->vlan = vlan; e->next = d->l2tab[hash].first; d->l2tab[hash].first = e; spin_unlock(& e->lock); } else { } done: _raw_write_unlock_bh(& d->lock); return (e); } } static char const __kstrtab_cxgb4_l2t_get[14U] = { 'c', 'x', 'g', 'b', '4', '_', 'l', '2', 't', '_', 'g', 'e', 't', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_l2t_get ; struct kernel_symbol const __ksymtab_cxgb4_l2t_get = {(unsigned long )(& cxgb4_l2t_get), (char const *)(& __kstrtab_cxgb4_l2t_get)}; u64 cxgb4_select_ntuple(struct net_device *dev , struct l2t_entry const *l2t ) { struct adapter *adap ; struct adapter *tmp ; struct tp_params *tp ; u64 ntuple ; u32 viid ; unsigned int tmp___0 ; u32 vf ; u32 pf ; u32 vld ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; tp = & adap->params.tp; ntuple = 0ULL; if (tp->vlan_shift >= 0 && (unsigned int )((unsigned short )l2t->vlan) != 4095U) { ntuple = ((unsigned long long )((unsigned int )l2t->vlan | 65536U) << tp->vlan_shift) | ntuple; } else { } if (tp->port_shift >= 0) { ntuple = ((unsigned long long )l2t->lport << tp->port_shift) | ntuple; } else { } if (tp->protocol_shift >= 0) { ntuple = (6ULL << tp->protocol_shift) | ntuple; } else { } if (tp->vnic_shift >= 0) { tmp___0 = cxgb4_port_viid((struct net_device const *)dev); viid = tmp___0; vf = viid & 127U; pf = (viid >> 8) & 7U; vld = (viid >> 7) & 1U; ntuple = ((unsigned long long )(((pf << 7) | vf) | (vld << 16)) << tp->vnic_shift) | ntuple; } else { } return (ntuple); } } static char const __kstrtab_cxgb4_select_ntuple[20U] = { 'c', 'x', 'g', 'b', '4', '_', 's', 'e', 'l', 'e', 'c', 't', '_', 'n', 't', 'u', 'p', 'l', 'e', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_select_ntuple ; struct kernel_symbol const __ksymtab_cxgb4_select_ntuple = {(unsigned long )(& cxgb4_select_ntuple), (char const *)(& __kstrtab_cxgb4_select_ntuple)}; static void handle_failed_resolution(struct adapter *adap , struct sk_buff *arpq ) { struct sk_buff *skb ; struct l2t_skb_cb const *cb ; { goto ldv_51723; ldv_51722: skb = arpq; cb = (struct l2t_skb_cb const *)(& skb->cb); arpq = skb->__annonCompField79.__annonCompField78.next; skb->__annonCompField79.__annonCompField78.next = (struct sk_buff *)0; if ((unsigned long )cb->arp_err_handler != (unsigned long )((void (*)(void * , struct sk_buff * ))0)) { (*(cb->arp_err_handler))(cb->handle, skb); } else { t4_ofld_send(adap, skb); } ldv_51723: ; if ((unsigned long )arpq != (unsigned long )((struct sk_buff *)0)) { goto ldv_51722; } else { } return; } } void t4_l2t_update(struct adapter *adap , struct neighbour *neigh ) { struct l2t_entry *e ; struct sk_buff *arpq ; struct l2t_data *d ; int addr_len ; u32 *addr ; int ifidx ; int hash ; unsigned int tmp ; int tmp___0 ; int tmp___1 ; struct sk_buff *tmp___2 ; int tmp___3 ; { arpq = (struct sk_buff *)0; d = adap->l2t; addr_len = (neigh->tbl)->key_len; addr = (u32 *)(& neigh->primary_key); ifidx = (neigh->dev)->ifindex; tmp = addr_hash((u32 const *)addr, addr_len, ifidx); hash = (int )tmp; _raw_read_lock_bh(& d->lock); e = d->l2tab[hash].first; goto ldv_51739; ldv_51738: tmp___1 = addreq((struct l2t_entry const *)e, (u32 const *)addr); if (tmp___1 == 0 && e->ifindex == ifidx) { spin_lock(& e->lock); tmp___0 = atomic_read((atomic_t const *)(& e->refcnt)); if (tmp___0 != 0) { goto found; } else { } spin_unlock(& e->lock); goto ldv_51737; } else { } e = e->next; ldv_51739: ; if ((unsigned long )e != (unsigned long )((struct l2t_entry *)0)) { goto ldv_51738; } else { } ldv_51737: _raw_read_unlock_bh(& d->lock); return; found: _raw_read_unlock(& d->lock); if ((unsigned long )e->neigh != (unsigned long )neigh) { neigh_replace(e, neigh); } else { } if ((unsigned int )e->state == 2U) { if (((int )neigh->nud_state & 32) != 0) { arpq = e->arpq_head; tmp___2 = (struct sk_buff *)0; e->arpq_tail = tmp___2; e->arpq_head = tmp___2; } else if (((int )neigh->nud_state & 198) != 0 && (unsigned long )e->arpq_head != (unsigned long )((struct sk_buff *)0)) { write_l2e(adap, e, 1); } else { } } else { e->state = ((int )neigh->nud_state & 194) == 0; tmp___3 = memcmp((void const *)(& e->dmac), (void const *)(& neigh->ha), 6UL); if (tmp___3 != 0) { write_l2e(adap, e, 0); } else { } } spin_unlock_bh(& e->lock); if ((unsigned long )arpq != (unsigned long )((struct sk_buff *)0)) { handle_failed_resolution(adap, arpq); } else { } return; } } struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *d ) { struct l2t_entry *e ; { _raw_write_lock_bh(& d->lock); e = alloc_l2e(d); if ((unsigned long )e != (unsigned long )((struct l2t_entry *)0)) { spin_lock(& e->lock); e->state = 4U; atomic_set(& e->refcnt, 1); spin_unlock(& e->lock); } else { } _raw_write_unlock_bh(& d->lock); return (e); } } int t4_l2t_set_switching(struct adapter *adap , struct l2t_entry *e , u16 vlan , u8 port , u8 *eth_addr ) { int tmp ; { e->vlan = vlan; e->lport = port; memcpy((void *)(& e->dmac), (void const *)eth_addr, 6UL); tmp = write_l2e(adap, e, 0); return (tmp); } } struct l2t_data *t4_init_l2t(void) { int i ; struct l2t_data *d ; void *tmp ; struct lock_class_key __key ; struct lock_class_key __key___0 ; { tmp = t4_alloc_mem(622680UL); d = (struct l2t_data *)tmp; if ((unsigned long )d == (unsigned long )((struct l2t_data *)0)) { return ((struct l2t_data *)0); } else { } d->rover = (struct l2t_entry *)(& d->l2tab); atomic_set(& d->nfree, 4096); __rwlock_init(& d->lock, "&d->lock", & __key); i = 0; goto ldv_51759; ldv_51758: d->l2tab[i].idx = (u16 )i; d->l2tab[i].state = 5U; spinlock_check(& d->l2tab[i].lock); __raw_spin_lock_init(& d->l2tab[i].lock.__annonCompField18.rlock, "&(&d->l2tab[i].lock)->rlock", & __key___0); atomic_set(& d->l2tab[i].refcnt, 0); i = i + 1; ldv_51759: ; if (i <= 4095) { goto ldv_51758; } else { } return (d); } } __inline static void *l2t_get_idx(struct seq_file *seq , loff_t pos ) { struct l2t_entry *l2tab ; { l2tab = (struct l2t_entry *)seq->private; return (pos <= 4095LL ? (void *)l2tab + (unsigned long )pos : (void *)0); } } static void *l2t_seq_start(struct seq_file *seq , loff_t *pos ) { void *tmp ; void *tmp___0 ; { if (*pos != 0LL) { tmp = l2t_get_idx(seq, *pos + -1LL); tmp___0 = tmp; } else { tmp___0 = (void *)1; } return (tmp___0); } } static void *l2t_seq_next(struct seq_file *seq , void *v , loff_t *pos ) { { v = l2t_get_idx(seq, *pos); if ((unsigned long )v != (unsigned long )((void *)0)) { *pos = *pos + 1LL; } else { } return (v); } } static void l2t_seq_stop(struct seq_file *seq , void *v ) { { return; } } static char l2e_state(struct l2t_entry const *e ) { { switch ((int )e->state) { case 0: ; return (86); case 1: ; return (83); case 3: ; return (87); case 2: ; return ((unsigned long )e->arpq_head != (unsigned long )((struct sk_buff */* const */)0) ? 65 : 82); case 4: ; return (88); default: ; return (85); } } } static int l2t_seq_show(struct seq_file *seq , void *v ) { char ip[60U] ; struct l2t_entry *e ; int tmp ; char tmp___0 ; unsigned int tmp___1 ; { if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, " Idx IP address Ethernet address VLAN/P LP State Users Port\n"); } else { e = (struct l2t_entry *)v; spin_lock_bh(& e->lock); if ((unsigned int )e->state == 4U) { ip[0] = 0; } else { sprintf((char *)(& ip), (unsigned int )e->v6 != 0U ? "%pI6c" : "%pI4", (u32 *)(& e->addr)); } tmp = atomic_read((atomic_t const *)(& e->refcnt)); tmp___0 = l2e_state((struct l2t_entry const *)e); tmp___1 = vlan_prio((struct l2t_entry const *)e); seq_printf(seq, "%4u %-25s %17pM %4d %u %2u %c %5u %s\n", (int )e->idx, (char *)(& ip), (u8 *)(& e->dmac), (int )e->vlan & 4095, tmp___1, (int )e->lport, (int )tmp___0, tmp, (unsigned long )e->neigh != (unsigned long )((struct neighbour *)0) ? (char *)(& ((e->neigh)->dev)->name) : (char *)""); spin_unlock_bh(& e->lock); } return (0); } } static struct seq_operations const l2t_seq_ops = {& l2t_seq_start, & l2t_seq_stop, & l2t_seq_next, & l2t_seq_show}; static int l2t_seq_open(struct inode *inode , struct file *file ) { int rc ; int tmp ; struct adapter *adap ; struct seq_file *seq ; { tmp = ldv_seq_open_84(file, & l2t_seq_ops); rc = tmp; if (rc == 0) { adap = (struct adapter *)inode->i_private; seq = (struct seq_file *)file->private_data; seq->private = (void *)(& (adap->l2t)->l2tab); } else { } return (rc); } } struct file_operations const t4_l2t_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & l2t_seq_open, 0, & seq_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void *ldv_retval_38 ; void *ldv_retval_37 ; int ldv_retval_8 ; void ldv_seq_operations_45(void) { void *tmp ; { tmp = ldv_init_zalloc(256UL); l2t_seq_ops_group1 = (struct seq_file *)tmp; return; } } void ldv_file_operations_44(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); t4_l2t_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); t4_l2t_fops_group2 = (struct file *)tmp___0; return; } } void ldv_main_exported_45(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_state_variable_45 == 1) { ldv_retval_38 = l2t_seq_start(l2t_seq_ops_group1, l2t_seq_ops_group3); if ((unsigned long )ldv_retval_38 != (unsigned long )((void *)0)) { ldv_state_variable_45 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_38 == (unsigned long )((void *)0)) { ldv_state_variable_45 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51816; case 1: ; if (ldv_state_variable_45 == 3) { l2t_seq_stop(l2t_seq_ops_group1, l2t_seq_ops_group2); ldv_state_variable_45 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_45 == 2) { l2t_seq_stop(l2t_seq_ops_group1, l2t_seq_ops_group2); ldv_state_variable_45 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51816; case 2: ; if (ldv_state_variable_45 == 2) { l2t_seq_show(l2t_seq_ops_group1, (void *)l2t_seq_ops_group3); ldv_state_variable_45 = 2; } else { } goto ldv_51816; case 3: ; if (ldv_state_variable_45 == 2) { ldv_retval_37 = l2t_seq_next(l2t_seq_ops_group1, l2t_seq_ops_group2, l2t_seq_ops_group3); if ((unsigned long )ldv_retval_37 != (unsigned long )((void *)0)) { ldv_state_variable_45 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_37 == (unsigned long )((void *)0)) { ldv_state_variable_45 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51816; default: ldv_stop(); } ldv_51816: ; return; } } void ldv_main_exported_44(void) { loff_t ldvarg50 ; int ldvarg49 ; size_t ldvarg52 ; char *ldvarg53 ; void *tmp ; loff_t *ldvarg51 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg53 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg51 = (loff_t *)tmp___0; ldv_memset((void *)(& ldvarg50), 0, 8UL); ldv_memset((void *)(& ldvarg49), 0, 4UL); ldv_memset((void *)(& ldvarg52), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_44 == 2) { seq_read(t4_l2t_fops_group2, ldvarg53, ldvarg52, ldvarg51); ldv_state_variable_44 = 2; } else { } goto ldv_51830; case 1: ; if (ldv_state_variable_44 == 1) { ldv_retval_8 = l2t_seq_open(t4_l2t_fops_group1, t4_l2t_fops_group2); if (ldv_retval_8 == 0) { ldv_state_variable_44 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51830; case 2: ; if (ldv_state_variable_44 == 2) { ldv_seq_release_85(t4_l2t_fops_group1, t4_l2t_fops_group2); ldv_state_variable_44 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51830; case 3: ; if (ldv_state_variable_44 == 2) { seq_lseek(t4_l2t_fops_group2, ldvarg50, ldvarg49); ldv_state_variable_44 = 2; } else { } goto ldv_51830; default: ldv_stop(); } ldv_51830: ; return; } } bool ldv_queue_work_on_79(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_80(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_81(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_82(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_83(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } int ldv_seq_open_84(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; { tmp = seq_open(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; if (ldv_func_res == 0) { ldv_state_variable_28 = 1; ldv_seq_operations_28(); } else { } return (ldv_func_res); } } int ldv_seq_release_85(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = seq_release(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } extern int __printk_ratelimit(char const * ) ; extern char *strim(char * ) ; bool ldv_queue_work_on_97(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_99(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_98(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_101(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_100(struct workqueue_struct *ldv_func_arg1 ) ; __inline static unsigned long readq(void const volatile *addr ) { unsigned long ret ; { __asm__ volatile ("movq %1,%0": "=r" (ret): "m" (*((unsigned long volatile *)addr)): "memory"); return (ret); } } __inline static void writeq(unsigned long val , void volatile *addr ) { { __asm__ volatile ("movq %0,%1": : "r" (val), "m" (*((unsigned long volatile *)addr)): "memory"); return; } } extern void __udelay(unsigned long ) ; extern void msleep(unsigned int ) ; extern int pci_find_capability(struct pci_dev * , int ) ; extern int pci_bus_read_config_word(struct pci_bus * , unsigned int , int , u16 * ) ; extern int pci_bus_write_config_word(struct pci_bus * , unsigned int , int , u16 ) ; __inline static int pci_read_config_word(struct pci_dev const *dev , int where , u16 *val ) { int tmp ; { tmp = pci_bus_read_config_word(dev->bus, dev->devfn, where, val); return (tmp); } } __inline static int pci_write_config_word(struct pci_dev const *dev , int where , u16 val ) { int tmp ; { tmp = pci_bus_write_config_word(dev->bus, dev->devfn, where, (int )val); return (tmp); } } extern int pcie_capability_read_word(struct pci_dev * , int , u16 * ) ; extern ssize_t pci_read_vpd(struct pci_dev * , loff_t , size_t , void * ) ; extern ssize_t pci_write_vpd(struct pci_dev * , loff_t , size_t , void const * ) ; __inline static int pci_pcie_cap(struct pci_dev *dev ) { { return ((int )dev->pcie_cap); } } __inline static bool pci_is_pcie(struct pci_dev *dev ) { int tmp ; { tmp = pci_pcie_cap(dev); return (tmp != 0); } } __inline static u16 pci_vpd_lrdt_size(u8 const *lrdt ) { { return ((int )((u16 )*(lrdt + 1UL)) + ((int )((u16 )*(lrdt + 2UL)) << 8U)); } } __inline static u8 pci_vpd_info_field_size(u8 const *info_field ) { { return ((u8 )*(info_field + 2UL)); } } extern int pci_vpd_find_tag(u8 const * , unsigned int , unsigned int , u8 ) ; extern int pci_vpd_find_info_keyword(u8 const * , unsigned int , unsigned int , char const * ) ; extern void *vmalloc(unsigned long ) ; extern void vfree(void const * ) ; __inline static int is_t6(enum chip_type chip ) { { return ((((unsigned int )chip >> 4) & 15U) == 6U); } } __inline static u64 t4_read_reg64(struct adapter *adap , u32 reg_addr ) { unsigned long tmp ; { tmp = readq((void const volatile *)adap->regs + (unsigned long )reg_addr); return ((u64 )tmp); } } __inline static void t4_write_reg64(struct adapter *adap , u32 reg_addr , u64 val ) { { writeq((unsigned long )val, (void volatile *)adap->regs + (unsigned long )reg_addr); return; } } __inline static unsigned int core_ticks_per_usec(struct adapter const *adap ) { { return ((unsigned int )adap->params.vpd.cclk / 1000U); } } int t4_wr_mbox_meat_timeout(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl , bool sleep_ok , int timeout ) ; __inline static int t4_wr_mbox_timeout(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl , int timeout ) { int tmp ; { tmp = t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, 1, timeout); return (tmp); } } __inline static int t4_wr_mbox_ns(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl ) { int tmp ; { tmp = t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, 0); return (tmp); } } void t4_read_indirect(struct adapter *adap , unsigned int addr_reg , unsigned int data_reg , u32 *vals , unsigned int nregs , unsigned int start_idx ) ; void t4_hw_pci_read_cfg4(struct adapter *adap , int reg , u32 *val ) ; int t4_restart_aneg(struct adapter *adap , unsigned int mbox , unsigned int port ) ; unsigned int t4_get_regs_len(struct adapter *adapter ) ; void t4_get_regs(struct adapter *adap , void *buf , size_t buf_size ) ; int t4_seeprom_wp(struct adapter *adapter , bool enable ) ; int t4_read_flash(struct adapter *adapter , unsigned int addr , unsigned int nwords , u32 *data , int byte_oriented ) ; int t4_load_fw(struct adapter *adap , u8 const *fw_data , unsigned int size ) ; int t4_fwcache(struct adapter *adap , enum fw_params_param_dev_fwcache op ) ; int t4_fw_upgrade(struct adapter *adap , unsigned int mbox , u8 const *fw_data , unsigned int size , int force ) ; int t4_get_exprom_version(struct adapter *adap , u32 *vers ) ; int t4_filter_field_shift(struct adapter const *adap , int filter_sel ) ; int t4_read_rss(struct adapter *adapter , u16 *map ) ; void t4_read_rss_key(struct adapter *adap , u32 *key ) ; void t4_write_rss_key(struct adapter *adap , u32 const *key , int idx ) ; void t4_read_rss_pf_config(struct adapter *adapter , unsigned int index , u32 *valp ) ; void t4_read_rss_vf_config(struct adapter *adapter , unsigned int index , u32 *vfl , u32 *vfh ) ; u32 t4_read_rss_pf_map(struct adapter *adapter ) ; u32 t4_read_rss_pf_mask(struct adapter *adapter ) ; void t4_pmtx_get_stats(struct adapter *adap , u32 *cnt , u64 *cycles ) ; void t4_pmrx_get_stats(struct adapter *adap , u32 *cnt , u64 *cycles ) ; int t4_read_cim_ibq(struct adapter *adap , unsigned int qid , u32 *data , size_t n ) ; int t4_read_cim_obq(struct adapter *adap , unsigned int qid , u32 *data , size_t n ) ; int t4_cim_read(struct adapter *adap , unsigned int addr , unsigned int n , unsigned int *valp ) ; int t4_cim_write(struct adapter *adap , unsigned int addr , unsigned int n , unsigned int const *valp ) ; int t4_cim_read_la(struct adapter *adap , u32 *la_buf , unsigned int *wrptr ) ; void t4_cim_read_pif_la(struct adapter *adap , u32 *pif_req , u32 *pif_rsp , unsigned int *pif_req_wrptr , unsigned int *pif_rsp_wrptr ) ; void t4_cim_read_ma_la(struct adapter *adap , u32 *ma_req , u32 *ma_rsp ) ; void t4_read_cimq_cfg(struct adapter *adap , u16 *base , u16 *size , u16 *thres ) ; void t4_get_port_stats(struct adapter *adap , int idx , struct port_stats *p ) ; void t4_get_lb_stats(struct adapter *adap , int idx , struct lb_port_stats *p ) ; void t4_read_cong_tbl(struct adapter *adap , u16 (*incr)[32] ) ; void t4_tp_read_la(struct adapter *adap , u64 *la_buf , unsigned int *wrptr ) ; void t4_tp_get_err_stats(struct adapter *adap , struct tp_err_stats *st ) ; void t4_tp_get_cpl_stats(struct adapter *adap , struct tp_cpl_stats *st ) ; void t4_tp_get_rdma_stats(struct adapter *adap , struct tp_rdma_stats *st ) ; void t4_get_usm_stats(struct adapter *adap , struct tp_usm_stats *st ) ; void t4_get_fcoe_stats(struct adapter *adap , unsigned int idx , struct tp_fcoe_stats *st ) ; void t4_ulprx_read_la(struct adapter *adap , u32 *la_buf ) ; void t4_get_chan_txrate(struct adapter *adap , u64 *nic_rate , u64 *ofld_rate ) ; int t4_query_params_rw(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 *val , int rw ) ; int t4_identify_port(struct adapter *adap , unsigned int mbox , unsigned int viid , unsigned int nblinks ) ; int t4_iq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int iqtype , unsigned int iqid , unsigned int fl0id , unsigned int fl1id ) ; int t4_eth_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) ; int t4_ctrl_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) ; int t4_ofld_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) ; int t4_fwaddrspace_write(struct adapter *adap , unsigned int mbox , u32 addr , u32 val ) ; void t4_sge_decode_idma_state(struct adapter *adapter , int state ) ; void t4_idma_monitor_init(struct adapter *adapter , struct sge_idma_monitor_state *idma ) ; void t4_idma_monitor(struct adapter *adapter , struct sge_idma_monitor_state *idma , int hz , int ticks ) ; static int t4_wait_op_done_val(struct adapter *adapter , int reg , u32 mask , int polarity , int attempts , int delay , u32 *valp ) { u32 val ; u32 tmp ; { ldv_49580: tmp = t4_read_reg(adapter, (u32 )reg); val = tmp; if (((val & mask) != 0U) == polarity) { if ((unsigned long )valp != (unsigned long )((u32 *)0U)) { *valp = val; } else { } return (0); } else { } attempts = attempts - 1; if (attempts == 0) { return (-11); } else { } if (delay != 0) { __udelay((unsigned long )delay); } else { } goto ldv_49580; } } __inline static int t4_wait_op_done(struct adapter *adapter , int reg , u32 mask , int polarity , int attempts , int delay ) { int tmp ; { tmp = t4_wait_op_done_val(adapter, reg, mask, polarity, attempts, delay, (u32 *)0U); return (tmp); } } void t4_set_reg_field(struct adapter *adapter , unsigned int addr , u32 mask , u32 val ) { u32 v ; u32 tmp ; { tmp = t4_read_reg(adapter, addr); v = tmp & ~ mask; t4_write_reg(adapter, addr, v | val); t4_read_reg(adapter, addr); return; } } void t4_read_indirect(struct adapter *adap , unsigned int addr_reg , unsigned int data_reg , u32 *vals , unsigned int nregs , unsigned int start_idx ) { u32 *tmp ; unsigned int tmp___0 ; { goto ldv_49605; ldv_49604: t4_write_reg(adap, addr_reg, start_idx); tmp = vals; vals = vals + 1; *tmp = t4_read_reg(adap, data_reg); start_idx = start_idx + 1U; ldv_49605: tmp___0 = nregs; nregs = nregs - 1U; if (tmp___0 != 0U) { goto ldv_49604; } else { } return; } } void t4_write_indirect(struct adapter *adap , unsigned int addr_reg , unsigned int data_reg , u32 const *vals , unsigned int nregs , unsigned int start_idx ) { unsigned int tmp ; u32 const *tmp___0 ; unsigned int tmp___1 ; { goto ldv_49616; ldv_49615: tmp = start_idx; start_idx = start_idx + 1U; t4_write_reg(adap, addr_reg, tmp); tmp___0 = vals; vals = vals + 1; t4_write_reg(adap, data_reg, *tmp___0); ldv_49616: tmp___1 = nregs; nregs = nregs - 1U; if (tmp___1 != 0U) { goto ldv_49615; } else { } return; } } void t4_hw_pci_read_cfg4(struct adapter *adap , int reg , u32 *val ) { u32 req ; int tmp ; { req = (adap->pf << 12) | (unsigned int )reg; if ((((unsigned int )adap->params.chip >> 4) & 15U) <= 5U) { req = req | 1073741824U; } else { req = req | 2147483648U; } tmp = is_t4(adap->params.chip); if (tmp != 0) { req = req | 268435456U; } else { } t4_write_reg(adap, 12384U, req); *val = t4_read_reg(adap, 12388U); t4_write_reg(adap, 12384U, 0U); return; } } static void t4_report_fw_error(struct adapter *adap ) { char const *reason[8U] ; u32 pcie_fw ; { reason[0] = "Crash"; reason[1] = "During Device Preparation"; reason[2] = "During Device Configuration"; reason[3] = "During Device Initialization"; reason[4] = "Unexpected Event"; reason[5] = "Insufficient Airflow"; reason[6] = "Device Shutdown"; reason[7] = "Reserved"; pcie_fw = t4_read_reg(adap, 12472U); if ((int )pcie_fw < 0) { dev_err((struct device const *)adap->pdev_dev, "Firmware reports adapter error: %s\n", reason[(pcie_fw >> 24) & 7U]); } else { } return; } } static void get_mbox_rpl(struct adapter *adap , __be64 *rpl , int nflit , u32 mbox_addr ) { __be64 *tmp ; u64 tmp___0 ; __u64 tmp___1 ; { goto ldv_49636; ldv_49635: tmp = rpl; rpl = rpl + 1; tmp___0 = t4_read_reg64(adap, mbox_addr); tmp___1 = __fswab64(tmp___0); *tmp = tmp___1; nflit = nflit - 1; mbox_addr = mbox_addr + 8U; ldv_49636: ; if (nflit != 0) { goto ldv_49635; } else { } return; } } static void fw_asrt(struct adapter *adap , u32 mbox_addr ) { struct fw_debug_cmd asrt ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; { get_mbox_rpl(adap, (__be64 *)(& asrt), 6, mbox_addr); tmp = __fswab32(asrt.u.assert.y); tmp___0 = __fswab32(asrt.u.assert.x); tmp___1 = __fswab32(asrt.u.assert.line); dev_alert((struct device const *)adap->pdev_dev, "FW assertion at %.16s:%u, val0 %#x, val1 %#x\n", (u8 *)(& asrt.u.assert.filename_0_7), tmp___1, tmp___0, tmp); return; } } static void dump_mbox(struct adapter *adap , int mbox , u32 data_reg ) { u64 tmp ; u64 tmp___0 ; u64 tmp___1 ; u64 tmp___2 ; u64 tmp___3 ; u64 tmp___4 ; u64 tmp___5 ; u64 tmp___6 ; { tmp = t4_read_reg64(adap, data_reg + 56U); tmp___0 = t4_read_reg64(adap, data_reg + 48U); tmp___1 = t4_read_reg64(adap, data_reg + 40U); tmp___2 = t4_read_reg64(adap, data_reg + 32U); tmp___3 = t4_read_reg64(adap, data_reg + 24U); tmp___4 = t4_read_reg64(adap, data_reg + 16U); tmp___5 = t4_read_reg64(adap, data_reg + 8U); tmp___6 = t4_read_reg64(adap, data_reg); dev_err((struct device const *)adap->pdev_dev, "mbox %d: %llx %llx %llx %llx %llx %llx %llx %llx\n", mbox, tmp___6, tmp___5, tmp___4, tmp___3, tmp___2, tmp___1, tmp___0, tmp); return; } } int t4_wr_mbox_meat_timeout(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl , bool sleep_ok , int timeout ) { int delay[10U] ; u32 v ; u64 res ; int i ; int ms ; int delay_idx ; __be64 const *p ; u32 data_reg ; u32 ctl_reg ; u32 tmp ; u32 tmp___0 ; __be64 const *tmp___1 ; __u64 tmp___2 ; unsigned long __ms ; unsigned long tmp___3 ; { delay[0] = 1; delay[1] = 1; delay[2] = 3; delay[3] = 5; delay[4] = 10; delay[5] = 10; delay[6] = 20; delay[7] = 50; delay[8] = 100; delay[9] = 200; p = (__be64 const *)cmd; data_reg = (u32 )((mbox + 120) * 1024 + 576); ctl_reg = (u32 )((mbox + 120) * 1024 + 640); if ((size & 15) != 0 || size > 64) { return (-22); } else { } if ((adap->pdev)->error_state != 1U) { return (-5); } else { } tmp = t4_read_reg(adap, ctl_reg); v = tmp & 3U; i = 0; goto ldv_49667; ldv_49666: tmp___0 = t4_read_reg(adap, ctl_reg); v = tmp___0 & 3U; i = i + 1; ldv_49667: ; if (v == 0U && i <= 2) { goto ldv_49666; } else { } if (v != 2U) { return (v != 0U ? -16 : -110); } else { } i = 0; goto ldv_49670; ldv_49669: tmp___1 = p; p = p + 1; tmp___2 = __fswab64(*tmp___1); t4_write_reg64(adap, data_reg + (u32 )i, tmp___2); i = i + 8; ldv_49670: ; if (i < size) { goto ldv_49669; } else { } t4_write_reg(adap, ctl_reg, 9U); t4_read_reg(adap, ctl_reg); delay_idx = 0; ms = delay[0]; i = 0; goto ldv_49680; ldv_49679: ; if ((int )sleep_ok) { ms = delay[delay_idx]; if ((unsigned int )delay_idx <= 8U) { delay_idx = delay_idx + 1; } else { } msleep((unsigned int )ms); } else { __ms = (unsigned long )ms; goto ldv_49676; ldv_49675: __const_udelay(4295000UL); ldv_49676: tmp___3 = __ms; __ms = __ms - 1UL; if (tmp___3 != 0UL) { goto ldv_49675; } else { } } v = t4_read_reg(adap, ctl_reg); if ((v & 3U) == 2U) { if ((v & 8U) == 0U) { t4_write_reg(adap, ctl_reg, 0U); goto ldv_49678; } else { } res = t4_read_reg64(adap, data_reg); if (res >> 56ULL == 129ULL) { fw_asrt(adap, data_reg); res = 1280ULL; } else if ((unsigned long )rpl != (unsigned long )((void *)0)) { get_mbox_rpl(adap, (__be64 *)rpl, size / 8, data_reg); } else { } if ((((int )res >> 8) & 255) != 0) { dump_mbox(adap, mbox, data_reg); } else { } t4_write_reg(adap, ctl_reg, 0U); return (- (((int )res >> 8) & 255)); } else { } ldv_49678: i = i + ms; ldv_49680: ; if (i < timeout) { goto ldv_49679; } else { } dump_mbox(adap, mbox, data_reg); dev_err((struct device const *)adap->pdev_dev, "command %#x in mailbox %d timed out\n", (int )*((u8 const *)cmd), mbox); t4_report_fw_error(adap); return (-110); } } int t4_wr_mbox_meat(struct adapter *adap , int mbox , void const *cmd , int size , void *rpl , bool sleep_ok ) { int tmp ; { tmp = t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, (int )sleep_ok, 10000); return (tmp); } } int t4_memory_rw(struct adapter *adap , int win , int mtype , u32 addr , u32 len , void *hbuf , int dir ) { u32 pos ; u32 offset ; u32 resid ; u32 memoffset ; u32 edc_size ; u32 mc_size ; u32 win_pf ; u32 mem_reg ; u32 mem_aperture ; u32 mem_base ; u32 *buf ; u32 tmp ; u32 tmp___0 ; int tmp___1 ; int tmp___2 ; u32 *tmp___3 ; u32 *tmp___4 ; union __anonunion_last_336 last ; unsigned char *bp ; int i ; { if ((addr & 3U) != 0U || ((unsigned long )hbuf & 3UL) != 0UL) { return (-22); } else { } buf = (u32 *)hbuf; resid = len & 3U; len = len - resid; tmp = t4_read_reg(adap, 30656U); edc_size = tmp & 4095U; if (mtype != 3) { memoffset = (edc_size * (u32 )mtype) * 1048576U; } else { tmp___0 = t4_read_reg(adap, 30664U); mc_size = tmp___0 & 4095U; memoffset = (edc_size * 2U + mc_size) * 1048576U; } addr = addr + memoffset; mem_reg = t4_read_reg(adap, (u32 )((win + 1549) * 8)); mem_aperture = (u32 )(1 << (int )((mem_reg & 255U) + 10U)); mem_base = mem_reg & 4294966272U; tmp___1 = is_t4(adap->params.chip); if (tmp___1 != 0) { mem_base = mem_base - adap->t4_bar0; } else { } tmp___2 = is_t4(adap->params.chip); win_pf = tmp___2 == 0 ? adap->pf : 0U; pos = - mem_aperture & addr; offset = addr - pos; t4_write_reg(adap, (u32 )(win * 8 + 12396), pos | win_pf); t4_read_reg(adap, (u32 )(win * 8 + 12396)); goto ldv_49711; ldv_49710: ; if (dir == 1) { tmp___3 = buf; buf = buf + 1; *tmp___3 = t4_read_reg(adap, mem_base + offset); } else { tmp___4 = buf; buf = buf + 1; t4_write_reg(adap, mem_base + offset, *tmp___4); } offset = offset + 4U; len = len - 4U; if (offset == mem_aperture) { pos = pos + mem_aperture; offset = 0U; t4_write_reg(adap, (u32 )(win * 8 + 12396), pos | win_pf); t4_read_reg(adap, (u32 )(win * 8 + 12396)); } else { } ldv_49711: ; if (len != 0U) { goto ldv_49710; } else { } if (resid != 0U) { if (dir == 1) { last.word = t4_read_reg(adap, mem_base + offset); bp = (unsigned char *)buf; i = (int )resid; goto ldv_49720; ldv_49719: *(bp + (unsigned long )i) = (unsigned char )last.byte[i]; i = i + 1; ldv_49720: ; if (i <= 3) { goto ldv_49719; } else { } } else { last.word = *buf; i = (int )resid; goto ldv_49723; ldv_49722: last.byte[i] = 0; i = i + 1; ldv_49723: ; if (i <= 3) { goto ldv_49722; } else { } t4_write_reg(adap, mem_base + offset, last.word); } } else { } return (0); } } u32 t4_read_pcie_cfg4(struct adapter *adap , int reg ) { u32 val ; u32 ldst_addrspace ; struct fw_ldst_cmd ldst_cmd ; int ret ; __u32 tmp ; __u32 tmp___0 ; { memset((void *)(& ldst_cmd), 0, 64UL); ldst_addrspace = 41U; tmp = __fswab32(ldst_addrspace | 29360128U); ldst_cmd.op_to_addrspace = tmp; ldst_cmd.cycles_to_len16 = 67108864U; ldst_cmd.u.pcie.select_naccess = 1U; ldst_cmd.u.pcie.ctrl_to_fn = (unsigned int )((u8 )adap->pf) | 16U; ldst_cmd.u.pcie.r = (u8 )reg; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& ldst_cmd), 64, (void *)(& ldst_cmd)); if (ret == 0) { tmp___0 = __fswab32(ldst_cmd.u.pcie.data[0]); val = tmp___0; } else { t4_hw_pci_read_cfg4(adap, reg, & val); } return (val); } } static u32 t4_get_window(struct adapter *adap , u32 pci_base , u64 pci_mask , u32 memwin_base ) { u32 ret ; u32 bar0 ; int tmp ; { tmp = is_t4(adap->params.chip); if (tmp != 0) { bar0 = t4_read_pcie_cfg4(adap, (int )pci_base); bar0 = (u32 )pci_mask & bar0; adap->t4_bar0 = bar0; ret = bar0 + memwin_base; } else { ret = memwin_base; } return (ret); } } u32 t4_get_util_window(struct adapter *adap ) { u32 tmp ; { tmp = t4_get_window(adap, 16U, 0xfffffffffffffff0ULL, 112640U); return (tmp); } } void t4_setup_memwin(struct adapter *adap , u32 memwin_base , u32 window ) { { t4_write_reg(adap, (window + 1549U) * 8U, memwin_base | 1U); t4_read_reg(adap, (window + 1549U) * 8U); return; } } unsigned int t4_get_regs_len(struct adapter *adapter ) { unsigned int chip_version ; { chip_version = ((unsigned int )adapter->params.chip >> 4) & 15U; switch (chip_version) { case 4U: ; return (163840U); case 5U: ; case 6U: ; return (339968U); } dev_err((struct device const *)adapter->pdev_dev, "Unsupported chip version %d\n", chip_version); return (0U); } } void t4_get_regs(struct adapter *adap , void *buf , size_t buf_size ) { unsigned int t4_reg_ranges[438U] ; unsigned int t5_reg_ranges[874U] ; unsigned int t6_reg_ranges[670U] ; u32 *buf_end ; unsigned int const *reg_ranges ; int reg_ranges_size ; int range ; unsigned int chip_version ; unsigned int reg ; unsigned int last_reg ; u32 *bufp ; u32 *tmp ; { t4_reg_ranges[0] = 4104U; t4_reg_ranges[1] = 4360U; t4_reg_ranges[2] = 4480U; t4_reg_ranges[3] = 4532U; t4_reg_ranges[4] = 4604U; t4_reg_ranges[5] = 4668U; t4_reg_ranges[6] = 4864U; t4_reg_ranges[7] = 5948U; t4_reg_ranges[8] = 6144U; t4_reg_ranges[9] = 6396U; t4_reg_ranges[10] = 12288U; t4_reg_ranges[11] = 12380U; t4_reg_ranges[12] = 12392U; t4_reg_ranges[13] = 12504U; t4_reg_ranges[14] = 12512U; t4_reg_ranges[15] = 22820U; t4_reg_ranges[16] = 22880U; t4_reg_ranges[17] = 22996U; t4_reg_ranges[18] = 23040U; t4_reg_ranges[19] = 23288U; t4_reg_ranges[20] = 24576U; t4_reg_ranges[21] = 24728U; t4_reg_ranges[22] = 24832U; t4_reg_ranges[23] = 24912U; t4_reg_ranges[24] = 25088U; t4_reg_ranges[25] = 25096U; t4_reg_ranges[26] = 25152U; t4_reg_ranges[27] = 25160U; t4_reg_ranges[28] = 25216U; t4_reg_ranges[29] = 25400U; t4_reg_ranges[30] = 25456U; t4_reg_ranges[31] = 25484U; t4_reg_ranges[32] = 25600U; t4_reg_ranges[33] = 25660U; t4_reg_ranges[34] = 25856U; t4_reg_ranges[35] = 25892U; t4_reg_ranges[36] = 27136U; t4_reg_ranges[37] = 27192U; t4_reg_ranges[38] = 27232U; t4_reg_ranges[39] = 27256U; t4_reg_ranges[40] = 27392U; t4_reg_ranges[41] = 27524U; t4_reg_ranges[42] = 27632U; t4_reg_ranges[43] = 27780U; t4_reg_ranges[44] = 27888U; t4_reg_ranges[45] = 28036U; t4_reg_ranges[46] = 28144U; t4_reg_ranges[47] = 28292U; t4_reg_ranges[48] = 28400U; t4_reg_ranges[49] = 28548U; t4_reg_ranges[50] = 28656U; t4_reg_ranges[51] = 28804U; t4_reg_ranges[52] = 28912U; t4_reg_ranges[53] = 29060U; t4_reg_ranges[54] = 29168U; t4_reg_ranges[55] = 29316U; t4_reg_ranges[56] = 29424U; t4_reg_ranges[57] = 29572U; t4_reg_ranges[58] = 29680U; t4_reg_ranges[59] = 29776U; t4_reg_ranges[60] = 29952U; t4_reg_ranges[61] = 30000U; t4_reg_ranges[62] = 30208U; t4_reg_ranges[63] = 30236U; t4_reg_ranges[64] = 30336U; t4_reg_ranges[65] = 30412U; t4_reg_ranges[66] = 30464U; t4_reg_ranges[67] = 30616U; t4_reg_ranges[68] = 30656U; t4_reg_ranges[69] = 30716U; t4_reg_ranges[70] = 30976U; t4_reg_ranges[71] = 31228U; t4_reg_ranges[72] = 31488U; t4_reg_ranges[73] = 31800U; t4_reg_ranges[74] = 32000U; t4_reg_ranges[75] = 32508U; t4_reg_ranges[76] = 36288U; t4_reg_ranges[77] = 36380U; t4_reg_ranges[78] = 36400U; t4_reg_ranges[79] = 36472U; t4_reg_ranges[80] = 36512U; t4_reg_ranges[81] = 36716U; t4_reg_ranges[82] = 36800U; t4_reg_ranges[83] = 36980U; t4_reg_ranges[84] = 37116U; t4_reg_ranges[85] = 37116U; t4_reg_ranges[86] = 37888U; t4_reg_ranges[87] = 37976U; t4_reg_ranges[88] = 38400U; t4_reg_ranges[89] = 38588U; t4_reg_ranges[90] = 38912U; t4_reg_ranges[91] = 38920U; t4_reg_ranges[92] = 38944U; t4_reg_ranges[93] = 38972U; t4_reg_ranges[94] = 38992U; t4_reg_ranges[95] = 39012U; t4_reg_ranges[96] = 39936U; t4_reg_ranges[97] = 40044U; t4_reg_ranges[98] = 40064U; t4_reg_ranges[99] = 40172U; t4_reg_ranges[100] = 40192U; t4_reg_ranges[101] = 40300U; t4_reg_ranges[102] = 40320U; t4_reg_ranges[103] = 40428U; t4_reg_ranges[104] = 40448U; t4_reg_ranges[105] = 40556U; t4_reg_ranges[106] = 40576U; t4_reg_ranges[107] = 40684U; t4_reg_ranges[108] = 40704U; t4_reg_ranges[109] = 40812U; t4_reg_ranges[110] = 40832U; t4_reg_ranges[111] = 40940U; t4_reg_ranges[112] = 53252U; t4_reg_ranges[113] = 53308U; t4_reg_ranges[114] = 57280U; t4_reg_ranges[115] = 57312U; t4_reg_ranges[116] = 57344U; t4_reg_ranges[117] = 60028U; t4_reg_ranges[118] = 61440U; t4_reg_ranges[119] = 69904U; t4_reg_ranges[120] = 69912U; t4_reg_ranges[121] = 70032U; t4_reg_ranges[122] = 102464U; t4_reg_ranges[123] = 102508U; t4_reg_ranges[124] = 102520U; t4_reg_ranges[125] = 102528U; t4_reg_ranges[126] = 102540U; t4_reg_ranges[127] = 102692U; t4_reg_ranges[128] = 102736U; t4_reg_ranges[129] = 102832U; t4_reg_ranges[130] = 102864U; t4_reg_ranges[131] = 102888U; t4_reg_ranges[132] = 102968U; t4_reg_ranges[133] = 102988U; t4_reg_ranges[134] = 103416U; t4_reg_ranges[135] = 103540U; t4_reg_ranges[136] = 103568U; t4_reg_ranges[137] = 103672U; t4_reg_ranges[138] = 104448U; t4_reg_ranges[139] = 106316U; t4_reg_ranges[140] = 106496U; t4_reg_ranges[141] = 106604U; t4_reg_ranges[142] = 106672U; t4_reg_ranges[143] = 106784U; t4_reg_ranges[144] = 106792U; t4_reg_ranges[145] = 106808U; t4_reg_ranges[146] = 106896U; t4_reg_ranges[147] = 106948U; t4_reg_ranges[148] = 107004U; t4_reg_ranges[149] = 107004U; t4_reg_ranges[150] = 122944U; t4_reg_ranges[151] = 122956U; t4_reg_ranges[152] = 123524U; t4_reg_ranges[153] = 123532U; t4_reg_ranges[154] = 123584U; t4_reg_ranges[155] = 123584U; t4_reg_ranges[156] = 123616U; t4_reg_ranges[157] = 123616U; t4_reg_ranges[158] = 123648U; t4_reg_ranges[159] = 123780U; t4_reg_ranges[160] = 123840U; t4_reg_ranges[161] = 123848U; t4_reg_ranges[162] = 123968U; t4_reg_ranges[163] = 123980U; t4_reg_ranges[164] = 124548U; t4_reg_ranges[165] = 124556U; t4_reg_ranges[166] = 124608U; t4_reg_ranges[167] = 124608U; t4_reg_ranges[168] = 124640U; t4_reg_ranges[169] = 124640U; t4_reg_ranges[170] = 124672U; t4_reg_ranges[171] = 124804U; t4_reg_ranges[172] = 124864U; t4_reg_ranges[173] = 124872U; t4_reg_ranges[174] = 124992U; t4_reg_ranges[175] = 125004U; t4_reg_ranges[176] = 125572U; t4_reg_ranges[177] = 125580U; t4_reg_ranges[178] = 125632U; t4_reg_ranges[179] = 125632U; t4_reg_ranges[180] = 125664U; t4_reg_ranges[181] = 125664U; t4_reg_ranges[182] = 125696U; t4_reg_ranges[183] = 125828U; t4_reg_ranges[184] = 125888U; t4_reg_ranges[185] = 125896U; t4_reg_ranges[186] = 126016U; t4_reg_ranges[187] = 126028U; t4_reg_ranges[188] = 126596U; t4_reg_ranges[189] = 126604U; t4_reg_ranges[190] = 126656U; t4_reg_ranges[191] = 126656U; t4_reg_ranges[192] = 126688U; t4_reg_ranges[193] = 126688U; t4_reg_ranges[194] = 126720U; t4_reg_ranges[195] = 126852U; t4_reg_ranges[196] = 126912U; t4_reg_ranges[197] = 126920U; t4_reg_ranges[198] = 127040U; t4_reg_ranges[199] = 127052U; t4_reg_ranges[200] = 127620U; t4_reg_ranges[201] = 127628U; t4_reg_ranges[202] = 127680U; t4_reg_ranges[203] = 127680U; t4_reg_ranges[204] = 127712U; t4_reg_ranges[205] = 127712U; t4_reg_ranges[206] = 127744U; t4_reg_ranges[207] = 127876U; t4_reg_ranges[208] = 127936U; t4_reg_ranges[209] = 127944U; t4_reg_ranges[210] = 128064U; t4_reg_ranges[211] = 128076U; t4_reg_ranges[212] = 128644U; t4_reg_ranges[213] = 128652U; t4_reg_ranges[214] = 128704U; t4_reg_ranges[215] = 128704U; t4_reg_ranges[216] = 128736U; t4_reg_ranges[217] = 128736U; t4_reg_ranges[218] = 128768U; t4_reg_ranges[219] = 128900U; t4_reg_ranges[220] = 128960U; t4_reg_ranges[221] = 128968U; t4_reg_ranges[222] = 129088U; t4_reg_ranges[223] = 129100U; t4_reg_ranges[224] = 129668U; t4_reg_ranges[225] = 129676U; t4_reg_ranges[226] = 129728U; t4_reg_ranges[227] = 129728U; t4_reg_ranges[228] = 129760U; t4_reg_ranges[229] = 129760U; t4_reg_ranges[230] = 129792U; t4_reg_ranges[231] = 129924U; t4_reg_ranges[232] = 129984U; t4_reg_ranges[233] = 129992U; t4_reg_ranges[234] = 130112U; t4_reg_ranges[235] = 130124U; t4_reg_ranges[236] = 130692U; t4_reg_ranges[237] = 130700U; t4_reg_ranges[238] = 130752U; t4_reg_ranges[239] = 130752U; t4_reg_ranges[240] = 130784U; t4_reg_ranges[241] = 130784U; t4_reg_ranges[242] = 130816U; t4_reg_ranges[243] = 130948U; t4_reg_ranges[244] = 131008U; t4_reg_ranges[245] = 131016U; t4_reg_ranges[246] = 131072U; t4_reg_ranges[247] = 131116U; t4_reg_ranges[248] = 131328U; t4_reg_ranges[249] = 131388U; t4_reg_ranges[250] = 131472U; t4_reg_ranges[251] = 131528U; t4_reg_ranges[252] = 131584U; t4_reg_ranges[253] = 131864U; t4_reg_ranges[254] = 132096U; t4_reg_ranges[255] = 132392U; t4_reg_ranges[256] = 132416U; t4_reg_ranges[257] = 132628U; t4_reg_ranges[258] = 135168U; t4_reg_ranges[259] = 135232U; t4_reg_ranges[260] = 135244U; t4_reg_ranges[261] = 135264U; t4_reg_ranges[262] = 135360U; t4_reg_ranges[263] = 135404U; t4_reg_ranges[264] = 135680U; t4_reg_ranges[265] = 135784U; t4_reg_ranges[266] = 135792U; t4_reg_ranges[267] = 135812U; t4_reg_ranges[268] = 135932U; t4_reg_ranges[269] = 136072U; t4_reg_ranges[270] = 136192U; t4_reg_ranges[271] = 136196U; t4_reg_ranges[272] = 136448U; t4_reg_ranges[273] = 136472U; t4_reg_ranges[274] = 136492U; t4_reg_ranges[275] = 136508U; t4_reg_ranges[276] = 136528U; t4_reg_ranges[277] = 136532U; t4_reg_ranges[278] = 136704U; t4_reg_ranges[279] = 136704U; t4_reg_ranges[280] = 136712U; t4_reg_ranges[281] = 136744U; t4_reg_ranges[282] = 136752U; t4_reg_ranges[283] = 136764U; t4_reg_ranges[284] = 136960U; t4_reg_ranges[285] = 136988U; t4_reg_ranges[286] = 137088U; t4_reg_ranges[287] = 137100U; t4_reg_ranges[288] = 137216U; t4_reg_ranges[289] = 138296U; t4_reg_ranges[290] = 138368U; t4_reg_ranges[291] = 138620U; t4_reg_ranges[292] = 138752U; t4_reg_ranges[293] = 138756U; t4_reg_ranges[294] = 139264U; t4_reg_ranges[295] = 139308U; t4_reg_ranges[296] = 139520U; t4_reg_ranges[297] = 139580U; t4_reg_ranges[298] = 139664U; t4_reg_ranges[299] = 139720U; t4_reg_ranges[300] = 139776U; t4_reg_ranges[301] = 140056U; t4_reg_ranges[302] = 140288U; t4_reg_ranges[303] = 140584U; t4_reg_ranges[304] = 140608U; t4_reg_ranges[305] = 140820U; t4_reg_ranges[306] = 143360U; t4_reg_ranges[307] = 143424U; t4_reg_ranges[308] = 143436U; t4_reg_ranges[309] = 143456U; t4_reg_ranges[310] = 143552U; t4_reg_ranges[311] = 143596U; t4_reg_ranges[312] = 143872U; t4_reg_ranges[313] = 143976U; t4_reg_ranges[314] = 143984U; t4_reg_ranges[315] = 144004U; t4_reg_ranges[316] = 144124U; t4_reg_ranges[317] = 144264U; t4_reg_ranges[318] = 144384U; t4_reg_ranges[319] = 144388U; t4_reg_ranges[320] = 144640U; t4_reg_ranges[321] = 144664U; t4_reg_ranges[322] = 144684U; t4_reg_ranges[323] = 144700U; t4_reg_ranges[324] = 144720U; t4_reg_ranges[325] = 144724U; t4_reg_ranges[326] = 144896U; t4_reg_ranges[327] = 144896U; t4_reg_ranges[328] = 144904U; t4_reg_ranges[329] = 144936U; t4_reg_ranges[330] = 144944U; t4_reg_ranges[331] = 144956U; t4_reg_ranges[332] = 145152U; t4_reg_ranges[333] = 145180U; t4_reg_ranges[334] = 145280U; t4_reg_ranges[335] = 145292U; t4_reg_ranges[336] = 145408U; t4_reg_ranges[337] = 146488U; t4_reg_ranges[338] = 146560U; t4_reg_ranges[339] = 146812U; t4_reg_ranges[340] = 146944U; t4_reg_ranges[341] = 146948U; t4_reg_ranges[342] = 147456U; t4_reg_ranges[343] = 147500U; t4_reg_ranges[344] = 147712U; t4_reg_ranges[345] = 147772U; t4_reg_ranges[346] = 147856U; t4_reg_ranges[347] = 147912U; t4_reg_ranges[348] = 147968U; t4_reg_ranges[349] = 148248U; t4_reg_ranges[350] = 148480U; t4_reg_ranges[351] = 148776U; t4_reg_ranges[352] = 148800U; t4_reg_ranges[353] = 149012U; t4_reg_ranges[354] = 151552U; t4_reg_ranges[355] = 151616U; t4_reg_ranges[356] = 151628U; t4_reg_ranges[357] = 151648U; t4_reg_ranges[358] = 151744U; t4_reg_ranges[359] = 151788U; t4_reg_ranges[360] = 152064U; t4_reg_ranges[361] = 152168U; t4_reg_ranges[362] = 152176U; t4_reg_ranges[363] = 152196U; t4_reg_ranges[364] = 152316U; t4_reg_ranges[365] = 152456U; t4_reg_ranges[366] = 152576U; t4_reg_ranges[367] = 152580U; t4_reg_ranges[368] = 152832U; t4_reg_ranges[369] = 152856U; t4_reg_ranges[370] = 152876U; t4_reg_ranges[371] = 152892U; t4_reg_ranges[372] = 152912U; t4_reg_ranges[373] = 152916U; t4_reg_ranges[374] = 153088U; t4_reg_ranges[375] = 153088U; t4_reg_ranges[376] = 153096U; t4_reg_ranges[377] = 153128U; t4_reg_ranges[378] = 153136U; t4_reg_ranges[379] = 153148U; t4_reg_ranges[380] = 153344U; t4_reg_ranges[381] = 153372U; t4_reg_ranges[382] = 153472U; t4_reg_ranges[383] = 153484U; t4_reg_ranges[384] = 153600U; t4_reg_ranges[385] = 154680U; t4_reg_ranges[386] = 154752U; t4_reg_ranges[387] = 155004U; t4_reg_ranges[388] = 155136U; t4_reg_ranges[389] = 155140U; t4_reg_ranges[390] = 155648U; t4_reg_ranges[391] = 155692U; t4_reg_ranges[392] = 155904U; t4_reg_ranges[393] = 155964U; t4_reg_ranges[394] = 156048U; t4_reg_ranges[395] = 156104U; t4_reg_ranges[396] = 156160U; t4_reg_ranges[397] = 156440U; t4_reg_ranges[398] = 156672U; t4_reg_ranges[399] = 156968U; t4_reg_ranges[400] = 156992U; t4_reg_ranges[401] = 157204U; t4_reg_ranges[402] = 159744U; t4_reg_ranges[403] = 159808U; t4_reg_ranges[404] = 159820U; t4_reg_ranges[405] = 159840U; t4_reg_ranges[406] = 159936U; t4_reg_ranges[407] = 159980U; t4_reg_ranges[408] = 160256U; t4_reg_ranges[409] = 160360U; t4_reg_ranges[410] = 160368U; t4_reg_ranges[411] = 160388U; t4_reg_ranges[412] = 160508U; t4_reg_ranges[413] = 160648U; t4_reg_ranges[414] = 160768U; t4_reg_ranges[415] = 160772U; t4_reg_ranges[416] = 161024U; t4_reg_ranges[417] = 161048U; t4_reg_ranges[418] = 161068U; t4_reg_ranges[419] = 161084U; t4_reg_ranges[420] = 161104U; t4_reg_ranges[421] = 161108U; t4_reg_ranges[422] = 161280U; t4_reg_ranges[423] = 161280U; t4_reg_ranges[424] = 161288U; t4_reg_ranges[425] = 161320U; t4_reg_ranges[426] = 161328U; t4_reg_ranges[427] = 161340U; t4_reg_ranges[428] = 161536U; t4_reg_ranges[429] = 161564U; t4_reg_ranges[430] = 161664U; t4_reg_ranges[431] = 161676U; t4_reg_ranges[432] = 161792U; t4_reg_ranges[433] = 162872U; t4_reg_ranges[434] = 162944U; t4_reg_ranges[435] = 163196U; t4_reg_ranges[436] = 163328U; t4_reg_ranges[437] = 163332U; t5_reg_ranges[0] = 4104U; t5_reg_ranges[1] = 4424U; t5_reg_ranges[2] = 4480U; t5_reg_ranges[3] = 4532U; t5_reg_ranges[4] = 4604U; t5_reg_ranges[5] = 4668U; t5_reg_ranges[6] = 4736U; t5_reg_ranges[7] = 5948U; t5_reg_ranges[8] = 6144U; t5_reg_ranges[9] = 6396U; t5_reg_ranges[10] = 12288U; t5_reg_ranges[11] = 12328U; t5_reg_ranges[12] = 12392U; t5_reg_ranges[13] = 12504U; t5_reg_ranges[14] = 12512U; t5_reg_ranges[15] = 12540U; t5_reg_ranges[16] = 12608U; t5_reg_ranges[17] = 13692U; t5_reg_ranges[18] = 13736U; t5_reg_ranges[19] = 13772U; t5_reg_ranges[20] = 13804U; t5_reg_ranges[21] = 13804U; t5_reg_ranges[22] = 13824U; t5_reg_ranges[23] = 22052U; t5_reg_ranges[24] = 22220U; t5_reg_ranges[25] = 22364U; t5_reg_ranges[26] = 22540U; t5_reg_ranges[27] = 22548U; t5_reg_ranges[28] = 22672U; t5_reg_ranges[29] = 22716U; t5_reg_ranges[30] = 22848U; t5_reg_ranges[31] = 23004U; t5_reg_ranges[32] = 23036U; t5_reg_ranges[33] = 23064U; t5_reg_ranges[34] = 23136U; t5_reg_ranges[35] = 23196U; t5_reg_ranges[36] = 23444U; t5_reg_ranges[37] = 23548U; t5_reg_ranges[38] = 24576U; t5_reg_ranges[39] = 24640U; t5_reg_ranges[40] = 24664U; t5_reg_ranges[41] = 24908U; t5_reg_ranges[42] = 30464U; t5_reg_ranges[43] = 30616U; t5_reg_ranges[44] = 30656U; t5_reg_ranges[45] = 30972U; t5_reg_ranges[46] = 31488U; t5_reg_ranges[47] = 31828U; t5_reg_ranges[48] = 32000U; t5_reg_ranges[49] = 32508U; t5_reg_ranges[50] = 36288U; t5_reg_ranges[51] = 36320U; t5_reg_ranges[52] = 36344U; t5_reg_ranges[53] = 36484U; t5_reg_ranges[54] = 36512U; t5_reg_ranges[55] = 36740U; t5_reg_ranges[56] = 36800U; t5_reg_ranges[57] = 37112U; t5_reg_ranges[58] = 37888U; t5_reg_ranges[59] = 38000U; t5_reg_ranges[60] = 38400U; t5_reg_ranges[61] = 38644U; t5_reg_ranges[62] = 38912U; t5_reg_ranges[63] = 38920U; t5_reg_ranges[64] = 38944U; t5_reg_ranges[65] = 38972U; t5_reg_ranges[66] = 38992U; t5_reg_ranges[67] = 39012U; t5_reg_ranges[68] = 39936U; t5_reg_ranges[69] = 40044U; t5_reg_ranges[70] = 40064U; t5_reg_ranges[71] = 40172U; t5_reg_ranges[72] = 40192U; t5_reg_ranges[73] = 40300U; t5_reg_ranges[74] = 40320U; t5_reg_ranges[75] = 40428U; t5_reg_ranges[76] = 40448U; t5_reg_ranges[77] = 40556U; t5_reg_ranges[78] = 40576U; t5_reg_ranges[79] = 40684U; t5_reg_ranges[80] = 40704U; t5_reg_ranges[81] = 40812U; t5_reg_ranges[82] = 40832U; t5_reg_ranges[83] = 40992U; t5_reg_ranges[84] = 53252U; t5_reg_ranges[85] = 53308U; t5_reg_ranges[86] = 57280U; t5_reg_ranges[87] = 57312U; t5_reg_ranges[88] = 57344U; t5_reg_ranges[89] = 69768U; t5_reg_ranges[90] = 69788U; t5_reg_ranges[91] = 69904U; t5_reg_ranges[92] = 69912U; t5_reg_ranges[93] = 70012U; t5_reg_ranges[94] = 70032U; t5_reg_ranges[95] = 70148U; t5_reg_ranges[96] = 102464U; t5_reg_ranges[97] = 102508U; t5_reg_ranges[98] = 102520U; t5_reg_ranges[99] = 102528U; t5_reg_ranges[100] = 102540U; t5_reg_ranges[101] = 102692U; t5_reg_ranges[102] = 102736U; t5_reg_ranges[103] = 102832U; t5_reg_ranges[104] = 102864U; t5_reg_ranges[105] = 102888U; t5_reg_ranges[106] = 102968U; t5_reg_ranges[107] = 103056U; t5_reg_ranges[108] = 103416U; t5_reg_ranges[109] = 103540U; t5_reg_ranges[110] = 103568U; t5_reg_ranges[111] = 103628U; t5_reg_ranges[112] = 103664U; t5_reg_ranges[113] = 103672U; t5_reg_ranges[114] = 105472U; t5_reg_ranges[115] = 105568U; t5_reg_ranges[116] = 105620U; t5_reg_ranges[117] = 106000U; t5_reg_ranges[118] = 106064U; t5_reg_ranges[119] = 106292U; t5_reg_ranges[120] = 106304U; t5_reg_ranges[121] = 106320U; t5_reg_ranges[122] = 106384U; t5_reg_ranges[123] = 106468U; t5_reg_ranges[124] = 106496U; t5_reg_ranges[125] = 106604U; t5_reg_ranges[126] = 106672U; t5_reg_ranges[127] = 106784U; t5_reg_ranges[128] = 106792U; t5_reg_ranges[129] = 106808U; t5_reg_ranges[130] = 106896U; t5_reg_ranges[131] = 106948U; t5_reg_ranges[132] = 107004U; t5_reg_ranges[133] = 107004U; t5_reg_ranges[134] = 122888U; t5_reg_ranges[135] = 122892U; t5_reg_ranges[136] = 122944U; t5_reg_ranges[137] = 122956U; t5_reg_ranges[138] = 123524U; t5_reg_ranges[139] = 123536U; t5_reg_ranges[140] = 123584U; t5_reg_ranges[141] = 123584U; t5_reg_ranges[142] = 123616U; t5_reg_ranges[143] = 123616U; t5_reg_ranges[144] = 123648U; t5_reg_ranges[145] = 123780U; t5_reg_ranges[146] = 123840U; t5_reg_ranges[147] = 123848U; t5_reg_ranges[148] = 123912U; t5_reg_ranges[149] = 123916U; t5_reg_ranges[150] = 123968U; t5_reg_ranges[151] = 123980U; t5_reg_ranges[152] = 124548U; t5_reg_ranges[153] = 124560U; t5_reg_ranges[154] = 124608U; t5_reg_ranges[155] = 124608U; t5_reg_ranges[156] = 124640U; t5_reg_ranges[157] = 124640U; t5_reg_ranges[158] = 124672U; t5_reg_ranges[159] = 124804U; t5_reg_ranges[160] = 124864U; t5_reg_ranges[161] = 124872U; t5_reg_ranges[162] = 124936U; t5_reg_ranges[163] = 124940U; t5_reg_ranges[164] = 124992U; t5_reg_ranges[165] = 125004U; t5_reg_ranges[166] = 125572U; t5_reg_ranges[167] = 125584U; t5_reg_ranges[168] = 125632U; t5_reg_ranges[169] = 125632U; t5_reg_ranges[170] = 125664U; t5_reg_ranges[171] = 125664U; t5_reg_ranges[172] = 125696U; t5_reg_ranges[173] = 125828U; t5_reg_ranges[174] = 125888U; t5_reg_ranges[175] = 125896U; t5_reg_ranges[176] = 125960U; t5_reg_ranges[177] = 125964U; t5_reg_ranges[178] = 126016U; t5_reg_ranges[179] = 126028U; t5_reg_ranges[180] = 126596U; t5_reg_ranges[181] = 126608U; t5_reg_ranges[182] = 126656U; t5_reg_ranges[183] = 126656U; t5_reg_ranges[184] = 126688U; t5_reg_ranges[185] = 126688U; t5_reg_ranges[186] = 126720U; t5_reg_ranges[187] = 126852U; t5_reg_ranges[188] = 126912U; t5_reg_ranges[189] = 126920U; t5_reg_ranges[190] = 126984U; t5_reg_ranges[191] = 126988U; t5_reg_ranges[192] = 127040U; t5_reg_ranges[193] = 127052U; t5_reg_ranges[194] = 127620U; t5_reg_ranges[195] = 127632U; t5_reg_ranges[196] = 127680U; t5_reg_ranges[197] = 127680U; t5_reg_ranges[198] = 127712U; t5_reg_ranges[199] = 127712U; t5_reg_ranges[200] = 127744U; t5_reg_ranges[201] = 127876U; t5_reg_ranges[202] = 127936U; t5_reg_ranges[203] = 127944U; t5_reg_ranges[204] = 128008U; t5_reg_ranges[205] = 128012U; t5_reg_ranges[206] = 128064U; t5_reg_ranges[207] = 128076U; t5_reg_ranges[208] = 128644U; t5_reg_ranges[209] = 128656U; t5_reg_ranges[210] = 128704U; t5_reg_ranges[211] = 128704U; t5_reg_ranges[212] = 128736U; t5_reg_ranges[213] = 128736U; t5_reg_ranges[214] = 128768U; t5_reg_ranges[215] = 128900U; t5_reg_ranges[216] = 128960U; t5_reg_ranges[217] = 128968U; t5_reg_ranges[218] = 129032U; t5_reg_ranges[219] = 129036U; t5_reg_ranges[220] = 129088U; t5_reg_ranges[221] = 129100U; t5_reg_ranges[222] = 129668U; t5_reg_ranges[223] = 129680U; t5_reg_ranges[224] = 129728U; t5_reg_ranges[225] = 129728U; t5_reg_ranges[226] = 129760U; t5_reg_ranges[227] = 129760U; t5_reg_ranges[228] = 129792U; t5_reg_ranges[229] = 129924U; t5_reg_ranges[230] = 129984U; t5_reg_ranges[231] = 129992U; t5_reg_ranges[232] = 130056U; t5_reg_ranges[233] = 130060U; t5_reg_ranges[234] = 130112U; t5_reg_ranges[235] = 130124U; t5_reg_ranges[236] = 130692U; t5_reg_ranges[237] = 130704U; t5_reg_ranges[238] = 130752U; t5_reg_ranges[239] = 130752U; t5_reg_ranges[240] = 130784U; t5_reg_ranges[241] = 130784U; t5_reg_ranges[242] = 130816U; t5_reg_ranges[243] = 130948U; t5_reg_ranges[244] = 131008U; t5_reg_ranges[245] = 131016U; t5_reg_ranges[246] = 196608U; t5_reg_ranges[247] = 196656U; t5_reg_ranges[248] = 196864U; t5_reg_ranges[249] = 196932U; t5_reg_ranges[250] = 197008U; t5_reg_ranges[251] = 197072U; t5_reg_ranges[252] = 197120U; t5_reg_ranges[253] = 197400U; t5_reg_ranges[254] = 197632U; t5_reg_ranges[255] = 197932U; t5_reg_ranges[256] = 197952U; t5_reg_ranges[257] = 198172U; t5_reg_ranges[258] = 198656U; t5_reg_ranges[259] = 198708U; t5_reg_ranges[260] = 198848U; t5_reg_ranges[261] = 198920U; t5_reg_ranges[262] = 198928U; t5_reg_ranges[263] = 199084U; t5_reg_ranges[264] = 199168U; t5_reg_ranges[265] = 199212U; t5_reg_ranges[266] = 199236U; t5_reg_ranges[267] = 199248U; t5_reg_ranges[268] = 199284U; t5_reg_ranges[269] = 199716U; t5_reg_ranges[270] = 199936U; t5_reg_ranges[271] = 199936U; t5_reg_ranges[272] = 199944U; t5_reg_ranges[273] = 199956U; t5_reg_ranges[274] = 199964U; t5_reg_ranges[275] = 199968U; t5_reg_ranges[276] = 199996U; t5_reg_ranges[277] = 200016U; t5_reg_ranges[278] = 201216U; t5_reg_ranges[279] = 201228U; t5_reg_ranges[280] = 201248U; t5_reg_ranges[281] = 201248U; t5_reg_ranges[282] = 201280U; t5_reg_ranges[283] = 201280U; t5_reg_ranges[284] = 202240U; t5_reg_ranges[285] = 202252U; t5_reg_ranges[286] = 203264U; t5_reg_ranges[287] = 203292U; t5_reg_ranges[288] = 204288U; t5_reg_ranges[289] = 204320U; t5_reg_ranges[290] = 204344U; t5_reg_ranges[291] = 204348U; t5_reg_ranges[292] = 204416U; t5_reg_ranges[293] = 204416U; t5_reg_ranges[294] = 204424U; t5_reg_ranges[295] = 204456U; t5_reg_ranges[296] = 204464U; t5_reg_ranges[297] = 204468U; t5_reg_ranges[298] = 204488U; t5_reg_ranges[299] = 204500U; t5_reg_ranges[300] = 204728U; t5_reg_ranges[301] = 204804U; t5_reg_ranges[302] = 205312U; t5_reg_ranges[303] = 205312U; t5_reg_ranges[304] = 205320U; t5_reg_ranges[305] = 205376U; t5_reg_ranges[306] = 205384U; t5_reg_ranges[307] = 205440U; t5_reg_ranges[308] = 205448U; t5_reg_ranges[309] = 205504U; t5_reg_ranges[310] = 205512U; t5_reg_ranges[311] = 205564U; t5_reg_ranges[312] = 206336U; t5_reg_ranges[313] = 206384U; t5_reg_ranges[314] = 207360U; t5_reg_ranges[315] = 207548U; t5_reg_ranges[316] = 207616U; t5_reg_ranges[317] = 207728U; t5_reg_ranges[318] = 208896U; t5_reg_ranges[319] = 208968U; t5_reg_ranges[320] = 208992U; t5_reg_ranges[321] = 209052U; t5_reg_ranges[322] = 209136U; t5_reg_ranges[323] = 209224U; t5_reg_ranges[324] = 209248U; t5_reg_ranges[325] = 209308U; t5_reg_ranges[326] = 209392U; t5_reg_ranges[327] = 209636U; t5_reg_ranges[328] = 209656U; t5_reg_ranges[329] = 209892U; t5_reg_ranges[330] = 209912U; t5_reg_ranges[331] = 209992U; t5_reg_ranges[332] = 210016U; t5_reg_ranges[333] = 210076U; t5_reg_ranges[334] = 210160U; t5_reg_ranges[335] = 210248U; t5_reg_ranges[336] = 210272U; t5_reg_ranges[337] = 210332U; t5_reg_ranges[338] = 210416U; t5_reg_ranges[339] = 210660U; t5_reg_ranges[340] = 210680U; t5_reg_ranges[341] = 210916U; t5_reg_ranges[342] = 210936U; t5_reg_ranges[343] = 210940U; t5_reg_ranges[344] = 210964U; t5_reg_ranges[345] = 210964U; t5_reg_ranges[346] = 210988U; t5_reg_ranges[347] = 210988U; t5_reg_ranges[348] = 211072U; t5_reg_ranges[349] = 211084U; t5_reg_ranges[350] = 211176U; t5_reg_ranges[351] = 211180U; t5_reg_ranges[352] = 211200U; t5_reg_ranges[353] = 211272U; t5_reg_ranges[354] = 211296U; t5_reg_ranges[355] = 211356U; t5_reg_ranges[356] = 211440U; t5_reg_ranges[357] = 211684U; t5_reg_ranges[358] = 211704U; t5_reg_ranges[359] = 211728U; t5_reg_ranges[360] = 211752U; t5_reg_ranges[361] = 211752U; t5_reg_ranges[362] = 211772U; t5_reg_ranges[363] = 211792U; t5_reg_ranges[364] = 211952U; t5_reg_ranges[365] = 211984U; t5_reg_ranges[366] = 212008U; t5_reg_ranges[367] = 212008U; t5_reg_ranges[368] = 212028U; t5_reg_ranges[369] = 212048U; t5_reg_ranges[370] = 212208U; t5_reg_ranges[371] = 212220U; t5_reg_ranges[372] = 212992U; t5_reg_ranges[373] = 213040U; t5_reg_ranges[374] = 213248U; t5_reg_ranges[375] = 213316U; t5_reg_ranges[376] = 213392U; t5_reg_ranges[377] = 213456U; t5_reg_ranges[378] = 213504U; t5_reg_ranges[379] = 213784U; t5_reg_ranges[380] = 214016U; t5_reg_ranges[381] = 214316U; t5_reg_ranges[382] = 214336U; t5_reg_ranges[383] = 214556U; t5_reg_ranges[384] = 215040U; t5_reg_ranges[385] = 215092U; t5_reg_ranges[386] = 215232U; t5_reg_ranges[387] = 215304U; t5_reg_ranges[388] = 215312U; t5_reg_ranges[389] = 215468U; t5_reg_ranges[390] = 215552U; t5_reg_ranges[391] = 215596U; t5_reg_ranges[392] = 215620U; t5_reg_ranges[393] = 215632U; t5_reg_ranges[394] = 215668U; t5_reg_ranges[395] = 216100U; t5_reg_ranges[396] = 216320U; t5_reg_ranges[397] = 216320U; t5_reg_ranges[398] = 216328U; t5_reg_ranges[399] = 216340U; t5_reg_ranges[400] = 216348U; t5_reg_ranges[401] = 216352U; t5_reg_ranges[402] = 216380U; t5_reg_ranges[403] = 216400U; t5_reg_ranges[404] = 217600U; t5_reg_ranges[405] = 217612U; t5_reg_ranges[406] = 217632U; t5_reg_ranges[407] = 217632U; t5_reg_ranges[408] = 217664U; t5_reg_ranges[409] = 217664U; t5_reg_ranges[410] = 218624U; t5_reg_ranges[411] = 218636U; t5_reg_ranges[412] = 219648U; t5_reg_ranges[413] = 219676U; t5_reg_ranges[414] = 220672U; t5_reg_ranges[415] = 220704U; t5_reg_ranges[416] = 220728U; t5_reg_ranges[417] = 220732U; t5_reg_ranges[418] = 220800U; t5_reg_ranges[419] = 220800U; t5_reg_ranges[420] = 220808U; t5_reg_ranges[421] = 220840U; t5_reg_ranges[422] = 220848U; t5_reg_ranges[423] = 220852U; t5_reg_ranges[424] = 220872U; t5_reg_ranges[425] = 220884U; t5_reg_ranges[426] = 221112U; t5_reg_ranges[427] = 221188U; t5_reg_ranges[428] = 221696U; t5_reg_ranges[429] = 221696U; t5_reg_ranges[430] = 221704U; t5_reg_ranges[431] = 221760U; t5_reg_ranges[432] = 221768U; t5_reg_ranges[433] = 221824U; t5_reg_ranges[434] = 221832U; t5_reg_ranges[435] = 221888U; t5_reg_ranges[436] = 221896U; t5_reg_ranges[437] = 221948U; t5_reg_ranges[438] = 222720U; t5_reg_ranges[439] = 222768U; t5_reg_ranges[440] = 223744U; t5_reg_ranges[441] = 223932U; t5_reg_ranges[442] = 224000U; t5_reg_ranges[443] = 224112U; t5_reg_ranges[444] = 225280U; t5_reg_ranges[445] = 225352U; t5_reg_ranges[446] = 225376U; t5_reg_ranges[447] = 225436U; t5_reg_ranges[448] = 225520U; t5_reg_ranges[449] = 225608U; t5_reg_ranges[450] = 225632U; t5_reg_ranges[451] = 225692U; t5_reg_ranges[452] = 225776U; t5_reg_ranges[453] = 226020U; t5_reg_ranges[454] = 226040U; t5_reg_ranges[455] = 226276U; t5_reg_ranges[456] = 226296U; t5_reg_ranges[457] = 226376U; t5_reg_ranges[458] = 226400U; t5_reg_ranges[459] = 226460U; t5_reg_ranges[460] = 226544U; t5_reg_ranges[461] = 226632U; t5_reg_ranges[462] = 226656U; t5_reg_ranges[463] = 226716U; t5_reg_ranges[464] = 226800U; t5_reg_ranges[465] = 227044U; t5_reg_ranges[466] = 227064U; t5_reg_ranges[467] = 227300U; t5_reg_ranges[468] = 227320U; t5_reg_ranges[469] = 227324U; t5_reg_ranges[470] = 227348U; t5_reg_ranges[471] = 227348U; t5_reg_ranges[472] = 227372U; t5_reg_ranges[473] = 227372U; t5_reg_ranges[474] = 227456U; t5_reg_ranges[475] = 227468U; t5_reg_ranges[476] = 227560U; t5_reg_ranges[477] = 227564U; t5_reg_ranges[478] = 227584U; t5_reg_ranges[479] = 227656U; t5_reg_ranges[480] = 227680U; t5_reg_ranges[481] = 227740U; t5_reg_ranges[482] = 227824U; t5_reg_ranges[483] = 228068U; t5_reg_ranges[484] = 228088U; t5_reg_ranges[485] = 228112U; t5_reg_ranges[486] = 228136U; t5_reg_ranges[487] = 228136U; t5_reg_ranges[488] = 228156U; t5_reg_ranges[489] = 228176U; t5_reg_ranges[490] = 228336U; t5_reg_ranges[491] = 228368U; t5_reg_ranges[492] = 228392U; t5_reg_ranges[493] = 228392U; t5_reg_ranges[494] = 228412U; t5_reg_ranges[495] = 228432U; t5_reg_ranges[496] = 228592U; t5_reg_ranges[497] = 228604U; t5_reg_ranges[498] = 229376U; t5_reg_ranges[499] = 229424U; t5_reg_ranges[500] = 229632U; t5_reg_ranges[501] = 229700U; t5_reg_ranges[502] = 229776U; t5_reg_ranges[503] = 229840U; t5_reg_ranges[504] = 229888U; t5_reg_ranges[505] = 230168U; t5_reg_ranges[506] = 230400U; t5_reg_ranges[507] = 230700U; t5_reg_ranges[508] = 230720U; t5_reg_ranges[509] = 230940U; t5_reg_ranges[510] = 231424U; t5_reg_ranges[511] = 231476U; t5_reg_ranges[512] = 231616U; t5_reg_ranges[513] = 231688U; t5_reg_ranges[514] = 231696U; t5_reg_ranges[515] = 231852U; t5_reg_ranges[516] = 231936U; t5_reg_ranges[517] = 231980U; t5_reg_ranges[518] = 232004U; t5_reg_ranges[519] = 232016U; t5_reg_ranges[520] = 232052U; t5_reg_ranges[521] = 232484U; t5_reg_ranges[522] = 232704U; t5_reg_ranges[523] = 232704U; t5_reg_ranges[524] = 232712U; t5_reg_ranges[525] = 232724U; t5_reg_ranges[526] = 232732U; t5_reg_ranges[527] = 232736U; t5_reg_ranges[528] = 232764U; t5_reg_ranges[529] = 232784U; t5_reg_ranges[530] = 233984U; t5_reg_ranges[531] = 233996U; t5_reg_ranges[532] = 234016U; t5_reg_ranges[533] = 234016U; t5_reg_ranges[534] = 234048U; t5_reg_ranges[535] = 234048U; t5_reg_ranges[536] = 235008U; t5_reg_ranges[537] = 235020U; t5_reg_ranges[538] = 236032U; t5_reg_ranges[539] = 236060U; t5_reg_ranges[540] = 237056U; t5_reg_ranges[541] = 237088U; t5_reg_ranges[542] = 237112U; t5_reg_ranges[543] = 237116U; t5_reg_ranges[544] = 237184U; t5_reg_ranges[545] = 237184U; t5_reg_ranges[546] = 237192U; t5_reg_ranges[547] = 237224U; t5_reg_ranges[548] = 237232U; t5_reg_ranges[549] = 237236U; t5_reg_ranges[550] = 237256U; t5_reg_ranges[551] = 237268U; t5_reg_ranges[552] = 237496U; t5_reg_ranges[553] = 237572U; t5_reg_ranges[554] = 238080U; t5_reg_ranges[555] = 238080U; t5_reg_ranges[556] = 238088U; t5_reg_ranges[557] = 238144U; t5_reg_ranges[558] = 238152U; t5_reg_ranges[559] = 238208U; t5_reg_ranges[560] = 238216U; t5_reg_ranges[561] = 238272U; t5_reg_ranges[562] = 238280U; t5_reg_ranges[563] = 238332U; t5_reg_ranges[564] = 239104U; t5_reg_ranges[565] = 239152U; t5_reg_ranges[566] = 240128U; t5_reg_ranges[567] = 240316U; t5_reg_ranges[568] = 240384U; t5_reg_ranges[569] = 240496U; t5_reg_ranges[570] = 241664U; t5_reg_ranges[571] = 241736U; t5_reg_ranges[572] = 241760U; t5_reg_ranges[573] = 241820U; t5_reg_ranges[574] = 241904U; t5_reg_ranges[575] = 241992U; t5_reg_ranges[576] = 242016U; t5_reg_ranges[577] = 242076U; t5_reg_ranges[578] = 242160U; t5_reg_ranges[579] = 242404U; t5_reg_ranges[580] = 242424U; t5_reg_ranges[581] = 242660U; t5_reg_ranges[582] = 242680U; t5_reg_ranges[583] = 242760U; t5_reg_ranges[584] = 242784U; t5_reg_ranges[585] = 242844U; t5_reg_ranges[586] = 242928U; t5_reg_ranges[587] = 243016U; t5_reg_ranges[588] = 243040U; t5_reg_ranges[589] = 243100U; t5_reg_ranges[590] = 243184U; t5_reg_ranges[591] = 243428U; t5_reg_ranges[592] = 243448U; t5_reg_ranges[593] = 243684U; t5_reg_ranges[594] = 243704U; t5_reg_ranges[595] = 243708U; t5_reg_ranges[596] = 243732U; t5_reg_ranges[597] = 243732U; t5_reg_ranges[598] = 243756U; t5_reg_ranges[599] = 243756U; t5_reg_ranges[600] = 243840U; t5_reg_ranges[601] = 243852U; t5_reg_ranges[602] = 243944U; t5_reg_ranges[603] = 243948U; t5_reg_ranges[604] = 243968U; t5_reg_ranges[605] = 244040U; t5_reg_ranges[606] = 244064U; t5_reg_ranges[607] = 244124U; t5_reg_ranges[608] = 244208U; t5_reg_ranges[609] = 244452U; t5_reg_ranges[610] = 244472U; t5_reg_ranges[611] = 244496U; t5_reg_ranges[612] = 244520U; t5_reg_ranges[613] = 244520U; t5_reg_ranges[614] = 244540U; t5_reg_ranges[615] = 244560U; t5_reg_ranges[616] = 244720U; t5_reg_ranges[617] = 244752U; t5_reg_ranges[618] = 244776U; t5_reg_ranges[619] = 244776U; t5_reg_ranges[620] = 244796U; t5_reg_ranges[621] = 244816U; t5_reg_ranges[622] = 244976U; t5_reg_ranges[623] = 244988U; t5_reg_ranges[624] = 245760U; t5_reg_ranges[625] = 245808U; t5_reg_ranges[626] = 246016U; t5_reg_ranges[627] = 246084U; t5_reg_ranges[628] = 246160U; t5_reg_ranges[629] = 246224U; t5_reg_ranges[630] = 246272U; t5_reg_ranges[631] = 246552U; t5_reg_ranges[632] = 246784U; t5_reg_ranges[633] = 247084U; t5_reg_ranges[634] = 247104U; t5_reg_ranges[635] = 247324U; t5_reg_ranges[636] = 247808U; t5_reg_ranges[637] = 247860U; t5_reg_ranges[638] = 248000U; t5_reg_ranges[639] = 248072U; t5_reg_ranges[640] = 248080U; t5_reg_ranges[641] = 248236U; t5_reg_ranges[642] = 248320U; t5_reg_ranges[643] = 248364U; t5_reg_ranges[644] = 248388U; t5_reg_ranges[645] = 248400U; t5_reg_ranges[646] = 248436U; t5_reg_ranges[647] = 248868U; t5_reg_ranges[648] = 249088U; t5_reg_ranges[649] = 249088U; t5_reg_ranges[650] = 249096U; t5_reg_ranges[651] = 249108U; t5_reg_ranges[652] = 249116U; t5_reg_ranges[653] = 249120U; t5_reg_ranges[654] = 249148U; t5_reg_ranges[655] = 249168U; t5_reg_ranges[656] = 250368U; t5_reg_ranges[657] = 250380U; t5_reg_ranges[658] = 250400U; t5_reg_ranges[659] = 250400U; t5_reg_ranges[660] = 250432U; t5_reg_ranges[661] = 250432U; t5_reg_ranges[662] = 251392U; t5_reg_ranges[663] = 251404U; t5_reg_ranges[664] = 252416U; t5_reg_ranges[665] = 252444U; t5_reg_ranges[666] = 253440U; t5_reg_ranges[667] = 253472U; t5_reg_ranges[668] = 253496U; t5_reg_ranges[669] = 253500U; t5_reg_ranges[670] = 253568U; t5_reg_ranges[671] = 253568U; t5_reg_ranges[672] = 253576U; t5_reg_ranges[673] = 253608U; t5_reg_ranges[674] = 253616U; t5_reg_ranges[675] = 253620U; t5_reg_ranges[676] = 253640U; t5_reg_ranges[677] = 253652U; t5_reg_ranges[678] = 253880U; t5_reg_ranges[679] = 253956U; t5_reg_ranges[680] = 254464U; t5_reg_ranges[681] = 254464U; t5_reg_ranges[682] = 254472U; t5_reg_ranges[683] = 254528U; t5_reg_ranges[684] = 254536U; t5_reg_ranges[685] = 254592U; t5_reg_ranges[686] = 254600U; t5_reg_ranges[687] = 254656U; t5_reg_ranges[688] = 254664U; t5_reg_ranges[689] = 254716U; t5_reg_ranges[690] = 255488U; t5_reg_ranges[691] = 255536U; t5_reg_ranges[692] = 256512U; t5_reg_ranges[693] = 256700U; t5_reg_ranges[694] = 256768U; t5_reg_ranges[695] = 256880U; t5_reg_ranges[696] = 258048U; t5_reg_ranges[697] = 258120U; t5_reg_ranges[698] = 258144U; t5_reg_ranges[699] = 258204U; t5_reg_ranges[700] = 258288U; t5_reg_ranges[701] = 258376U; t5_reg_ranges[702] = 258400U; t5_reg_ranges[703] = 258460U; t5_reg_ranges[704] = 258544U; t5_reg_ranges[705] = 258788U; t5_reg_ranges[706] = 258808U; t5_reg_ranges[707] = 259044U; t5_reg_ranges[708] = 259064U; t5_reg_ranges[709] = 259144U; t5_reg_ranges[710] = 259168U; t5_reg_ranges[711] = 259228U; t5_reg_ranges[712] = 259312U; t5_reg_ranges[713] = 259400U; t5_reg_ranges[714] = 259424U; t5_reg_ranges[715] = 259484U; t5_reg_ranges[716] = 259568U; t5_reg_ranges[717] = 259812U; t5_reg_ranges[718] = 259832U; t5_reg_ranges[719] = 260068U; t5_reg_ranges[720] = 260088U; t5_reg_ranges[721] = 260092U; t5_reg_ranges[722] = 260116U; t5_reg_ranges[723] = 260116U; t5_reg_ranges[724] = 260140U; t5_reg_ranges[725] = 260140U; t5_reg_ranges[726] = 260224U; t5_reg_ranges[727] = 260236U; t5_reg_ranges[728] = 260328U; t5_reg_ranges[729] = 260332U; t5_reg_ranges[730] = 260352U; t5_reg_ranges[731] = 260424U; t5_reg_ranges[732] = 260448U; t5_reg_ranges[733] = 260508U; t5_reg_ranges[734] = 260592U; t5_reg_ranges[735] = 260836U; t5_reg_ranges[736] = 260856U; t5_reg_ranges[737] = 260880U; t5_reg_ranges[738] = 260904U; t5_reg_ranges[739] = 260904U; t5_reg_ranges[740] = 260924U; t5_reg_ranges[741] = 260944U; t5_reg_ranges[742] = 261104U; t5_reg_ranges[743] = 261136U; t5_reg_ranges[744] = 261160U; t5_reg_ranges[745] = 261160U; t5_reg_ranges[746] = 261180U; t5_reg_ranges[747] = 261200U; t5_reg_ranges[748] = 261360U; t5_reg_ranges[749] = 261372U; t5_reg_ranges[750] = 262144U; t5_reg_ranges[751] = 262156U; t5_reg_ranges[752] = 262208U; t5_reg_ranges[753] = 262248U; t5_reg_ranges[754] = 262268U; t5_reg_ranges[755] = 262468U; t5_reg_ranges[756] = 262528U; t5_reg_ranges[757] = 262540U; t5_reg_ranges[758] = 262656U; t5_reg_ranges[759] = 262808U; t5_reg_ranges[760] = 262828U; t5_reg_ranges[761] = 262972U; t5_reg_ranges[762] = 263160U; t5_reg_ranges[763] = 263164U; t5_reg_ranges[764] = 267012U; t5_reg_ranges[765] = 267204U; t5_reg_ranges[766] = 267264U; t5_reg_ranges[767] = 267292U; t5_reg_ranges[768] = 267392U; t5_reg_ranges[769] = 267472U; t5_reg_ranges[770] = 278528U; t5_reg_ranges[771] = 278648U; t5_reg_ranges[772] = 278720U; t5_reg_ranges[773] = 279160U; t5_reg_ranges[774] = 279232U; t5_reg_ranges[775] = 279672U; t5_reg_ranges[776] = 279744U; t5_reg_ranges[777] = 280184U; t5_reg_ranges[778] = 280256U; t5_reg_ranges[779] = 280696U; t5_reg_ranges[780] = 280768U; t5_reg_ranges[781] = 281084U; t5_reg_ranges[782] = 282624U; t5_reg_ranges[783] = 282728U; t5_reg_ranges[784] = 282752U; t5_reg_ranges[785] = 282756U; t5_reg_ranges[786] = 282784U; t5_reg_ranges[787] = 282800U; t5_reg_ranges[788] = 283136U; t5_reg_ranges[789] = 283240U; t5_reg_ranges[790] = 283264U; t5_reg_ranges[791] = 283268U; t5_reg_ranges[792] = 283296U; t5_reg_ranges[793] = 283312U; t5_reg_ranges[794] = 286912U; t5_reg_ranges[795] = 286948U; t5_reg_ranges[796] = 290816U; t5_reg_ranges[797] = 290956U; t5_reg_ranges[798] = 291328U; t5_reg_ranges[799] = 291408U; t5_reg_ranges[800] = 291840U; t5_reg_ranges[801] = 291872U; t5_reg_ranges[802] = 292352U; t5_reg_ranges[803] = 292376U; t5_reg_ranges[804] = 292864U; t5_reg_ranges[805] = 292884U; t5_reg_ranges[806] = 294912U; t5_reg_ranges[807] = 294924U; t5_reg_ranges[808] = 294976U; t5_reg_ranges[809] = 295016U; t5_reg_ranges[810] = 295036U; t5_reg_ranges[811] = 295236U; t5_reg_ranges[812] = 295296U; t5_reg_ranges[813] = 295308U; t5_reg_ranges[814] = 295424U; t5_reg_ranges[815] = 295576U; t5_reg_ranges[816] = 295596U; t5_reg_ranges[817] = 295740U; t5_reg_ranges[818] = 295928U; t5_reg_ranges[819] = 295932U; t5_reg_ranges[820] = 299780U; t5_reg_ranges[821] = 299972U; t5_reg_ranges[822] = 300032U; t5_reg_ranges[823] = 300060U; t5_reg_ranges[824] = 300160U; t5_reg_ranges[825] = 300240U; t5_reg_ranges[826] = 311296U; t5_reg_ranges[827] = 311416U; t5_reg_ranges[828] = 311488U; t5_reg_ranges[829] = 311928U; t5_reg_ranges[830] = 312000U; t5_reg_ranges[831] = 312440U; t5_reg_ranges[832] = 312512U; t5_reg_ranges[833] = 312952U; t5_reg_ranges[834] = 313024U; t5_reg_ranges[835] = 313464U; t5_reg_ranges[836] = 313536U; t5_reg_ranges[837] = 313852U; t5_reg_ranges[838] = 315392U; t5_reg_ranges[839] = 315496U; t5_reg_ranges[840] = 315520U; t5_reg_ranges[841] = 315524U; t5_reg_ranges[842] = 315552U; t5_reg_ranges[843] = 315568U; t5_reg_ranges[844] = 315904U; t5_reg_ranges[845] = 316008U; t5_reg_ranges[846] = 316032U; t5_reg_ranges[847] = 316036U; t5_reg_ranges[848] = 316064U; t5_reg_ranges[849] = 316080U; t5_reg_ranges[850] = 319680U; t5_reg_ranges[851] = 319716U; t5_reg_ranges[852] = 323584U; t5_reg_ranges[853] = 323724U; t5_reg_ranges[854] = 324096U; t5_reg_ranges[855] = 324176U; t5_reg_ranges[856] = 324608U; t5_reg_ranges[857] = 324640U; t5_reg_ranges[858] = 325120U; t5_reg_ranges[859] = 325144U; t5_reg_ranges[860] = 325632U; t5_reg_ranges[861] = 325652U; t5_reg_ranges[862] = 327680U; t5_reg_ranges[863] = 327884U; t5_reg_ranges[864] = 328704U; t5_reg_ranges[865] = 328704U; t5_reg_ranges[866] = 329728U; t5_reg_ranges[867] = 329932U; t5_reg_ranges[868] = 330752U; t5_reg_ranges[869] = 330752U; t5_reg_ranges[870] = 331776U; t5_reg_ranges[871] = 331804U; t5_reg_ranges[872] = 332544U; t5_reg_ranges[873] = 332552U; t6_reg_ranges[0] = 4104U; t6_reg_ranges[1] = 4428U; t6_reg_ranges[2] = 4480U; t6_reg_ranges[3] = 4532U; t6_reg_ranges[4] = 4604U; t6_reg_ranges[5] = 4688U; t6_reg_ranges[6] = 4736U; t6_reg_ranges[7] = 4924U; t6_reg_ranges[8] = 6144U; t6_reg_ranges[9] = 6396U; t6_reg_ranges[10] = 12288U; t6_reg_ranges[11] = 12332U; t6_reg_ranges[12] = 12384U; t6_reg_ranges[13] = 12504U; t6_reg_ranges[14] = 12512U; t6_reg_ranges[15] = 12540U; t6_reg_ranges[16] = 12608U; t6_reg_ranges[17] = 13692U; t6_reg_ranges[18] = 13736U; t6_reg_ranges[19] = 13772U; t6_reg_ranges[20] = 13804U; t6_reg_ranges[21] = 13804U; t6_reg_ranges[22] = 13824U; t6_reg_ranges[23] = 22052U; t6_reg_ranges[24] = 22220U; t6_reg_ranges[25] = 22364U; t6_reg_ranges[26] = 22540U; t6_reg_ranges[27] = 22548U; t6_reg_ranges[28] = 22672U; t6_reg_ranges[29] = 22716U; t6_reg_ranges[30] = 22848U; t6_reg_ranges[31] = 22876U; t6_reg_ranges[32] = 22912U; t6_reg_ranges[33] = 22924U; t6_reg_ranges[34] = 22960U; t6_reg_ranges[35] = 23004U; t6_reg_ranges[36] = 23036U; t6_reg_ranges[37] = 23064U; t6_reg_ranges[38] = 23136U; t6_reg_ranges[39] = 23148U; t6_reg_ranges[40] = 23168U; t6_reg_ranges[41] = 23196U; t6_reg_ranges[42] = 23444U; t6_reg_ranges[43] = 23548U; t6_reg_ranges[44] = 23568U; t6_reg_ranges[45] = 24256U; t6_reg_ranges[46] = 24264U; t6_reg_ranges[47] = 24264U; t6_reg_ranges[48] = 24576U; t6_reg_ranges[49] = 24640U; t6_reg_ranges[50] = 24664U; t6_reg_ranges[51] = 24916U; t6_reg_ranges[52] = 30464U; t6_reg_ranges[53] = 30616U; t6_reg_ranges[54] = 30656U; t6_reg_ranges[55] = 30848U; t6_reg_ranges[56] = 30924U; t6_reg_ranges[57] = 30972U; t6_reg_ranges[58] = 31488U; t6_reg_ranges[59] = 31828U; t6_reg_ranges[60] = 32000U; t6_reg_ranges[61] = 32508U; t6_reg_ranges[62] = 36288U; t6_reg_ranges[63] = 36320U; t6_reg_ranges[64] = 36344U; t6_reg_ranges[65] = 36484U; t6_reg_ranges[66] = 36512U; t6_reg_ranges[67] = 36744U; t6_reg_ranges[68] = 36792U; t6_reg_ranges[69] = 37148U; t6_reg_ranges[70] = 37888U; t6_reg_ranges[71] = 38000U; t6_reg_ranges[72] = 38400U; t6_reg_ranges[73] = 38684U; t6_reg_ranges[74] = 38912U; t6_reg_ranges[75] = 38920U; t6_reg_ranges[76] = 38944U; t6_reg_ranges[77] = 38972U; t6_reg_ranges[78] = 38992U; t6_reg_ranges[79] = 39012U; t6_reg_ranges[80] = 39936U; t6_reg_ranges[81] = 40044U; t6_reg_ranges[82] = 40064U; t6_reg_ranges[83] = 40172U; t6_reg_ranges[84] = 40192U; t6_reg_ranges[85] = 40300U; t6_reg_ranges[86] = 40320U; t6_reg_ranges[87] = 40428U; t6_reg_ranges[88] = 40448U; t6_reg_ranges[89] = 40556U; t6_reg_ranges[90] = 40576U; t6_reg_ranges[91] = 40684U; t6_reg_ranges[92] = 40704U; t6_reg_ranges[93] = 40812U; t6_reg_ranges[94] = 40832U; t6_reg_ranges[95] = 40992U; t6_reg_ranges[96] = 53252U; t6_reg_ranges[97] = 53308U; t6_reg_ranges[98] = 57280U; t6_reg_ranges[99] = 57312U; t6_reg_ranges[100] = 57344U; t6_reg_ranges[101] = 61448U; t6_reg_ranges[102] = 69632U; t6_reg_ranges[103] = 69652U; t6_reg_ranges[104] = 69704U; t6_reg_ranges[105] = 69904U; t6_reg_ranges[106] = 69912U; t6_reg_ranges[107] = 70012U; t6_reg_ranges[108] = 70032U; t6_reg_ranges[109] = 70240U; t6_reg_ranges[110] = 70400U; t6_reg_ranges[111] = 70412U; t6_reg_ranges[112] = 73728U; t6_reg_ranges[113] = 73820U; t6_reg_ranges[114] = 102464U; t6_reg_ranges[115] = 102508U; t6_reg_ranges[116] = 102520U; t6_reg_ranges[117] = 102528U; t6_reg_ranges[118] = 102540U; t6_reg_ranges[119] = 102692U; t6_reg_ranges[120] = 102736U; t6_reg_ranges[121] = 102832U; t6_reg_ranges[122] = 102864U; t6_reg_ranges[123] = 102888U; t6_reg_ranges[124] = 102968U; t6_reg_ranges[125] = 103096U; t6_reg_ranges[126] = 103416U; t6_reg_ranges[127] = 103540U; t6_reg_ranges[128] = 103568U; t6_reg_ranges[129] = 103628U; t6_reg_ranges[130] = 103664U; t6_reg_ranges[131] = 103672U; t6_reg_ranges[132] = 105472U; t6_reg_ranges[133] = 105600U; t6_reg_ranges[134] = 105620U; t6_reg_ranges[135] = 105660U; t6_reg_ranges[136] = 105700U; t6_reg_ranges[137] = 105768U; t6_reg_ranges[138] = 105808U; t6_reg_ranges[139] = 105848U; t6_reg_ranges[140] = 105876U; t6_reg_ranges[141] = 105928U; t6_reg_ranges[142] = 105968U; t6_reg_ranges[143] = 106000U; t6_reg_ranges[144] = 106064U; t6_reg_ranges[145] = 106092U; t6_reg_ranges[146] = 106144U; t6_reg_ranges[147] = 106292U; t6_reg_ranges[148] = 106304U; t6_reg_ranges[149] = 106320U; t6_reg_ranges[150] = 106384U; t6_reg_ranges[151] = 106412U; t6_reg_ranges[152] = 106436U; t6_reg_ranges[153] = 106468U; t6_reg_ranges[154] = 106496U; t6_reg_ranges[155] = 106604U; t6_reg_ranges[156] = 106672U; t6_reg_ranges[157] = 106784U; t6_reg_ranges[158] = 106792U; t6_reg_ranges[159] = 106808U; t6_reg_ranges[160] = 106896U; t6_reg_ranges[161] = 106948U; t6_reg_ranges[162] = 107004U; t6_reg_ranges[163] = 107004U; t6_reg_ranges[164] = 122888U; t6_reg_ranges[165] = 122892U; t6_reg_ranges[166] = 122944U; t6_reg_ranges[167] = 122956U; t6_reg_ranges[168] = 123524U; t6_reg_ranges[169] = 123536U; t6_reg_ranges[170] = 123584U; t6_reg_ranges[171] = 123584U; t6_reg_ranges[172] = 123616U; t6_reg_ranges[173] = 123616U; t6_reg_ranges[174] = 123648U; t6_reg_ranges[175] = 123780U; t6_reg_ranges[176] = 123840U; t6_reg_ranges[177] = 123848U; t6_reg_ranges[178] = 123912U; t6_reg_ranges[179] = 123916U; t6_reg_ranges[180] = 123968U; t6_reg_ranges[181] = 123980U; t6_reg_ranges[182] = 124548U; t6_reg_ranges[183] = 124560U; t6_reg_ranges[184] = 124608U; t6_reg_ranges[185] = 124608U; t6_reg_ranges[186] = 124640U; t6_reg_ranges[187] = 124640U; t6_reg_ranges[188] = 124672U; t6_reg_ranges[189] = 124804U; t6_reg_ranges[190] = 124864U; t6_reg_ranges[191] = 124872U; t6_reg_ranges[192] = 124936U; t6_reg_ranges[193] = 124940U; t6_reg_ranges[194] = 124992U; t6_reg_ranges[195] = 125004U; t6_reg_ranges[196] = 125572U; t6_reg_ranges[197] = 125584U; t6_reg_ranges[198] = 125632U; t6_reg_ranges[199] = 125632U; t6_reg_ranges[200] = 125664U; t6_reg_ranges[201] = 125664U; t6_reg_ranges[202] = 125696U; t6_reg_ranges[203] = 125828U; t6_reg_ranges[204] = 125888U; t6_reg_ranges[205] = 125896U; t6_reg_ranges[206] = 125960U; t6_reg_ranges[207] = 125964U; t6_reg_ranges[208] = 126016U; t6_reg_ranges[209] = 126028U; t6_reg_ranges[210] = 126596U; t6_reg_ranges[211] = 126608U; t6_reg_ranges[212] = 126656U; t6_reg_ranges[213] = 126656U; t6_reg_ranges[214] = 126688U; t6_reg_ranges[215] = 126688U; t6_reg_ranges[216] = 126720U; t6_reg_ranges[217] = 126852U; t6_reg_ranges[218] = 126912U; t6_reg_ranges[219] = 126920U; t6_reg_ranges[220] = 126984U; t6_reg_ranges[221] = 126988U; t6_reg_ranges[222] = 127040U; t6_reg_ranges[223] = 127052U; t6_reg_ranges[224] = 127620U; t6_reg_ranges[225] = 127632U; t6_reg_ranges[226] = 127680U; t6_reg_ranges[227] = 127680U; t6_reg_ranges[228] = 127712U; t6_reg_ranges[229] = 127712U; t6_reg_ranges[230] = 127744U; t6_reg_ranges[231] = 127876U; t6_reg_ranges[232] = 127936U; t6_reg_ranges[233] = 127944U; t6_reg_ranges[234] = 128008U; t6_reg_ranges[235] = 128012U; t6_reg_ranges[236] = 128064U; t6_reg_ranges[237] = 128076U; t6_reg_ranges[238] = 128644U; t6_reg_ranges[239] = 128656U; t6_reg_ranges[240] = 128704U; t6_reg_ranges[241] = 128704U; t6_reg_ranges[242] = 128736U; t6_reg_ranges[243] = 128736U; t6_reg_ranges[244] = 128768U; t6_reg_ranges[245] = 128900U; t6_reg_ranges[246] = 128960U; t6_reg_ranges[247] = 128968U; t6_reg_ranges[248] = 129032U; t6_reg_ranges[249] = 129036U; t6_reg_ranges[250] = 129088U; t6_reg_ranges[251] = 129100U; t6_reg_ranges[252] = 129668U; t6_reg_ranges[253] = 129680U; t6_reg_ranges[254] = 129728U; t6_reg_ranges[255] = 129728U; t6_reg_ranges[256] = 129760U; t6_reg_ranges[257] = 129760U; t6_reg_ranges[258] = 129792U; t6_reg_ranges[259] = 129924U; t6_reg_ranges[260] = 129984U; t6_reg_ranges[261] = 129992U; t6_reg_ranges[262] = 130056U; t6_reg_ranges[263] = 130060U; t6_reg_ranges[264] = 130112U; t6_reg_ranges[265] = 130124U; t6_reg_ranges[266] = 130692U; t6_reg_ranges[267] = 130704U; t6_reg_ranges[268] = 130752U; t6_reg_ranges[269] = 130752U; t6_reg_ranges[270] = 130784U; t6_reg_ranges[271] = 130784U; t6_reg_ranges[272] = 130816U; t6_reg_ranges[273] = 130948U; t6_reg_ranges[274] = 131008U; t6_reg_ranges[275] = 131016U; t6_reg_ranges[276] = 196608U; t6_reg_ranges[277] = 196720U; t6_reg_ranges[278] = 196864U; t6_reg_ranges[279] = 196956U; t6_reg_ranges[280] = 197008U; t6_reg_ranges[281] = 197072U; t6_reg_ranges[282] = 197120U; t6_reg_ranges[283] = 197400U; t6_reg_ranges[284] = 197632U; t6_reg_ranges[285] = 197932U; t6_reg_ranges[286] = 197952U; t6_reg_ranges[287] = 198172U; t6_reg_ranges[288] = 198656U; t6_reg_ranges[289] = 198796U; t6_reg_ranges[290] = 198848U; t6_reg_ranges[291] = 198920U; t6_reg_ranges[292] = 198928U; t6_reg_ranges[293] = 199096U; t6_reg_ranges[294] = 199168U; t6_reg_ranges[295] = 199172U; t6_reg_ranges[296] = 199180U; t6_reg_ranges[297] = 199212U; t6_reg_ranges[298] = 199236U; t6_reg_ranges[299] = 199248U; t6_reg_ranges[300] = 199284U; t6_reg_ranges[301] = 199716U; t6_reg_ranges[302] = 199936U; t6_reg_ranges[303] = 199996U; t6_reg_ranges[304] = 200004U; t6_reg_ranges[305] = 200060U; t6_reg_ranges[306] = 200160U; t6_reg_ranges[307] = 200160U; t6_reg_ranges[308] = 200192U; t6_reg_ranges[309] = 200404U; t6_reg_ranges[310] = 200448U; t6_reg_ranges[311] = 200612U; t6_reg_ranges[312] = 200640U; t6_reg_ranges[313] = 200644U; t6_reg_ranges[314] = 200704U; t6_reg_ranges[315] = 200708U; t6_reg_ranges[316] = 200832U; t6_reg_ranges[317] = 200956U; t6_reg_ranges[318] = 201224U; t6_reg_ranges[319] = 201248U; t6_reg_ranges[320] = 201276U; t6_reg_ranges[321] = 201300U; t6_reg_ranges[322] = 201472U; t6_reg_ranges[323] = 201472U; t6_reg_ranges[324] = 201480U; t6_reg_ranges[325] = 201500U; t6_reg_ranges[326] = 201528U; t6_reg_ranges[327] = 201532U; t6_reg_ranges[328] = 201600U; t6_reg_ranges[329] = 201600U; t6_reg_ranges[330] = 201608U; t6_reg_ranges[331] = 201640U; t6_reg_ranges[332] = 201652U; t6_reg_ranges[333] = 201652U; t6_reg_ranges[334] = 201728U; t6_reg_ranges[335] = 201760U; t6_reg_ranges[336] = 201784U; t6_reg_ranges[337] = 201788U; t6_reg_ranges[338] = 201856U; t6_reg_ranges[339] = 201856U; t6_reg_ranges[340] = 201896U; t6_reg_ranges[341] = 201896U; t6_reg_ranges[342] = 201904U; t6_reg_ranges[343] = 201908U; t6_reg_ranges[344] = 201928U; t6_reg_ranges[345] = 201940U; t6_reg_ranges[346] = 203328U; t6_reg_ranges[347] = 203340U; t6_reg_ranges[348] = 203504U; t6_reg_ranges[349] = 203552U; t6_reg_ranges[350] = 203576U; t6_reg_ranges[351] = 203580U; t6_reg_ranges[352] = 203648U; t6_reg_ranges[353] = 203648U; t6_reg_ranges[354] = 203688U; t6_reg_ranges[355] = 203688U; t6_reg_ranges[356] = 203696U; t6_reg_ranges[357] = 203700U; t6_reg_ranges[358] = 203720U; t6_reg_ranges[359] = 203732U; t6_reg_ranges[360] = 205120U; t6_reg_ranges[361] = 205196U; t6_reg_ranges[362] = 205296U; t6_reg_ranges[363] = 205312U; t6_reg_ranges[364] = 205336U; t6_reg_ranges[365] = 205336U; t6_reg_ranges[366] = 205824U; t6_reg_ranges[367] = 205824U; t6_reg_ranges[368] = 205832U; t6_reg_ranges[369] = 205852U; t6_reg_ranges[370] = 206360U; t6_reg_ranges[371] = 206368U; t6_reg_ranges[372] = 206436U; t6_reg_ranges[373] = 206436U; t6_reg_ranges[374] = 206504U; t6_reg_ranges[375] = 206504U; t6_reg_ranges[376] = 206572U; t6_reg_ranges[377] = 206572U; t6_reg_ranges[378] = 207360U; t6_reg_ranges[379] = 207548U; t6_reg_ranges[380] = 207616U; t6_reg_ranges[381] = 207736U; t6_reg_ranges[382] = 207872U; t6_reg_ranges[383] = 207872U; t6_reg_ranges[384] = 207880U; t6_reg_ranges[385] = 207932U; t6_reg_ranges[386] = 208384U; t6_reg_ranges[387] = 208428U; t6_reg_ranges[388] = 208640U; t6_reg_ranges[389] = 208684U; t6_reg_ranges[390] = 208896U; t6_reg_ranges[391] = 209068U; t6_reg_ranges[392] = 209088U; t6_reg_ranges[393] = 209324U; t6_reg_ranges[394] = 209344U; t6_reg_ranges[395] = 209604U; t6_reg_ranges[396] = 209636U; t6_reg_ranges[397] = 209860U; t6_reg_ranges[398] = 209892U; t6_reg_ranges[399] = 210092U; t6_reg_ranges[400] = 210112U; t6_reg_ranges[401] = 210348U; t6_reg_ranges[402] = 210368U; t6_reg_ranges[403] = 210628U; t6_reg_ranges[404] = 210660U; t6_reg_ranges[405] = 210884U; t6_reg_ranges[406] = 210916U; t6_reg_ranges[407] = 210940U; t6_reg_ranges[408] = 210964U; t6_reg_ranges[409] = 210964U; t6_reg_ranges[410] = 211028U; t6_reg_ranges[411] = 211048U; t6_reg_ranges[412] = 211072U; t6_reg_ranges[413] = 211084U; t6_reg_ranges[414] = 211136U; t6_reg_ranges[415] = 211152U; t6_reg_ranges[416] = 211176U; t6_reg_ranges[417] = 211180U; t6_reg_ranges[418] = 211200U; t6_reg_ranges[419] = 211372U; t6_reg_ranges[420] = 211392U; t6_reg_ranges[421] = 211652U; t6_reg_ranges[422] = 211684U; t6_reg_ranges[423] = 211728U; t6_reg_ranges[424] = 211748U; t6_reg_ranges[425] = 211792U; t6_reg_ranges[426] = 211952U; t6_reg_ranges[427] = 211984U; t6_reg_ranges[428] = 212004U; t6_reg_ranges[429] = 212048U; t6_reg_ranges[430] = 212208U; t6_reg_ranges[431] = 212220U; t6_reg_ranges[432] = 212992U; t6_reg_ranges[433] = 213104U; t6_reg_ranges[434] = 213248U; t6_reg_ranges[435] = 213340U; t6_reg_ranges[436] = 213392U; t6_reg_ranges[437] = 213456U; t6_reg_ranges[438] = 213504U; t6_reg_ranges[439] = 213784U; t6_reg_ranges[440] = 214016U; t6_reg_ranges[441] = 214316U; t6_reg_ranges[442] = 214336U; t6_reg_ranges[443] = 214556U; t6_reg_ranges[444] = 215040U; t6_reg_ranges[445] = 215180U; t6_reg_ranges[446] = 215232U; t6_reg_ranges[447] = 215304U; t6_reg_ranges[448] = 215312U; t6_reg_ranges[449] = 215480U; t6_reg_ranges[450] = 215552U; t6_reg_ranges[451] = 215556U; t6_reg_ranges[452] = 215564U; t6_reg_ranges[453] = 215596U; t6_reg_ranges[454] = 215620U; t6_reg_ranges[455] = 215632U; t6_reg_ranges[456] = 215668U; t6_reg_ranges[457] = 216100U; t6_reg_ranges[458] = 216320U; t6_reg_ranges[459] = 216380U; t6_reg_ranges[460] = 216388U; t6_reg_ranges[461] = 216444U; t6_reg_ranges[462] = 216544U; t6_reg_ranges[463] = 216544U; t6_reg_ranges[464] = 216576U; t6_reg_ranges[465] = 216788U; t6_reg_ranges[466] = 216832U; t6_reg_ranges[467] = 216996U; t6_reg_ranges[468] = 217024U; t6_reg_ranges[469] = 217028U; t6_reg_ranges[470] = 217088U; t6_reg_ranges[471] = 217092U; t6_reg_ranges[472] = 217216U; t6_reg_ranges[473] = 217340U; t6_reg_ranges[474] = 217608U; t6_reg_ranges[475] = 217632U; t6_reg_ranges[476] = 217660U; t6_reg_ranges[477] = 217684U; t6_reg_ranges[478] = 217856U; t6_reg_ranges[479] = 217856U; t6_reg_ranges[480] = 217864U; t6_reg_ranges[481] = 217884U; t6_reg_ranges[482] = 217912U; t6_reg_ranges[483] = 217916U; t6_reg_ranges[484] = 217984U; t6_reg_ranges[485] = 217984U; t6_reg_ranges[486] = 217992U; t6_reg_ranges[487] = 218024U; t6_reg_ranges[488] = 218036U; t6_reg_ranges[489] = 218036U; t6_reg_ranges[490] = 218112U; t6_reg_ranges[491] = 218144U; t6_reg_ranges[492] = 218168U; t6_reg_ranges[493] = 218172U; t6_reg_ranges[494] = 218240U; t6_reg_ranges[495] = 218240U; t6_reg_ranges[496] = 218280U; t6_reg_ranges[497] = 218280U; t6_reg_ranges[498] = 218288U; t6_reg_ranges[499] = 218292U; t6_reg_ranges[500] = 218312U; t6_reg_ranges[501] = 218324U; t6_reg_ranges[502] = 219712U; t6_reg_ranges[503] = 219724U; t6_reg_ranges[504] = 219888U; t6_reg_ranges[505] = 219936U; t6_reg_ranges[506] = 219960U; t6_reg_ranges[507] = 219964U; t6_reg_ranges[508] = 220032U; t6_reg_ranges[509] = 220032U; t6_reg_ranges[510] = 220072U; t6_reg_ranges[511] = 220072U; t6_reg_ranges[512] = 220080U; t6_reg_ranges[513] = 220084U; t6_reg_ranges[514] = 220104U; t6_reg_ranges[515] = 220116U; t6_reg_ranges[516] = 221504U; t6_reg_ranges[517] = 221580U; t6_reg_ranges[518] = 221680U; t6_reg_ranges[519] = 221696U; t6_reg_ranges[520] = 221720U; t6_reg_ranges[521] = 221720U; t6_reg_ranges[522] = 222208U; t6_reg_ranges[523] = 222208U; t6_reg_ranges[524] = 222216U; t6_reg_ranges[525] = 222236U; t6_reg_ranges[526] = 222744U; t6_reg_ranges[527] = 222752U; t6_reg_ranges[528] = 222820U; t6_reg_ranges[529] = 222820U; t6_reg_ranges[530] = 222888U; t6_reg_ranges[531] = 222888U; t6_reg_ranges[532] = 222956U; t6_reg_ranges[533] = 222956U; t6_reg_ranges[534] = 223744U; t6_reg_ranges[535] = 223932U; t6_reg_ranges[536] = 224000U; t6_reg_ranges[537] = 224120U; t6_reg_ranges[538] = 224256U; t6_reg_ranges[539] = 224256U; t6_reg_ranges[540] = 224264U; t6_reg_ranges[541] = 224316U; t6_reg_ranges[542] = 224768U; t6_reg_ranges[543] = 224812U; t6_reg_ranges[544] = 225024U; t6_reg_ranges[545] = 225068U; t6_reg_ranges[546] = 225280U; t6_reg_ranges[547] = 225452U; t6_reg_ranges[548] = 225472U; t6_reg_ranges[549] = 225708U; t6_reg_ranges[550] = 225728U; t6_reg_ranges[551] = 225988U; t6_reg_ranges[552] = 226020U; t6_reg_ranges[553] = 226244U; t6_reg_ranges[554] = 226276U; t6_reg_ranges[555] = 226476U; t6_reg_ranges[556] = 226496U; t6_reg_ranges[557] = 226732U; t6_reg_ranges[558] = 226752U; t6_reg_ranges[559] = 227012U; t6_reg_ranges[560] = 227044U; t6_reg_ranges[561] = 227268U; t6_reg_ranges[562] = 227300U; t6_reg_ranges[563] = 227324U; t6_reg_ranges[564] = 227348U; t6_reg_ranges[565] = 227348U; t6_reg_ranges[566] = 227412U; t6_reg_ranges[567] = 227432U; t6_reg_ranges[568] = 227456U; t6_reg_ranges[569] = 227468U; t6_reg_ranges[570] = 227520U; t6_reg_ranges[571] = 227536U; t6_reg_ranges[572] = 227560U; t6_reg_ranges[573] = 227564U; t6_reg_ranges[574] = 227584U; t6_reg_ranges[575] = 227756U; t6_reg_ranges[576] = 227776U; t6_reg_ranges[577] = 228036U; t6_reg_ranges[578] = 228068U; t6_reg_ranges[579] = 228112U; t6_reg_ranges[580] = 228132U; t6_reg_ranges[581] = 228176U; t6_reg_ranges[582] = 228336U; t6_reg_ranges[583] = 228368U; t6_reg_ranges[584] = 228388U; t6_reg_ranges[585] = 228432U; t6_reg_ranges[586] = 228592U; t6_reg_ranges[587] = 228604U; t6_reg_ranges[588] = 262208U; t6_reg_ranges[589] = 262208U; t6_reg_ranges[590] = 262272U; t6_reg_ranges[591] = 262276U; t6_reg_ranges[592] = 262400U; t6_reg_ranges[593] = 262400U; t6_reg_ranges[594] = 262464U; t6_reg_ranges[595] = 262588U; t6_reg_ranges[596] = 262656U; t6_reg_ranges[597] = 262676U; t6_reg_ranges[598] = 262696U; t6_reg_ranges[599] = 262696U; t6_reg_ranges[600] = 262720U; t6_reg_ranges[601] = 262744U; t6_reg_ranges[602] = 262784U; t6_reg_ranges[603] = 262784U; t6_reg_ranges[604] = 262916U; t6_reg_ranges[605] = 262916U; t6_reg_ranges[606] = 262960U; t6_reg_ranges[607] = 262972U; t6_reg_ranges[608] = 267012U; t6_reg_ranges[609] = 267228U; t6_reg_ranges[610] = 267264U; t6_reg_ranges[611] = 267292U; t6_reg_ranges[612] = 267392U; t6_reg_ranges[613] = 267472U; t6_reg_ranges[614] = 278528U; t6_reg_ranges[615] = 278652U; t6_reg_ranges[616] = 278720U; t6_reg_ranges[617] = 279164U; t6_reg_ranges[618] = 279232U; t6_reg_ranges[619] = 279676U; t6_reg_ranges[620] = 279744U; t6_reg_ranges[621] = 280188U; t6_reg_ranges[622] = 280256U; t6_reg_ranges[623] = 280700U; t6_reg_ranges[624] = 280768U; t6_reg_ranges[625] = 281212U; t6_reg_ranges[626] = 281280U; t6_reg_ranges[627] = 281724U; t6_reg_ranges[628] = 281792U; t6_reg_ranges[629] = 282236U; t6_reg_ranges[630] = 282304U; t6_reg_ranges[631] = 282748U; t6_reg_ranges[632] = 282816U; t6_reg_ranges[633] = 283132U; t6_reg_ranges[634] = 284672U; t6_reg_ranges[635] = 284776U; t6_reg_ranges[636] = 284800U; t6_reg_ranges[637] = 284804U; t6_reg_ranges[638] = 284832U; t6_reg_ranges[639] = 284848U; t6_reg_ranges[640] = 285184U; t6_reg_ranges[641] = 285288U; t6_reg_ranges[642] = 285312U; t6_reg_ranges[643] = 285316U; t6_reg_ranges[644] = 285344U; t6_reg_ranges[645] = 285360U; t6_reg_ranges[646] = 286912U; t6_reg_ranges[647] = 286948U; t6_reg_ranges[648] = 290816U; t6_reg_ranges[649] = 290956U; t6_reg_ranges[650] = 291328U; t6_reg_ranges[651] = 291408U; t6_reg_ranges[652] = 291840U; t6_reg_ranges[653] = 291872U; t6_reg_ranges[654] = 292352U; t6_reg_ranges[655] = 292376U; t6_reg_ranges[656] = 292864U; t6_reg_ranges[657] = 292908U; t6_reg_ranges[658] = 327680U; t6_reg_ranges[659] = 327884U; t6_reg_ranges[660] = 328704U; t6_reg_ranges[661] = 328704U; t6_reg_ranges[662] = 329728U; t6_reg_ranges[663] = 329932U; t6_reg_ranges[664] = 330752U; t6_reg_ranges[665] = 330752U; t6_reg_ranges[666] = 331776U; t6_reg_ranges[667] = 331952U; t6_reg_ranges[668] = 332544U; t6_reg_ranges[669] = 332580U; buf_end = (u32 *)buf + buf_size; chip_version = ((unsigned int )adap->params.chip >> 4) & 15U; switch (chip_version) { case 4U: reg_ranges = (unsigned int const *)(& t4_reg_ranges); reg_ranges_size = 438; goto ldv_49772; case 5U: reg_ranges = (unsigned int const *)(& t5_reg_ranges); reg_ranges_size = 874; goto ldv_49772; case 6U: reg_ranges = (unsigned int const *)(& t6_reg_ranges); reg_ranges_size = 670; goto ldv_49772; default: dev_err((struct device const *)adap->pdev_dev, "Unsupported chip version %d\n", chip_version); return; } ldv_49772: memset(buf, 0, buf_size); range = 0; goto ldv_49787; ldv_49786: reg = *(reg_ranges + (unsigned long )range); last_reg = *(reg_ranges + ((unsigned long )range + 1UL)); bufp = (u32 *)buf + (unsigned long )reg; goto ldv_49784; ldv_49783: tmp = bufp; bufp = bufp + 1; *tmp = t4_read_reg(adap, reg); reg = reg + 4U; ldv_49784: ; if (reg <= last_reg && (unsigned long )bufp < (unsigned long )buf_end) { goto ldv_49783; } else { } range = range + 2; ldv_49787: ; if (range < reg_ranges_size) { goto ldv_49786; } else { } return; } } int t4_seeprom_wp(struct adapter *adapter , bool enable ) { unsigned int v ; int ret ; ssize_t tmp ; { v = (int )enable ? 12U : 0U; tmp = pci_write_vpd(adapter->pdev, 31740LL, 4UL, (void const *)(& v)); ret = (int )tmp; return (0 < ret ? 0 : ret); } } int t4_get_raw_vpd_params(struct adapter *adapter , struct vpd_params *p ) { int i ; int ret ; int addr ; int ec ; int sn ; int pn ; int na ; u8 *vpd ; u8 csum ; unsigned int vpdr_len ; unsigned int kw_offset ; unsigned int id_len ; void *tmp ; ssize_t tmp___0 ; ssize_t tmp___1 ; u16 tmp___2 ; u16 tmp___3 ; u8 tmp___4 ; int _min1 ; int _min2 ; u8 tmp___5 ; int _min1___0 ; int _min2___0 ; int _min1___1 ; int _min2___1 ; { ret = 0; tmp = vmalloc(1024UL); vpd = (u8 *)tmp; if ((unsigned long )vpd == (unsigned long )((u8 *)0U)) { return (-12); } else { } tmp___0 = pci_read_vpd(adapter->pdev, 1024LL, 4UL, (void *)vpd); ret = (int )tmp___0; if (ret < 0) { goto out; } else { } addr = (unsigned int )*vpd == 130U ? 1024 : 0; tmp___1 = pci_read_vpd(adapter->pdev, (loff_t )addr, 1024UL, (void *)vpd); ret = (int )tmp___1; if (ret < 0) { goto out; } else { } if ((unsigned int )*vpd != 130U) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD ID string\n"); ret = -22; goto out; } else { } tmp___2 = pci_vpd_lrdt_size((u8 const *)vpd); id_len = (unsigned int )tmp___2; if (id_len > 16U) { id_len = 16U; } else { } i = pci_vpd_find_tag((u8 const *)vpd, 0U, 1024U, 144); if (i < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD-R section\n"); ret = -22; goto out; } else { } tmp___3 = pci_vpd_lrdt_size((u8 const *)vpd + (unsigned long )i); vpdr_len = (unsigned int )tmp___3; kw_offset = (unsigned int )(i + 3); if (vpdr_len + kw_offset > 1024U) { dev_err((struct device const *)adapter->pdev_dev, "bad VPD-R length %u\n", vpdr_len); ret = -22; goto out; } else { } i = pci_vpd_find_info_keyword((u8 const *)vpd, kw_offset, vpdr_len, "RV"); if (i < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD keyword RV\n"); ret = -22; goto out; } else { } i = i + 3; csum = 0U; goto ldv_49813; ldv_49812: csum = (int )*(vpd + (unsigned long )i) + (int )csum; i = i - 1; ldv_49813: ; if (i >= 0) { goto ldv_49812; } else { } if ((unsigned int )csum != 0U) { dev_err((struct device const *)adapter->pdev_dev, "corrupted VPD EEPROM, actual csum %u\n", (int )csum); ret = -22; goto out; } else { } ec = pci_vpd_find_info_keyword((u8 const *)vpd, kw_offset, vpdr_len, "EC"); if (ec < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD keyword EC\n"); ret = -22; goto out; } else { } ec = ec + 3; sn = pci_vpd_find_info_keyword((u8 const *)vpd, kw_offset, vpdr_len, "SN"); if (sn < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD keyword SN\n"); ret = -22; goto out; } else { } sn = sn + 3; pn = pci_vpd_find_info_keyword((u8 const *)vpd, kw_offset, vpdr_len, "PN"); if (pn < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD keyword PN\n"); ret = -22; goto out; } else { } pn = pn + 3; na = pci_vpd_find_info_keyword((u8 const *)vpd, kw_offset, vpdr_len, "NA"); if (na < 0) { dev_err((struct device const *)adapter->pdev_dev, "missing VPD keyword NA\n"); ret = -22; goto out; } else { } na = na + 3; memcpy((void *)(& p->id), (void const *)vpd + 3U, (size_t )id_len); strim((char *)(& p->id)); memcpy((void *)(& p->ec), (void const *)vpd + (unsigned long )ec, 16UL); strim((char *)(& p->ec)); tmp___4 = pci_vpd_info_field_size((u8 const *)(vpd + ((unsigned long )sn + 0xfffffffffffffffdUL))); i = (int )tmp___4; _min1 = i; _min2 = 24; memcpy((void *)(& p->sn), (void const *)vpd + (unsigned long )sn, (size_t )(_min1 < _min2 ? _min1 : _min2)); strim((char *)(& p->sn)); tmp___5 = pci_vpd_info_field_size((u8 const *)(vpd + ((unsigned long )pn + 0xfffffffffffffffdUL))); i = (int )tmp___5; _min1___0 = i; _min2___0 = 16; memcpy((void *)(& p->pn), (void const *)vpd + (unsigned long )pn, (size_t )(_min1___0 < _min2___0 ? _min1___0 : _min2___0)); strim((char *)(& p->pn)); _min1___1 = i; _min2___1 = 12; memcpy((void *)(& p->na), (void const *)vpd + (unsigned long )na, (size_t )(_min1___1 < _min2___1 ? _min1___1 : _min2___1)); strim((char *)(& p->na)); out: vfree((void const *)vpd); return (ret); } } int t4_get_vpd_params(struct adapter *adapter , struct vpd_params *p ) { u32 cclk_param ; u32 cclk_val ; int ret ; { ret = t4_get_raw_vpd_params(adapter, p); if (ret != 0) { return (ret); } else { } cclk_param = 16777216U; ret = t4_query_params(adapter, adapter->mbox, adapter->pf, 0U, 1U, (u32 const *)(& cclk_param), & cclk_val); if (ret != 0) { return (ret); } else { } p->cclk = cclk_val; return (0); } } static int sf1_read(struct adapter *adapter , unsigned int byte_cnt , int cont , int lock , u32 *valp ) { int ret ; u32 tmp ; { if (byte_cnt == 0U || byte_cnt > 4U) { return (-22); } else { } tmp = t4_read_reg(adapter, 103420U); if ((int )tmp < 0) { return (-16); } else { } t4_write_reg(adapter, 103420U, (unsigned int )((lock << 4) | (cont << 3)) | ((byte_cnt - 1U) << 1)); ret = t4_wait_op_done(adapter, 103420, 2147483648U, 0, 10, 5); if (ret == 0) { *valp = t4_read_reg(adapter, 103416U); } else { } return (ret); } } static int sf1_write(struct adapter *adapter , unsigned int byte_cnt , int cont , int lock , u32 val ) { u32 tmp ; int tmp___0 ; { if (byte_cnt == 0U || byte_cnt > 4U) { return (-22); } else { } tmp = t4_read_reg(adapter, 103420U); if ((int )tmp < 0) { return (-16); } else { } t4_write_reg(adapter, 103416U, val); t4_write_reg(adapter, 103420U, ((unsigned int )((lock << 4) | (cont << 3)) | ((byte_cnt - 1U) << 1)) | 1U); tmp___0 = t4_wait_op_done(adapter, 103420, 2147483648U, 0, 10, 5); return (tmp___0); } } static int flash_wait_op(struct adapter *adapter , int attempts , int delay ) { int ret ; u32 status ; { ldv_49863: ret = sf1_write(adapter, 1U, 1, 1, 5U); if (ret != 0) { return (ret); } else { ret = sf1_read(adapter, 1U, 0, 1, & status); if (ret != 0) { return (ret); } else { } } if ((status & 1U) == 0U) { return (0); } else { } attempts = attempts - 1; if (attempts == 0) { return (-11); } else { } if (delay != 0) { msleep((unsigned int )delay); } else { } goto ldv_49863; } } int t4_read_flash(struct adapter *adapter , unsigned int addr , unsigned int nwords , u32 *data , int byte_oriented ) { int ret ; __u32 tmp ; __u32 tmp___0 ; { if ((unsigned long )addr + (unsigned long )nwords * 4UL > (unsigned long )adapter->params.sf_size || (addr & 3U) != 0U) { return (-22); } else { } tmp = __fswab32(addr); addr = tmp | 11U; ret = sf1_write(adapter, 4U, 1, 0, addr); if (ret != 0) { return (ret); } else { ret = sf1_read(adapter, 1U, 1, 0, data); if (ret != 0) { return (ret); } else { } } goto ldv_49873; ldv_49872: ret = sf1_read(adapter, 4U, nwords > 1U, nwords == 1U, data); if (nwords == 1U) { t4_write_reg(adapter, 103420U, 0U); } else { } if (ret != 0) { return (ret); } else { } if (byte_oriented != 0) { tmp___0 = __fswab32(*data); *data = tmp___0; } else { } nwords = nwords - 1U; data = data + 1; ldv_49873: ; if (nwords != 0U) { goto ldv_49872; } else { } return (0); } } static int t4_write_flash(struct adapter *adapter , unsigned int addr , unsigned int n , u8 const *data ) { int ret ; u32 buf[64U] ; unsigned int i ; unsigned int c ; unsigned int left ; unsigned int val ; unsigned int offset ; __u32 tmp ; unsigned int _min1 ; unsigned int _min2 ; u8 const *tmp___0 ; int tmp___1 ; { offset = addr & 255U; if (adapter->params.sf_size <= addr || offset + n > 256U) { return (-22); } else { } tmp = __fswab32(addr); val = tmp | 2U; ret = sf1_write(adapter, 1U, 0, 1, 6U); if (ret != 0) { goto unlock; } else { ret = sf1_write(adapter, 4U, 1, 1, val); if (ret != 0) { goto unlock; } else { } } left = n; goto ldv_49896; ldv_49895: _min1 = left; _min2 = 4U; c = _min1 < _min2 ? _min1 : _min2; val = 0U; i = 0U; goto ldv_49893; ldv_49892: tmp___0 = data; data = data + 1; val = (val << 8) + (unsigned int )*tmp___0; i = i + 1U; ldv_49893: ; if (i < c) { goto ldv_49892; } else { } ret = sf1_write(adapter, c, c != left, 1, val); if (ret != 0) { goto unlock; } else { } left = left - c; ldv_49896: ; if (left != 0U) { goto ldv_49895; } else { } ret = flash_wait_op(adapter, 8, 1); if (ret != 0) { goto unlock; } else { } t4_write_reg(adapter, 103420U, 0U); ret = t4_read_flash(adapter, addr & 4294967040U, 64U, (u32 *)(& buf), 1); if (ret != 0) { return (ret); } else { } tmp___1 = memcmp((void const *)(data + - ((unsigned long )n)), (void const *)(& buf) + (unsigned long )offset, (size_t )n); if (tmp___1 != 0) { dev_err((struct device const *)adapter->pdev_dev, "failed to correctly write the flash page at %#x\n", addr); return (-5); } else { } return (0); unlock: t4_write_reg(adapter, 103420U, 0U); return (ret); } } int t4_get_fw_version(struct adapter *adapter , u32 *vers ) { int tmp ; { tmp = t4_read_flash(adapter, 524292U, 1U, vers, 0); return (tmp); } } int t4_get_tp_version(struct adapter *adapter , u32 *vers ) { int tmp ; { tmp = t4_read_flash(adapter, 524296U, 1U, vers, 0); return (tmp); } } int t4_get_exprom_version(struct adapter *adap , u32 *vers ) { struct exprom_header *hdr ; u32 exprom_header_buf[5U] ; int ret ; { ret = t4_read_flash(adap, 0U, 5U, (u32 *)(& exprom_header_buf), 0); if (ret != 0) { return (ret); } else { } hdr = (struct exprom_header *)(& exprom_header_buf); if ((unsigned int )hdr->hdr_arr[0] != 85U || (unsigned int )hdr->hdr_arr[1] != 170U) { return (-2); } else { } *vers = (u32 )(((((int )hdr->hdr_ver[0] << 24) | ((int )hdr->hdr_ver[1] << 16)) | ((int )hdr->hdr_ver[2] << 8)) | (int )hdr->hdr_ver[3]); return (0); } } static int fw_compatible(struct fw_hdr const *hdr1 , struct fw_hdr const *hdr2 ) { { if ((int )((unsigned char )hdr1->chip) == (int )((unsigned char )hdr2->chip) && (unsigned int )hdr1->fw_ver == (unsigned int )hdr2->fw_ver) { return (1); } else { } if ((((((int )((unsigned char )hdr1->chip) == (int )((unsigned char )hdr2->chip) && (int )((unsigned char )hdr1->intfver_nic) == (int )((unsigned char )hdr2->intfver_nic)) && (int )((unsigned char )hdr1->intfver_vnic) == (int )((unsigned char )hdr2->intfver_vnic)) && (int )((unsigned char )hdr1->intfver_ri) == (int )((unsigned char )hdr2->intfver_ri)) && (int )((unsigned char )hdr1->intfver_iscsi) == (int )((unsigned char )hdr2->intfver_iscsi)) && (int )((unsigned char )hdr1->intfver_fcoe) == (int )((unsigned char )hdr2->intfver_fcoe)) { return (1); } else { } return (0); } } static int should_install_fs_fw(struct adapter *adap , int card_fw_usable , int k , int c ) { char const *reason ; { if (card_fw_usable == 0) { reason = "incompatible or unusable"; goto install; } else { } if (k > c) { reason = "older than the version supported with this driver"; goto install; } else { } return (0); install: dev_err((struct device const *)adap->pdev_dev, "firmware on card (%u.%u.%u.%u) is %s, installing firmware %u.%u.%u.%u on card.\n", (int )((unsigned int )c >> 24), (c >> 16) & 255, (c >> 8) & 255, c & 255, reason, (int )((unsigned int )k >> 24), (k >> 16) & 255, (k >> 8) & 255, k & 255); return (1); } } int t4_prep_fw(struct adapter *adap , struct fw_info *fw_info , u8 const *fw_data , unsigned int fw_size , struct fw_hdr *card_fw , enum dev_state state , int *reset ) { int ret ; int card_fw_usable ; int fs_fw_usable ; struct fw_hdr const *fs_fw ; struct fw_hdr const *drv_fw ; int tmp ; int tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; int tmp___3 ; uint32_t d ; uint32_t c ; uint32_t k ; __u32 tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; __u32 tmp___8 ; { drv_fw = (struct fw_hdr const *)(& fw_info->fw_hdr); tmp = t4_read_flash(adap, 524288U, 32U, (u32 *)card_fw, 1); ret = - tmp; if (ret == 0) { card_fw_usable = fw_compatible(drv_fw, (struct fw_hdr const *)card_fw); } else { dev_err((struct device const *)adap->pdev_dev, "Unable to read card\'s firmware header: %d\n", ret); card_fw_usable = 0; } if ((unsigned long )fw_data != (unsigned long )((u8 const *)0U)) { fs_fw = (struct fw_hdr const *)fw_data; fs_fw_usable = fw_compatible(drv_fw, fs_fw); } else { fs_fw = (struct fw_hdr const *)0; fs_fw_usable = 0; } if ((card_fw_usable != 0 && card_fw->fw_ver == (__be32 )drv_fw->fw_ver) && (fs_fw_usable == 0 || (unsigned int )fs_fw->fw_ver == (unsigned int )drv_fw->fw_ver)) { } else if (fs_fw_usable != 0 && (unsigned int )state == 0U) { tmp___1 = __fswab32(card_fw->fw_ver); tmp___2 = __fswab32(fs_fw->fw_ver); tmp___3 = should_install_fs_fw(adap, card_fw_usable, (int )tmp___2, (int )tmp___1); if (tmp___3 != 0) { tmp___0 = t4_fw_upgrade(adap, adap->mbox, fw_data, fw_size, 0); ret = - tmp___0; if (ret != 0) { dev_err((struct device const *)adap->pdev_dev, "failed to install firmware: %d\n", ret); goto bye; } else { } *card_fw = *fs_fw; card_fw_usable = 1; *reset = 0; } else { } } else { } if (card_fw_usable == 0) { tmp___4 = __fswab32(drv_fw->fw_ver); d = tmp___4; tmp___5 = __fswab32(card_fw->fw_ver); c = tmp___5; if ((unsigned long )fs_fw != (unsigned long )((struct fw_hdr const *)0)) { tmp___6 = __fswab32(fs_fw->fw_ver); k = tmp___6; } else { k = 0U; } dev_err((struct device const *)adap->pdev_dev, "Cannot find a usable firmware: chip state %d, driver compiled with %d.%d.%d.%d, card has %d.%d.%d.%d, filesystem has %d.%d.%d.%d\n", (unsigned int )state, d >> 24, (d >> 16) & 255U, (d >> 8) & 255U, d & 255U, c >> 24, (c >> 16) & 255U, (c >> 8) & 255U, c & 255U, k >> 24, (k >> 16) & 255U, (k >> 8) & 255U, k & 255U); ret = 22; goto bye; } else { } tmp___7 = __fswab32(card_fw->fw_ver); adap->params.fw_vers = tmp___7; tmp___8 = __fswab32(card_fw->tp_microcode_ver); adap->params.tp_vers = tmp___8; bye: ; return (ret); } } static int t4_flash_erase_sectors(struct adapter *adapter , int start , int end ) { int ret ; { ret = 0; if ((unsigned int )end >= adapter->params.sf_nsec) { return (-22); } else { } goto ldv_49958; ldv_49957: ret = sf1_write(adapter, 1U, 0, 1, 6U); if (ret != 0) { dev_err((struct device const *)adapter->pdev_dev, "erase of flash sector %d failed, error %d\n", start, ret); goto ldv_49956; } else { ret = sf1_write(adapter, 4U, 0, 1, (u32 )((start << 8) | 216)); if (ret != 0) { dev_err((struct device const *)adapter->pdev_dev, "erase of flash sector %d failed, error %d\n", start, ret); goto ldv_49956; } else { ret = flash_wait_op(adapter, 14, 500); if (ret != 0) { dev_err((struct device const *)adapter->pdev_dev, "erase of flash sector %d failed, error %d\n", start, ret); goto ldv_49956; } else { } } } start = start + 1; ldv_49958: ; if (start <= end) { goto ldv_49957; } else { } ldv_49956: t4_write_reg(adapter, 103420U, 0U); return (ret); } } unsigned int t4_flash_cfg_addr(struct adapter *adapter ) { { if (adapter->params.sf_size == 1048576U) { return (983040U); } else { return (2031616U); } } } static bool t4_fw_matches_chip(struct adapter const *adap , struct fw_hdr const *hdr ) { int tmp ; int tmp___0 ; int tmp___1 ; { tmp = is_t4(adap->params.chip); if (tmp != 0 && (unsigned int )((unsigned char )hdr->chip) == 0U) { return (1); } else { tmp___0 = is_t5(adap->params.chip); if (tmp___0 != 0 && (unsigned int )((unsigned char )hdr->chip) == 1U) { return (1); } else { tmp___1 = is_t6(adap->params.chip); if (tmp___1 != 0 && (unsigned int )((unsigned char )hdr->chip) == 2U) { return (1); } else { } } } dev_err((struct device const *)adap->pdev_dev, "FW image (%d) is not suitable for this adapter (%d)\n", (int )hdr->chip, ((unsigned int )adap->params.chip >> 4) & 15U); return (0); } } int t4_load_fw(struct adapter *adap , u8 const *fw_data , unsigned int size ) { u32 csum ; int ret ; int addr ; unsigned int i ; u8 first_page[256U] ; __be32 const *p ; struct fw_hdr const *hdr ; unsigned int sf_sec_size ; unsigned int fw_img_start ; unsigned int fw_start_sec ; __u16 tmp ; bool tmp___0 ; int tmp___1 ; __u32 tmp___2 ; { p = (__be32 const *)fw_data; hdr = (struct fw_hdr const *)fw_data; sf_sec_size = adap->params.sf_size / adap->params.sf_nsec; fw_img_start = adap->params.sf_fw_start; fw_start_sec = fw_img_start / sf_sec_size; if (size == 0U) { dev_err((struct device const *)adap->pdev_dev, "FW image has no data\n"); return (-22); } else { } if ((size & 511U) != 0U) { dev_err((struct device const *)adap->pdev_dev, "FW image size not multiple of 512 bytes\n"); return (-22); } else { } tmp = __fswab16((int )hdr->len512); if ((unsigned int )tmp * 512U != size) { dev_err((struct device const *)adap->pdev_dev, "FW image size differs from size in FW header\n"); return (-22); } else { } if (size > 1048576U) { dev_err((struct device const *)adap->pdev_dev, "FW image too large, max is %u bytes\n", 1048576); return (-27); } else { } tmp___0 = t4_fw_matches_chip((struct adapter const *)adap, hdr); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { return (-22); } else { } csum = 0U; i = 0U; goto ldv_49982; ldv_49981: tmp___2 = __fswab32(*(p + (unsigned long )i)); csum = tmp___2 + csum; i = i + 1U; ldv_49982: ; if (size / 4U > i) { goto ldv_49981; } else { } if (csum != 4294967295U) { dev_err((struct device const *)adap->pdev_dev, "corrupted firmware image, checksum %#x\n", csum); return (-22); } else { } i = ((size + sf_sec_size) - 1U) / sf_sec_size; ret = t4_flash_erase_sectors(adap, (int )fw_start_sec, (int )((fw_start_sec + i) - 1U)); if (ret != 0) { goto out; } else { } memcpy((void *)(& first_page), (void const *)fw_data, 256UL); ((struct fw_hdr *)(& first_page))->fw_ver = 4294967295U; ret = t4_write_flash(adap, fw_img_start, 256U, (u8 const *)(& first_page)); if (ret != 0) { goto out; } else { } addr = (int )fw_img_start; size = size - 256U; goto ldv_49986; ldv_49985: addr = addr + 256; fw_data = fw_data + 256UL; ret = t4_write_flash(adap, (unsigned int )addr, 256U, fw_data); if (ret != 0) { goto out; } else { } size = size - 256U; ldv_49986: ; if (size != 0U) { goto ldv_49985; } else { } ret = t4_write_flash(adap, fw_img_start + 4U, 4U, (u8 const *)(& hdr->fw_ver)); out: ; if (ret != 0) { dev_err((struct device const *)adap->pdev_dev, "firmware download failed, error %d\n", ret); } else { ret = t4_get_fw_version(adap, & adap->params.fw_vers); } return (ret); } } int t4_phy_fw_ver(struct adapter *adap , int *phy_fw_ver ) { u32 param ; u32 val ; int ret ; { param = (u32 )(((int )adap->params.portvec << 8) | 17760257); ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& param), & val); if (ret < 0) { return (ret); } else { } *phy_fw_ver = (int )val; return (0); } } int t4_load_phy_fw(struct adapter *adap , int win , spinlock_t *win_lock , int (*phy_fw_version)(u8 const * , size_t ) , u8 const *phy_fw_data , size_t phy_fw_size ) { unsigned long mtype ; unsigned long maddr ; u32 param ; u32 val ; int cur_phy_fw_ver ; int new_phy_fw_vers ; int ret ; { mtype = 0UL; maddr = 0UL; cur_phy_fw_ver = 0; new_phy_fw_vers = 0; if ((unsigned long )phy_fw_version != (unsigned long )((int (*)(u8 const * , size_t ))0)) { new_phy_fw_vers = (*phy_fw_version)(phy_fw_data, phy_fw_size); ret = t4_phy_fw_ver(adap, & cur_phy_fw_ver); if (ret < 0) { return (ret); } else { } if (cur_phy_fw_ver >= new_phy_fw_vers) { dev_warn((struct device const *)adap->pdev_dev, "PHY Firmware already up-to-date, version %#x\n", cur_phy_fw_ver); return (0); } else { } } else { } param = (u32 )(((int )adap->params.portvec << 8) | 17760256); val = (u32 )phy_fw_size; ret = t4_query_params_rw(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& param), & val, 1); if (ret < 0) { return (ret); } else { } mtype = (unsigned long )(val >> 8); maddr = (unsigned long )((val & 255U) << 16); if ((unsigned long )win_lock != (unsigned long )((spinlock_t *)0)) { spin_lock_bh(win_lock); } else { } ret = t4_memory_rw(adap, win, (int )mtype, (u32 )maddr, (u32 )phy_fw_size, (void *)phy_fw_data, 0); if ((unsigned long )win_lock != (unsigned long )((spinlock_t *)0)) { spin_unlock_bh(win_lock); } else { } if (ret != 0) { return (ret); } else { } param = (u32 )(((int )adap->params.portvec << 8) | 17760256); ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& param), (u32 const *)(& val), 30000); if ((unsigned long )phy_fw_version != (unsigned long )((int (*)(u8 const * , size_t ))0)) { ret = t4_phy_fw_ver(adap, & cur_phy_fw_ver); if (ret < 0) { return (ret); } else { } if (cur_phy_fw_ver != new_phy_fw_vers) { dev_warn((struct device const *)adap->pdev_dev, "PHY Firmware did not update: version on adapter %#x, version flashed %#x\n", cur_phy_fw_ver, new_phy_fw_vers); return (-6); } else { } } else { } return (1); } } int t4_fwcache(struct adapter *adap , enum fw_params_param_dev_fwcache op ) { struct fw_params_cmd c ; __u32 tmp ; int tmp___0 ; { memset((void *)(& c), 0, 64UL); tmp = __fswab32((adap->pf << 8) | 144703488U); c.op_to_vfn = tmp; c.retval_len16 = 67108864U; c.param[0].mnem = 6145U; c.param[0].val = (unsigned int )op; tmp___0 = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 64, (void *)0); return (tmp___0); } } void t4_cim_read_pif_la(struct adapter *adap , u32 *pif_req , u32 *pif_rsp , unsigned int *pif_req_wrptr , unsigned int *pif_rsp_wrptr ) { int i ; int j ; u32 cfg ; u32 val ; u32 req ; u32 rsp ; u32 *tmp ; u32 *tmp___0 ; { cfg = t4_read_reg(adap, 31600U); if ((cfg & 4096U) != 0U) { t4_write_reg(adap, 31600U, cfg ^ 4096U); } else { } val = t4_read_reg(adap, 31604U); req = (val >> 16) & 511U; rsp = val & 511U; if ((unsigned long )pif_req_wrptr != (unsigned long )((unsigned int *)0U)) { *pif_req_wrptr = req; } else { } if ((unsigned long )pif_rsp_wrptr != (unsigned long )((unsigned int *)0U)) { *pif_rsp_wrptr = rsp; } else { } i = 0; goto ldv_50034; ldv_50033: j = 0; goto ldv_50031; ldv_50030: t4_write_reg(adap, 31600U, (req << 23) | (rsp << 14)); tmp = pif_req; pif_req = pif_req + 1; *tmp = t4_read_reg(adap, 31608U); tmp___0 = pif_rsp; pif_rsp = pif_rsp + 1; *tmp___0 = t4_read_reg(adap, 31612U); req = req + 1U; rsp = rsp + 1U; j = j + 1; ldv_50031: ; if (j <= 5) { goto ldv_50030; } else { } req = (req + 2U) & 511U; rsp = (rsp + 2U) & 511U; i = i + 1; ldv_50034: ; if (i <= 63) { goto ldv_50033; } else { } t4_write_reg(adap, 31600U, cfg); return; } } void t4_cim_read_ma_la(struct adapter *adap , u32 *ma_req , u32 *ma_rsp ) { u32 cfg ; int i ; int j ; int idx ; u32 *tmp ; u32 *tmp___0 ; { cfg = t4_read_reg(adap, 31600U); if ((cfg & 4096U) != 0U) { t4_write_reg(adap, 31600U, cfg ^ 4096U); } else { } i = 0; goto ldv_50049; ldv_50048: j = 0; goto ldv_50046; ldv_50045: idx = i * 8 + j; t4_write_reg(adap, 31600U, (u32 )((idx << 23) | (idx << 14))); tmp = ma_req; ma_req = ma_req + 1; *tmp = t4_read_reg(adap, 31616U); tmp___0 = ma_rsp; ma_rsp = ma_rsp + 1; *tmp___0 = t4_read_reg(adap, 31620U); j = j + 1; ldv_50046: ; if (j <= 4) { goto ldv_50045; } else { } i = i + 1; ldv_50049: ; if (i <= 63) { goto ldv_50048; } else { } t4_write_reg(adap, 31600U, cfg); return; } } void t4_ulprx_read_la(struct adapter *adap , u32 *la_buf ) { unsigned int i ; unsigned int j ; u32 *p ; { i = 0U; goto ldv_50062; ldv_50061: p = la_buf + (unsigned long )i; t4_write_reg(adap, 102972U, i); j = t4_read_reg(adap, 102984U); t4_write_reg(adap, 102976U, j); j = 0U; goto ldv_50059; ldv_50058: *p = t4_read_reg(adap, 102980U); j = j + 1U; p = p + 8UL; ldv_50059: ; if (j <= 511U) { goto ldv_50058; } else { } i = i + 1U; ldv_50062: ; if (i <= 7U) { goto ldv_50061; } else { } return; } } int t4_link_l1cfg(struct adapter *adap , unsigned int mbox , unsigned int port , struct link_config *lc ) { struct fw_port_cmd c ; unsigned int fc ; unsigned int mdi ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; int tmp___3 ; { fc = 0U; mdi = 512U; lc->link_ok = 0U; if ((int )lc->requested_fc & 1) { fc = fc | 64U; } else { } if (((int )lc->requested_fc & 2) != 0) { fc = fc | 128U; } else { } memset((void *)(& c), 0, 32UL); tmp = __fswab32(port | 462422016U); c.op_to_portid = tmp; c.action_to_len16 = 33554688U; if (((int )lc->supported & 256) == 0) { tmp___0 = __fswab32(((unsigned int )lc->supported & 283U) | fc); c.u.l1cfg.rcap = tmp___0; lc->fc = (unsigned int )lc->requested_fc & 3U; } else if ((unsigned int )lc->autoneg == 0U) { tmp___1 = __fswab32(((unsigned int )lc->requested_speed | fc) | mdi); c.u.l1cfg.rcap = tmp___1; lc->fc = (unsigned int )lc->requested_fc & 3U; } else { tmp___2 = __fswab32(((unsigned int )lc->advertising | fc) | mdi); c.u.l1cfg.rcap = tmp___2; } tmp___3 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 32, (void *)0); return (tmp___3); } } int t4_restart_aneg(struct adapter *adap , unsigned int mbox , unsigned int port ) { struct fw_port_cmd c ; __u32 tmp ; int tmp___0 ; { memset((void *)(& c), 0, 32UL); tmp = __fswab32(port | 462422016U); c.op_to_portid = tmp; c.action_to_len16 = 33554688U; c.u.l1cfg.rcap = 65536U; tmp___0 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 32, (void *)0); return (tmp___0); } } static int t4_handle_intr_status(struct adapter *adapter , unsigned int reg , struct intr_info const *acts ) { int fatal ; unsigned int mask ; unsigned int status ; u32 tmp ; int tmp___0 ; { fatal = 0; mask = 0U; tmp = t4_read_reg(adapter, reg); status = tmp; goto ldv_50098; ldv_50097: ; if (((unsigned int )acts->mask & status) == 0U) { goto ldv_50095; } else { } if ((unsigned int )((unsigned short )acts->fatal) != 0U) { fatal = fatal + 1; dev_alert((struct device const *)adapter->pdev_dev, "%s (0x%x)\n", acts->msg, (unsigned int )acts->mask & status); } else if ((unsigned long )acts->msg != (unsigned long )((char const */* const */)0)) { tmp___0 = __printk_ratelimit("t4_handle_intr_status"); if (tmp___0 != 0) { dev_warn((struct device const *)adapter->pdev_dev, "%s (0x%x)\n", acts->msg, (unsigned int )acts->mask & status); } else { } } else { } if ((unsigned long )acts->int_handler != (unsigned long )((void (*)(struct adapter * ))0)) { (*(acts->int_handler))(adapter); } else { } mask = (unsigned int )acts->mask | mask; ldv_50095: acts = acts + 1; ldv_50098: ; if ((unsigned int )acts->mask != 0U) { goto ldv_50097; } else { } status = status & mask; if (status != 0U) { t4_write_reg(adapter, reg, status); } else { } return (fatal); } } static void pcie_intr_handler(struct adapter *adapter ) { struct intr_info sysbus_intr_info[6U] ; struct intr_info pcie_port_intr_info[10U] ; struct intr_info pcie_intr_info[31U] ; struct intr_info t5_pcie_intr_info[31U] ; int fat ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { sysbus_intr_info[0].mask = 2147483648U; sysbus_intr_info[0].msg = "RXNP array parity error"; sysbus_intr_info[0].stat_idx = -1; sysbus_intr_info[0].fatal = 1U; sysbus_intr_info[0].int_handler = 0; sysbus_intr_info[1].mask = 536870912U; sysbus_intr_info[1].msg = "RXPC array parity error"; sysbus_intr_info[1].stat_idx = -1; sysbus_intr_info[1].fatal = 1U; sysbus_intr_info[1].int_handler = 0; sysbus_intr_info[2].mask = 134217728U; sysbus_intr_info[2].msg = "RXCIF array parity error"; sysbus_intr_info[2].stat_idx = -1; sysbus_intr_info[2].fatal = 1U; sysbus_intr_info[2].int_handler = 0; sysbus_intr_info[3].mask = 67108864U; sysbus_intr_info[3].msg = "Rx completions control array parity error"; sysbus_intr_info[3].stat_idx = -1; sysbus_intr_info[3].fatal = 1U; sysbus_intr_info[3].int_handler = 0; sysbus_intr_info[4].mask = 8388608U; sysbus_intr_info[4].msg = "RXFT array parity error"; sysbus_intr_info[4].stat_idx = -1; sysbus_intr_info[4].fatal = 1U; sysbus_intr_info[4].int_handler = 0; sysbus_intr_info[5].mask = 0U; sysbus_intr_info[5].msg = 0; sysbus_intr_info[5].stat_idx = (short)0; sysbus_intr_info[5].fatal = (unsigned short)0; sysbus_intr_info[5].int_handler = 0; pcie_port_intr_info[0].mask = 1073741824U; pcie_port_intr_info[0].msg = "TXPC array parity error"; pcie_port_intr_info[0].stat_idx = -1; pcie_port_intr_info[0].fatal = 1U; pcie_port_intr_info[0].int_handler = 0; pcie_port_intr_info[1].mask = 536870912U; pcie_port_intr_info[1].msg = "TXNP array parity error"; pcie_port_intr_info[1].stat_idx = -1; pcie_port_intr_info[1].fatal = 1U; pcie_port_intr_info[1].int_handler = 0; pcie_port_intr_info[2].mask = 268435456U; pcie_port_intr_info[2].msg = "TXFT array parity error"; pcie_port_intr_info[2].stat_idx = -1; pcie_port_intr_info[2].fatal = 1U; pcie_port_intr_info[2].int_handler = 0; pcie_port_intr_info[3].mask = 134217728U; pcie_port_intr_info[3].msg = "TXCA array parity error"; pcie_port_intr_info[3].stat_idx = -1; pcie_port_intr_info[3].fatal = 1U; pcie_port_intr_info[3].int_handler = 0; pcie_port_intr_info[4].mask = 67108864U; pcie_port_intr_info[4].msg = "TXCIF array parity error"; pcie_port_intr_info[4].stat_idx = -1; pcie_port_intr_info[4].fatal = 1U; pcie_port_intr_info[4].int_handler = 0; pcie_port_intr_info[5].mask = 33554432U; pcie_port_intr_info[5].msg = "RXCA array parity error"; pcie_port_intr_info[5].stat_idx = -1; pcie_port_intr_info[5].fatal = 1U; pcie_port_intr_info[5].int_handler = 0; pcie_port_intr_info[6].mask = 2097152U; pcie_port_intr_info[6].msg = "outbound request TLP discarded"; pcie_port_intr_info[6].stat_idx = -1; pcie_port_intr_info[6].fatal = 1U; pcie_port_intr_info[6].int_handler = 0; pcie_port_intr_info[7].mask = 262144U; pcie_port_intr_info[7].msg = "Rx data parity error"; pcie_port_intr_info[7].stat_idx = -1; pcie_port_intr_info[7].fatal = 1U; pcie_port_intr_info[7].int_handler = 0; pcie_port_intr_info[8].mask = 65536U; pcie_port_intr_info[8].msg = "Tx uncorrectable data error"; pcie_port_intr_info[8].stat_idx = -1; pcie_port_intr_info[8].fatal = 1U; pcie_port_intr_info[8].int_handler = 0; pcie_port_intr_info[9].mask = 0U; pcie_port_intr_info[9].msg = 0; pcie_port_intr_info[9].stat_idx = (short)0; pcie_port_intr_info[9].fatal = (unsigned short)0; pcie_port_intr_info[9].int_handler = 0; pcie_intr_info[0].mask = 1U; pcie_intr_info[0].msg = "MSI AddrL parity error"; pcie_intr_info[0].stat_idx = -1; pcie_intr_info[0].fatal = 1U; pcie_intr_info[0].int_handler = 0; pcie_intr_info[1].mask = 2U; pcie_intr_info[1].msg = "MSI AddrH parity error"; pcie_intr_info[1].stat_idx = -1; pcie_intr_info[1].fatal = 1U; pcie_intr_info[1].int_handler = 0; pcie_intr_info[2].mask = 4U; pcie_intr_info[2].msg = "MSI data parity error"; pcie_intr_info[2].stat_idx = -1; pcie_intr_info[2].fatal = 1U; pcie_intr_info[2].int_handler = 0; pcie_intr_info[3].mask = 8U; pcie_intr_info[3].msg = "MSI-X AddrL parity error"; pcie_intr_info[3].stat_idx = -1; pcie_intr_info[3].fatal = 1U; pcie_intr_info[3].int_handler = 0; pcie_intr_info[4].mask = 16U; pcie_intr_info[4].msg = "MSI-X AddrH parity error"; pcie_intr_info[4].stat_idx = -1; pcie_intr_info[4].fatal = 1U; pcie_intr_info[4].int_handler = 0; pcie_intr_info[5].mask = 32U; pcie_intr_info[5].msg = "MSI-X data parity error"; pcie_intr_info[5].stat_idx = -1; pcie_intr_info[5].fatal = 1U; pcie_intr_info[5].int_handler = 0; pcie_intr_info[6].mask = 64U; pcie_intr_info[6].msg = "MSI-X DI parity error"; pcie_intr_info[6].stat_idx = -1; pcie_intr_info[6].fatal = 1U; pcie_intr_info[6].int_handler = 0; pcie_intr_info[7].mask = 128U; pcie_intr_info[7].msg = "PCI PIO completion FIFO parity error"; pcie_intr_info[7].stat_idx = -1; pcie_intr_info[7].fatal = 1U; pcie_intr_info[7].int_handler = 0; pcie_intr_info[8].mask = 256U; pcie_intr_info[8].msg = "PCI PIO request FIFO parity error"; pcie_intr_info[8].stat_idx = -1; pcie_intr_info[8].fatal = 1U; pcie_intr_info[8].int_handler = 0; pcie_intr_info[9].mask = 512U; pcie_intr_info[9].msg = "PCI PCI target tag FIFO parity error"; pcie_intr_info[9].stat_idx = -1; pcie_intr_info[9].fatal = 1U; pcie_intr_info[9].int_handler = 0; pcie_intr_info[10].mask = 1024U; pcie_intr_info[10].msg = "PCI CMD channel count parity error"; pcie_intr_info[10].stat_idx = -1; pcie_intr_info[10].fatal = 1U; pcie_intr_info[10].int_handler = 0; pcie_intr_info[11].mask = 2048U; pcie_intr_info[11].msg = "PCI CMD channel request parity error"; pcie_intr_info[11].stat_idx = -1; pcie_intr_info[11].fatal = 1U; pcie_intr_info[11].int_handler = 0; pcie_intr_info[12].mask = 4096U; pcie_intr_info[12].msg = "PCI CMD channel response parity error"; pcie_intr_info[12].stat_idx = -1; pcie_intr_info[12].fatal = 1U; pcie_intr_info[12].int_handler = 0; pcie_intr_info[13].mask = 8192U; pcie_intr_info[13].msg = "PCI DMA channel count parity error"; pcie_intr_info[13].stat_idx = -1; pcie_intr_info[13].fatal = 1U; pcie_intr_info[13].int_handler = 0; pcie_intr_info[14].mask = 16384U; pcie_intr_info[14].msg = "PCI DMA channel request parity error"; pcie_intr_info[14].stat_idx = -1; pcie_intr_info[14].fatal = 1U; pcie_intr_info[14].int_handler = 0; pcie_intr_info[15].mask = 32768U; pcie_intr_info[15].msg = "PCI DMA channel response parity error"; pcie_intr_info[15].stat_idx = -1; pcie_intr_info[15].fatal = 1U; pcie_intr_info[15].int_handler = 0; pcie_intr_info[16].mask = 65536U; pcie_intr_info[16].msg = "PCI HMA channel count parity error"; pcie_intr_info[16].stat_idx = -1; pcie_intr_info[16].fatal = 1U; pcie_intr_info[16].int_handler = 0; pcie_intr_info[17].mask = 131072U; pcie_intr_info[17].msg = "PCI HMA channel request parity error"; pcie_intr_info[17].stat_idx = -1; pcie_intr_info[17].fatal = 1U; pcie_intr_info[17].int_handler = 0; pcie_intr_info[18].mask = 262144U; pcie_intr_info[18].msg = "PCI HMA channel response parity error"; pcie_intr_info[18].stat_idx = -1; pcie_intr_info[18].fatal = 1U; pcie_intr_info[18].int_handler = 0; pcie_intr_info[19].mask = 524288U; pcie_intr_info[19].msg = "PCI config snoop FIFO parity error"; pcie_intr_info[19].stat_idx = -1; pcie_intr_info[19].fatal = 1U; pcie_intr_info[19].int_handler = 0; pcie_intr_info[20].mask = 1048576U; pcie_intr_info[20].msg = "PCI FID parity error"; pcie_intr_info[20].stat_idx = -1; pcie_intr_info[20].fatal = 1U; pcie_intr_info[20].int_handler = 0; pcie_intr_info[21].mask = 2097152U; pcie_intr_info[21].msg = "PCI INTx clear parity error"; pcie_intr_info[21].stat_idx = -1; pcie_intr_info[21].fatal = 1U; pcie_intr_info[21].int_handler = 0; pcie_intr_info[22].mask = 4194304U; pcie_intr_info[22].msg = "PCI MA tag parity error"; pcie_intr_info[22].stat_idx = -1; pcie_intr_info[22].fatal = 1U; pcie_intr_info[22].int_handler = 0; pcie_intr_info[23].mask = 8388608U; pcie_intr_info[23].msg = "PCI PIO tag parity error"; pcie_intr_info[23].stat_idx = -1; pcie_intr_info[23].fatal = 1U; pcie_intr_info[23].int_handler = 0; pcie_intr_info[24].mask = 16777216U; pcie_intr_info[24].msg = "PCI Rx completion parity error"; pcie_intr_info[24].stat_idx = -1; pcie_intr_info[24].fatal = 1U; pcie_intr_info[24].int_handler = 0; pcie_intr_info[25].mask = 33554432U; pcie_intr_info[25].msg = "PCI Rx write parity error"; pcie_intr_info[25].stat_idx = -1; pcie_intr_info[25].fatal = 1U; pcie_intr_info[25].int_handler = 0; pcie_intr_info[26].mask = 67108864U; pcie_intr_info[26].msg = "PCI replay buffer parity error"; pcie_intr_info[26].stat_idx = -1; pcie_intr_info[26].fatal = 1U; pcie_intr_info[26].int_handler = 0; pcie_intr_info[27].mask = 134217728U; pcie_intr_info[27].msg = "PCI core secondary fault"; pcie_intr_info[27].stat_idx = -1; pcie_intr_info[27].fatal = 1U; pcie_intr_info[27].int_handler = 0; pcie_intr_info[28].mask = 268435456U; pcie_intr_info[28].msg = "PCI core primary fault"; pcie_intr_info[28].stat_idx = -1; pcie_intr_info[28].fatal = 1U; pcie_intr_info[28].int_handler = 0; pcie_intr_info[29].mask = 536870912U; pcie_intr_info[29].msg = "PCI unexpected split completion error"; pcie_intr_info[29].stat_idx = -1; pcie_intr_info[29].fatal = 0U; pcie_intr_info[29].int_handler = 0; pcie_intr_info[30].mask = 0U; pcie_intr_info[30].msg = 0; pcie_intr_info[30].stat_idx = (short)0; pcie_intr_info[30].fatal = (unsigned short)0; pcie_intr_info[30].int_handler = 0; t5_pcie_intr_info[0].mask = 1U; t5_pcie_intr_info[0].msg = "Master Response Read Queue parity error"; t5_pcie_intr_info[0].stat_idx = -1; t5_pcie_intr_info[0].fatal = 1U; t5_pcie_intr_info[0].int_handler = 0; t5_pcie_intr_info[1].mask = 2U; t5_pcie_intr_info[1].msg = "Master Timeout FIFO parity error"; t5_pcie_intr_info[1].stat_idx = -1; t5_pcie_intr_info[1].fatal = 1U; t5_pcie_intr_info[1].int_handler = 0; t5_pcie_intr_info[2].mask = 4U; t5_pcie_intr_info[2].msg = "MSI-X STI SRAM parity error"; t5_pcie_intr_info[2].stat_idx = -1; t5_pcie_intr_info[2].fatal = 1U; t5_pcie_intr_info[2].int_handler = 0; t5_pcie_intr_info[3].mask = 8U; t5_pcie_intr_info[3].msg = "MSI-X AddrL parity error"; t5_pcie_intr_info[3].stat_idx = -1; t5_pcie_intr_info[3].fatal = 1U; t5_pcie_intr_info[3].int_handler = 0; t5_pcie_intr_info[4].mask = 16U; t5_pcie_intr_info[4].msg = "MSI-X AddrH parity error"; t5_pcie_intr_info[4].stat_idx = -1; t5_pcie_intr_info[4].fatal = 1U; t5_pcie_intr_info[4].int_handler = 0; t5_pcie_intr_info[5].mask = 32U; t5_pcie_intr_info[5].msg = "MSI-X data parity error"; t5_pcie_intr_info[5].stat_idx = -1; t5_pcie_intr_info[5].fatal = 1U; t5_pcie_intr_info[5].int_handler = 0; t5_pcie_intr_info[6].mask = 64U; t5_pcie_intr_info[6].msg = "MSI-X DI parity error"; t5_pcie_intr_info[6].stat_idx = -1; t5_pcie_intr_info[6].fatal = 1U; t5_pcie_intr_info[6].int_handler = 0; t5_pcie_intr_info[7].mask = 128U; t5_pcie_intr_info[7].msg = "PCI PIO completion Group FIFO parity error"; t5_pcie_intr_info[7].stat_idx = -1; t5_pcie_intr_info[7].fatal = 1U; t5_pcie_intr_info[7].int_handler = 0; t5_pcie_intr_info[8].mask = 256U; t5_pcie_intr_info[8].msg = "PCI PIO request Group FIFO parity error"; t5_pcie_intr_info[8].stat_idx = -1; t5_pcie_intr_info[8].fatal = 1U; t5_pcie_intr_info[8].int_handler = 0; t5_pcie_intr_info[9].mask = 512U; t5_pcie_intr_info[9].msg = "PCI PCI target tag FIFO parity error"; t5_pcie_intr_info[9].stat_idx = -1; t5_pcie_intr_info[9].fatal = 1U; t5_pcie_intr_info[9].int_handler = 0; t5_pcie_intr_info[10].mask = 1024U; t5_pcie_intr_info[10].msg = "PCI master tag queue parity error"; t5_pcie_intr_info[10].stat_idx = -1; t5_pcie_intr_info[10].fatal = 1U; t5_pcie_intr_info[10].int_handler = 0; t5_pcie_intr_info[11].mask = 2048U; t5_pcie_intr_info[11].msg = "PCI CMD channel request parity error"; t5_pcie_intr_info[11].stat_idx = -1; t5_pcie_intr_info[11].fatal = 1U; t5_pcie_intr_info[11].int_handler = 0; t5_pcie_intr_info[12].mask = 4096U; t5_pcie_intr_info[12].msg = "PCI CMD channel response parity error"; t5_pcie_intr_info[12].stat_idx = -1; t5_pcie_intr_info[12].fatal = 1U; t5_pcie_intr_info[12].int_handler = 0; t5_pcie_intr_info[13].mask = 8192U; t5_pcie_intr_info[13].msg = "PCI DMA channel write request parity error"; t5_pcie_intr_info[13].stat_idx = -1; t5_pcie_intr_info[13].fatal = 1U; t5_pcie_intr_info[13].int_handler = 0; t5_pcie_intr_info[14].mask = 16384U; t5_pcie_intr_info[14].msg = "PCI DMA channel request parity error"; t5_pcie_intr_info[14].stat_idx = -1; t5_pcie_intr_info[14].fatal = 1U; t5_pcie_intr_info[14].int_handler = 0; t5_pcie_intr_info[15].mask = 32768U; t5_pcie_intr_info[15].msg = "PCI DMA channel response parity error"; t5_pcie_intr_info[15].stat_idx = -1; t5_pcie_intr_info[15].fatal = 1U; t5_pcie_intr_info[15].int_handler = 0; t5_pcie_intr_info[16].mask = 65536U; t5_pcie_intr_info[16].msg = "PCI HMA channel count parity error"; t5_pcie_intr_info[16].stat_idx = -1; t5_pcie_intr_info[16].fatal = 1U; t5_pcie_intr_info[16].int_handler = 0; t5_pcie_intr_info[17].mask = 131072U; t5_pcie_intr_info[17].msg = "PCI HMA channel request parity error"; t5_pcie_intr_info[17].stat_idx = -1; t5_pcie_intr_info[17].fatal = 1U; t5_pcie_intr_info[17].int_handler = 0; t5_pcie_intr_info[18].mask = 262144U; t5_pcie_intr_info[18].msg = "PCI HMA channel response parity error"; t5_pcie_intr_info[18].stat_idx = -1; t5_pcie_intr_info[18].fatal = 1U; t5_pcie_intr_info[18].int_handler = 0; t5_pcie_intr_info[19].mask = 524288U; t5_pcie_intr_info[19].msg = "PCI config snoop FIFO parity error"; t5_pcie_intr_info[19].stat_idx = -1; t5_pcie_intr_info[19].fatal = 1U; t5_pcie_intr_info[19].int_handler = 0; t5_pcie_intr_info[20].mask = 1048576U; t5_pcie_intr_info[20].msg = "PCI FID parity error"; t5_pcie_intr_info[20].stat_idx = -1; t5_pcie_intr_info[20].fatal = 1U; t5_pcie_intr_info[20].int_handler = 0; t5_pcie_intr_info[21].mask = 2097152U; t5_pcie_intr_info[21].msg = "PCI INTx clear parity error"; t5_pcie_intr_info[21].stat_idx = -1; t5_pcie_intr_info[21].fatal = 1U; t5_pcie_intr_info[21].int_handler = 0; t5_pcie_intr_info[22].mask = 4194304U; t5_pcie_intr_info[22].msg = "PCI MA group FIFO parity error"; t5_pcie_intr_info[22].stat_idx = -1; t5_pcie_intr_info[22].fatal = 1U; t5_pcie_intr_info[22].int_handler = 0; t5_pcie_intr_info[23].mask = 8388608U; t5_pcie_intr_info[23].msg = "PCI PIO tag parity error"; t5_pcie_intr_info[23].stat_idx = -1; t5_pcie_intr_info[23].fatal = 1U; t5_pcie_intr_info[23].int_handler = 0; t5_pcie_intr_info[24].mask = 16777216U; t5_pcie_intr_info[24].msg = "PCI IP Rx header group parity error"; t5_pcie_intr_info[24].stat_idx = -1; t5_pcie_intr_info[24].fatal = 1U; t5_pcie_intr_info[24].int_handler = 0; t5_pcie_intr_info[25].mask = 33554432U; t5_pcie_intr_info[25].msg = "PCI IP Rx data group parity error"; t5_pcie_intr_info[25].stat_idx = -1; t5_pcie_intr_info[25].fatal = 1U; t5_pcie_intr_info[25].int_handler = 0; t5_pcie_intr_info[26].mask = 67108864U; t5_pcie_intr_info[26].msg = "PCI IP replay buffer parity error"; t5_pcie_intr_info[26].stat_idx = -1; t5_pcie_intr_info[26].fatal = 1U; t5_pcie_intr_info[26].int_handler = 0; t5_pcie_intr_info[27].mask = 134217728U; t5_pcie_intr_info[27].msg = "PCI IP SOT buffer parity error"; t5_pcie_intr_info[27].stat_idx = -1; t5_pcie_intr_info[27].fatal = 1U; t5_pcie_intr_info[27].int_handler = 0; t5_pcie_intr_info[28].mask = 268435456U; t5_pcie_intr_info[28].msg = "PCI TRGT1 group FIFOs parity error"; t5_pcie_intr_info[28].stat_idx = -1; t5_pcie_intr_info[28].fatal = 1U; t5_pcie_intr_info[28].int_handler = 0; t5_pcie_intr_info[29].mask = 536870912U; t5_pcie_intr_info[29].msg = "Outbound read error"; t5_pcie_intr_info[29].stat_idx = -1; t5_pcie_intr_info[29].fatal = 0U; t5_pcie_intr_info[29].int_handler = 0; t5_pcie_intr_info[30].mask = 0U; t5_pcie_intr_info[30].msg = 0; t5_pcie_intr_info[30].stat_idx = (short)0; t5_pcie_intr_info[30].fatal = (unsigned short)0; t5_pcie_intr_info[30].int_handler = 0; tmp___2 = is_t4(adapter->params.chip); if (tmp___2 != 0) { tmp = t4_handle_intr_status(adapter, 22792U, (struct intr_info const *)(& sysbus_intr_info)); tmp___0 = t4_handle_intr_status(adapter, 22948U, (struct intr_info const *)(& pcie_port_intr_info)); tmp___1 = t4_handle_intr_status(adapter, 12292U, (struct intr_info const *)(& pcie_intr_info)); fat = (tmp + tmp___0) + tmp___1; } else { fat = t4_handle_intr_status(adapter, 12292U, (struct intr_info const *)(& t5_pcie_intr_info)); } if (fat != 0) { t4_fatal_err(adapter); } else { } return; } } static void tp_intr_handler(struct adapter *adapter ) { struct intr_info tp_intr_info[3U] ; int tmp ; { tp_intr_info[0].mask = 1073741823U; tp_intr_info[0].msg = "TP parity error"; tp_intr_info[0].stat_idx = -1; tp_intr_info[0].fatal = 1U; tp_intr_info[0].int_handler = 0; tp_intr_info[1].mask = 1073741824U; tp_intr_info[1].msg = "TP out of Tx pages"; tp_intr_info[1].stat_idx = -1; tp_intr_info[1].fatal = 1U; tp_intr_info[1].int_handler = 0; tp_intr_info[2].mask = 0U; tp_intr_info[2].msg = 0; tp_intr_info[2].stat_idx = (short)0; tp_intr_info[2].fatal = (unsigned short)0; tp_intr_info[2].int_handler = 0; tmp = t4_handle_intr_status(adapter, 32372U, (struct intr_info const *)(& tp_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void sge_intr_handler(struct adapter *adapter ) { u64 v ; u32 err ; struct intr_info sge_intr_info[13U] ; struct intr_info t4t5_sge_intr_info[4U] ; u32 tmp ; u32 tmp___0 ; int tmp___1 ; int tmp___2 ; { sge_intr_info[0].mask = 4194304U; sge_intr_info[0].msg = "SGE received CPL exceeding IQE size"; sge_intr_info[0].stat_idx = -1; sge_intr_info[0].fatal = 1U; sge_intr_info[0].int_handler = 0; sge_intr_info[1].mask = 2097152U; sge_intr_info[1].msg = "SGE GTS CIDX increment too large"; sge_intr_info[1].stat_idx = -1; sge_intr_info[1].fatal = 0U; sge_intr_info[1].int_handler = 0; sge_intr_info[2].mask = 524288U; sge_intr_info[2].msg = "SGE received 0-length CPL"; sge_intr_info[2].stat_idx = -1; sge_intr_info[2].fatal = 0U; sge_intr_info[2].int_handler = 0; sge_intr_info[3].mask = 128U; sge_intr_info[3].msg = (char const *)0; sge_intr_info[3].stat_idx = -1; sge_intr_info[3].fatal = 0U; sge_intr_info[3].int_handler = & t4_db_full; sge_intr_info[4].mask = 196608U; sge_intr_info[4].msg = "SGE IQID > 1023 received CPL for FL"; sge_intr_info[4].stat_idx = -1; sge_intr_info[4].fatal = 0U; sge_intr_info[4].int_handler = 0; sge_intr_info[5].mask = 32768U; sge_intr_info[5].msg = "SGE DBP 3 pidx increment too large"; sge_intr_info[5].stat_idx = -1; sge_intr_info[5].fatal = 0U; sge_intr_info[5].int_handler = 0; sge_intr_info[6].mask = 16384U; sge_intr_info[6].msg = "SGE DBP 2 pidx increment too large"; sge_intr_info[6].stat_idx = -1; sge_intr_info[6].fatal = 0U; sge_intr_info[6].int_handler = 0; sge_intr_info[7].mask = 8192U; sge_intr_info[7].msg = "SGE DBP 1 pidx increment too large"; sge_intr_info[7].stat_idx = -1; sge_intr_info[7].fatal = 0U; sge_intr_info[7].int_handler = 0; sge_intr_info[8].mask = 4096U; sge_intr_info[8].msg = "SGE DBP 0 pidx increment too large"; sge_intr_info[8].stat_idx = -1; sge_intr_info[8].fatal = 0U; sge_intr_info[8].int_handler = 0; sge_intr_info[9].mask = 1024U; sge_intr_info[9].msg = "SGE too many priority ingress contexts"; sge_intr_info[9].stat_idx = -1; sge_intr_info[9].fatal = 0U; sge_intr_info[9].int_handler = 0; sge_intr_info[10].mask = 32U; sge_intr_info[10].msg = "SGE illegal ingress QID"; sge_intr_info[10].stat_idx = -1; sge_intr_info[10].fatal = 0U; sge_intr_info[10].int_handler = 0; sge_intr_info[11].mask = 16U; sge_intr_info[11].msg = "SGE illegal egress QID"; sge_intr_info[11].stat_idx = -1; sge_intr_info[11].fatal = 0U; sge_intr_info[11].int_handler = 0; sge_intr_info[12].mask = 0U; sge_intr_info[12].msg = 0; sge_intr_info[12].stat_idx = (short)0; sge_intr_info[12].fatal = (unsigned short)0; sge_intr_info[12].int_handler = 0; t4t5_sge_intr_info[0].mask = 262144U; t4t5_sge_intr_info[0].msg = (char const *)0; t4t5_sge_intr_info[0].stat_idx = -1; t4t5_sge_intr_info[0].fatal = 0U; t4t5_sge_intr_info[0].int_handler = & t4_db_dropped; t4t5_sge_intr_info[1].mask = 256U; t4t5_sge_intr_info[1].msg = (char const *)0; t4t5_sge_intr_info[1].stat_idx = -1; t4t5_sge_intr_info[1].fatal = 0U; t4t5_sge_intr_info[1].int_handler = & t4_db_full; t4t5_sge_intr_info[2].mask = 512U; t4t5_sge_intr_info[2].msg = "SGE too many priority egress contexts"; t4t5_sge_intr_info[2].stat_idx = -1; t4t5_sge_intr_info[2].fatal = 0U; t4t5_sge_intr_info[2].int_handler = 0; t4t5_sge_intr_info[3].mask = 0U; t4t5_sge_intr_info[3].msg = 0; t4t5_sge_intr_info[3].stat_idx = (short)0; t4t5_sge_intr_info[3].fatal = (unsigned short)0; t4t5_sge_intr_info[3].int_handler = 0; tmp = t4_read_reg(adapter, 4132U); tmp___0 = t4_read_reg(adapter, 4144U); v = (unsigned long long )tmp | ((unsigned long long )tmp___0 << 32); if (v != 0ULL) { dev_alert((struct device const *)adapter->pdev_dev, "SGE parity error (%#llx)\n", v); t4_write_reg(adapter, 4132U, (u32 )v); t4_write_reg(adapter, 4144U, (u32 )(v >> 32)); } else { } tmp___1 = t4_handle_intr_status(adapter, 4156U, (struct intr_info const *)(& sge_intr_info)); v = (u64 )tmp___1 | v; if ((((unsigned int )adapter->params.chip >> 4) & 15U) <= 5U) { tmp___2 = t4_handle_intr_status(adapter, 4156U, (struct intr_info const *)(& t4t5_sge_intr_info)); v = (u64 )tmp___2 | v; } else { } err = t4_read_reg(adapter, 4352U); if ((err & 131072U) != 0U) { dev_err((struct device const *)adapter->pdev_dev, "SGE error for queue %u\n", err & 131071U); if ((err & 262144U) != 0U) { dev_err((struct device const *)adapter->pdev_dev, "SGE UNCAPTURED_ERROR set (clearing)\n"); } else { } t4_write_reg(adapter, 4352U, 393216U); } else { } if (v != 0ULL) { t4_fatal_err(adapter); } else { } return; } } static void cim_intr_handler(struct adapter *adapter ) { struct intr_info cim_intr_info[8U] ; struct intr_info cim_upintr_info[29U] ; int fat ; u32 tmp ; int tmp___0 ; int tmp___1 ; { cim_intr_info[0].mask = 2U; cim_intr_info[0].msg = "CIM control register prefetch drop"; cim_intr_info[0].stat_idx = -1; cim_intr_info[0].fatal = 1U; cim_intr_info[0].int_handler = 0; cim_intr_info[1].mask = 2016U; cim_intr_info[1].msg = "CIM OBQ parity error"; cim_intr_info[1].stat_idx = -1; cim_intr_info[1].fatal = 1U; cim_intr_info[1].int_handler = 0; cim_intr_info[2].mask = 129024U; cim_intr_info[2].msg = "CIM IBQ parity error"; cim_intr_info[2].stat_idx = -1; cim_intr_info[2].fatal = 1U; cim_intr_info[2].int_handler = 0; cim_intr_info[3].mask = 131072U; cim_intr_info[3].msg = "CIM mailbox uP parity error"; cim_intr_info[3].stat_idx = -1; cim_intr_info[3].fatal = 1U; cim_intr_info[3].int_handler = 0; cim_intr_info[4].mask = 262144U; cim_intr_info[4].msg = "CIM mailbox host parity error"; cim_intr_info[4].stat_idx = -1; cim_intr_info[4].fatal = 1U; cim_intr_info[4].int_handler = 0; cim_intr_info[5].mask = 524288U; cim_intr_info[5].msg = "CIM TIEQ outgoing parity error"; cim_intr_info[5].stat_idx = -1; cim_intr_info[5].fatal = 1U; cim_intr_info[5].int_handler = 0; cim_intr_info[6].mask = 1048576U; cim_intr_info[6].msg = "CIM TIEQ incoming parity error"; cim_intr_info[6].stat_idx = -1; cim_intr_info[6].fatal = 1U; cim_intr_info[6].int_handler = 0; cim_intr_info[7].mask = 0U; cim_intr_info[7].msg = 0; cim_intr_info[7].stat_idx = (short)0; cim_intr_info[7].fatal = (unsigned short)0; cim_intr_info[7].int_handler = 0; cim_upintr_info[0].mask = 1U; cim_upintr_info[0].msg = "CIM reserved space access"; cim_upintr_info[0].stat_idx = -1; cim_upintr_info[0].fatal = 1U; cim_upintr_info[0].int_handler = 0; cim_upintr_info[1].mask = 2U; cim_upintr_info[1].msg = "CIM illegal transaction"; cim_upintr_info[1].stat_idx = -1; cim_upintr_info[1].fatal = 1U; cim_upintr_info[1].int_handler = 0; cim_upintr_info[2].mask = 4U; cim_upintr_info[2].msg = "CIM illegal write"; cim_upintr_info[2].stat_idx = -1; cim_upintr_info[2].fatal = 1U; cim_upintr_info[2].int_handler = 0; cim_upintr_info[3].mask = 8U; cim_upintr_info[3].msg = "CIM illegal read"; cim_upintr_info[3].stat_idx = -1; cim_upintr_info[3].fatal = 1U; cim_upintr_info[3].int_handler = 0; cim_upintr_info[4].mask = 16U; cim_upintr_info[4].msg = "CIM illegal read BE"; cim_upintr_info[4].stat_idx = -1; cim_upintr_info[4].fatal = 1U; cim_upintr_info[4].int_handler = 0; cim_upintr_info[5].mask = 32U; cim_upintr_info[5].msg = "CIM illegal write BE"; cim_upintr_info[5].stat_idx = -1; cim_upintr_info[5].fatal = 1U; cim_upintr_info[5].int_handler = 0; cim_upintr_info[6].mask = 64U; cim_upintr_info[6].msg = "CIM single read from boot space"; cim_upintr_info[6].stat_idx = -1; cim_upintr_info[6].fatal = 1U; cim_upintr_info[6].int_handler = 0; cim_upintr_info[7].mask = 128U; cim_upintr_info[7].msg = "CIM single write to boot space"; cim_upintr_info[7].stat_idx = -1; cim_upintr_info[7].fatal = 1U; cim_upintr_info[7].int_handler = 0; cim_upintr_info[8].mask = 512U; cim_upintr_info[8].msg = "CIM block write to boot space"; cim_upintr_info[8].stat_idx = -1; cim_upintr_info[8].fatal = 1U; cim_upintr_info[8].int_handler = 0; cim_upintr_info[9].mask = 1024U; cim_upintr_info[9].msg = "CIM single read from flash space"; cim_upintr_info[9].stat_idx = -1; cim_upintr_info[9].fatal = 1U; cim_upintr_info[9].int_handler = 0; cim_upintr_info[10].mask = 2048U; cim_upintr_info[10].msg = "CIM single write to flash space"; cim_upintr_info[10].stat_idx = -1; cim_upintr_info[10].fatal = 1U; cim_upintr_info[10].int_handler = 0; cim_upintr_info[11].mask = 8192U; cim_upintr_info[11].msg = "CIM block write to flash space"; cim_upintr_info[11].stat_idx = -1; cim_upintr_info[11].fatal = 1U; cim_upintr_info[11].int_handler = 0; cim_upintr_info[12].mask = 16384U; cim_upintr_info[12].msg = "CIM single EEPROM read"; cim_upintr_info[12].stat_idx = -1; cim_upintr_info[12].fatal = 1U; cim_upintr_info[12].int_handler = 0; cim_upintr_info[13].mask = 32768U; cim_upintr_info[13].msg = "CIM single EEPROM write"; cim_upintr_info[13].stat_idx = -1; cim_upintr_info[13].fatal = 1U; cim_upintr_info[13].int_handler = 0; cim_upintr_info[14].mask = 65536U; cim_upintr_info[14].msg = "CIM block EEPROM read"; cim_upintr_info[14].stat_idx = -1; cim_upintr_info[14].fatal = 1U; cim_upintr_info[14].int_handler = 0; cim_upintr_info[15].mask = 131072U; cim_upintr_info[15].msg = "CIM block EEPROM write"; cim_upintr_info[15].stat_idx = -1; cim_upintr_info[15].fatal = 1U; cim_upintr_info[15].int_handler = 0; cim_upintr_info[16].mask = 262144U; cim_upintr_info[16].msg = "CIM single read from CTL space"; cim_upintr_info[16].stat_idx = -1; cim_upintr_info[16].fatal = 1U; cim_upintr_info[16].int_handler = 0; cim_upintr_info[17].mask = 524288U; cim_upintr_info[17].msg = "CIM single write to CTL space"; cim_upintr_info[17].stat_idx = -1; cim_upintr_info[17].fatal = 1U; cim_upintr_info[17].int_handler = 0; cim_upintr_info[18].mask = 1048576U; cim_upintr_info[18].msg = "CIM block read from CTL space"; cim_upintr_info[18].stat_idx = -1; cim_upintr_info[18].fatal = 1U; cim_upintr_info[18].int_handler = 0; cim_upintr_info[19].mask = 2097152U; cim_upintr_info[19].msg = "CIM block write to CTL space"; cim_upintr_info[19].stat_idx = -1; cim_upintr_info[19].fatal = 1U; cim_upintr_info[19].int_handler = 0; cim_upintr_info[20].mask = 4194304U; cim_upintr_info[20].msg = "CIM single read from PL space"; cim_upintr_info[20].stat_idx = -1; cim_upintr_info[20].fatal = 1U; cim_upintr_info[20].int_handler = 0; cim_upintr_info[21].mask = 8388608U; cim_upintr_info[21].msg = "CIM single write to PL space"; cim_upintr_info[21].stat_idx = -1; cim_upintr_info[21].fatal = 1U; cim_upintr_info[21].int_handler = 0; cim_upintr_info[22].mask = 16777216U; cim_upintr_info[22].msg = "CIM block read from PL space"; cim_upintr_info[22].stat_idx = -1; cim_upintr_info[22].fatal = 1U; cim_upintr_info[22].int_handler = 0; cim_upintr_info[23].mask = 33554432U; cim_upintr_info[23].msg = "CIM block write to PL space"; cim_upintr_info[23].stat_idx = -1; cim_upintr_info[23].fatal = 1U; cim_upintr_info[23].int_handler = 0; cim_upintr_info[24].mask = 67108864U; cim_upintr_info[24].msg = "CIM request FIFO overwrite"; cim_upintr_info[24].stat_idx = -1; cim_upintr_info[24].fatal = 1U; cim_upintr_info[24].int_handler = 0; cim_upintr_info[25].mask = 134217728U; cim_upintr_info[25].msg = "CIM response FIFO overwrite"; cim_upintr_info[25].stat_idx = -1; cim_upintr_info[25].fatal = 1U; cim_upintr_info[25].int_handler = 0; cim_upintr_info[26].mask = 268435456U; cim_upintr_info[26].msg = "CIM PIF timeout"; cim_upintr_info[26].stat_idx = -1; cim_upintr_info[26].fatal = 1U; cim_upintr_info[26].int_handler = 0; cim_upintr_info[27].mask = 536870912U; cim_upintr_info[27].msg = "CIM PIF MA timeout"; cim_upintr_info[27].stat_idx = -1; cim_upintr_info[27].fatal = 1U; cim_upintr_info[27].int_handler = 0; cim_upintr_info[28].mask = 0U; cim_upintr_info[28].msg = 0; cim_upintr_info[28].stat_idx = (short)0; cim_upintr_info[28].fatal = (unsigned short)0; cim_upintr_info[28].int_handler = 0; tmp = t4_read_reg(adapter, 12472U); if ((int )tmp < 0) { t4_report_fw_error(adapter); } else { } tmp___0 = t4_handle_intr_status(adapter, 31532U, (struct intr_info const *)(& cim_intr_info)); tmp___1 = t4_handle_intr_status(adapter, 31540U, (struct intr_info const *)(& cim_upintr_info)); fat = tmp___0 + tmp___1; if (fat != 0) { t4_fatal_err(adapter); } else { } return; } } static void ulprx_intr_handler(struct adapter *adapter ) { struct intr_info ulprx_intr_info[3U] ; int tmp ; { ulprx_intr_info[0].mask = 25165824U; ulprx_intr_info[0].msg = "ULPRX context error"; ulprx_intr_info[0].stat_idx = -1; ulprx_intr_info[0].fatal = 1U; ulprx_intr_info[0].int_handler = 0; ulprx_intr_info[1].mask = 8388607U; ulprx_intr_info[1].msg = "ULPRX parity error"; ulprx_intr_info[1].stat_idx = -1; ulprx_intr_info[1].fatal = 1U; ulprx_intr_info[1].int_handler = 0; ulprx_intr_info[2].mask = 0U; ulprx_intr_info[2].msg = 0; ulprx_intr_info[2].stat_idx = (short)0; ulprx_intr_info[2].fatal = (unsigned short)0; ulprx_intr_info[2].int_handler = 0; tmp = t4_handle_intr_status(adapter, 102744U, (struct intr_info const *)(& ulprx_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void ulptx_intr_handler(struct adapter *adapter ) { struct intr_info ulptx_intr_info[6U] ; int tmp ; { ulptx_intr_info[0].mask = 2147483648U; ulptx_intr_info[0].msg = "ULPTX channel 3 PBL out of bounds"; ulptx_intr_info[0].stat_idx = -1; ulptx_intr_info[0].fatal = 0U; ulptx_intr_info[0].int_handler = 0; ulptx_intr_info[1].mask = 1073741824U; ulptx_intr_info[1].msg = "ULPTX channel 2 PBL out of bounds"; ulptx_intr_info[1].stat_idx = -1; ulptx_intr_info[1].fatal = 0U; ulptx_intr_info[1].int_handler = 0; ulptx_intr_info[2].mask = 536870912U; ulptx_intr_info[2].msg = "ULPTX channel 1 PBL out of bounds"; ulptx_intr_info[2].stat_idx = -1; ulptx_intr_info[2].fatal = 0U; ulptx_intr_info[2].int_handler = 0; ulptx_intr_info[3].mask = 268435456U; ulptx_intr_info[3].msg = "ULPTX channel 0 PBL out of bounds"; ulptx_intr_info[3].stat_idx = -1; ulptx_intr_info[3].fatal = 0U; ulptx_intr_info[3].int_handler = 0; ulptx_intr_info[4].mask = 268435455U; ulptx_intr_info[4].msg = "ULPTX parity error"; ulptx_intr_info[4].stat_idx = -1; ulptx_intr_info[4].fatal = 1U; ulptx_intr_info[4].int_handler = 0; ulptx_intr_info[5].mask = 0U; ulptx_intr_info[5].msg = 0; ulptx_intr_info[5].stat_idx = (short)0; ulptx_intr_info[5].fatal = (unsigned short)0; ulptx_intr_info[5].int_handler = 0; tmp = t4_handle_intr_status(adapter, 36300U, (struct intr_info const *)(& ulptx_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void pmtx_intr_handler(struct adapter *adapter ) { struct intr_info pmtx_intr_info[10U] ; int tmp ; { pmtx_intr_info[0].mask = 2147483648U; pmtx_intr_info[0].msg = "PMTX channel 0 pcmd too large"; pmtx_intr_info[0].stat_idx = -1; pmtx_intr_info[0].fatal = 1U; pmtx_intr_info[0].int_handler = 0; pmtx_intr_info[1].mask = 1073741824U; pmtx_intr_info[1].msg = "PMTX channel 1 pcmd too large"; pmtx_intr_info[1].stat_idx = -1; pmtx_intr_info[1].fatal = 1U; pmtx_intr_info[1].int_handler = 0; pmtx_intr_info[2].mask = 536870912U; pmtx_intr_info[2].msg = "PMTX channel 2 pcmd too large"; pmtx_intr_info[2].stat_idx = -1; pmtx_intr_info[2].fatal = 1U; pmtx_intr_info[2].int_handler = 0; pmtx_intr_info[3].mask = 268435456U; pmtx_intr_info[3].msg = "PMTX 0-length pcmd"; pmtx_intr_info[3].stat_idx = -1; pmtx_intr_info[3].fatal = 1U; pmtx_intr_info[3].int_handler = 0; pmtx_intr_info[4].mask = 268435440U; pmtx_intr_info[4].msg = "PMTX framing error"; pmtx_intr_info[4].stat_idx = -1; pmtx_intr_info[4].fatal = 1U; pmtx_intr_info[4].int_handler = 0; pmtx_intr_info[5].mask = 8U; pmtx_intr_info[5].msg = "PMTX oespi parity error"; pmtx_intr_info[5].stat_idx = -1; pmtx_intr_info[5].fatal = 1U; pmtx_intr_info[5].int_handler = 0; pmtx_intr_info[6].mask = 4U; pmtx_intr_info[6].msg = "PMTX db_options parity error"; pmtx_intr_info[6].stat_idx = -1; pmtx_intr_info[6].fatal = 1U; pmtx_intr_info[6].int_handler = 0; pmtx_intr_info[7].mask = 2U; pmtx_intr_info[7].msg = "PMTX icspi parity error"; pmtx_intr_info[7].stat_idx = -1; pmtx_intr_info[7].fatal = 1U; pmtx_intr_info[7].int_handler = 0; pmtx_intr_info[8].mask = 1U; pmtx_intr_info[8].msg = "PMTX c_pcmd parity error"; pmtx_intr_info[8].stat_idx = -1; pmtx_intr_info[8].fatal = 1U; pmtx_intr_info[8].int_handler = 0; pmtx_intr_info[9].mask = 0U; pmtx_intr_info[9].msg = 0; pmtx_intr_info[9].stat_idx = (short)0; pmtx_intr_info[9].fatal = (unsigned short)0; pmtx_intr_info[9].int_handler = 0; tmp = t4_handle_intr_status(adapter, 36860U, (struct intr_info const *)(& pmtx_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void pmrx_intr_handler(struct adapter *adapter ) { struct intr_info pmrx_intr_info[7U] ; int tmp ; { pmrx_intr_info[0].mask = 4194304U; pmrx_intr_info[0].msg = "PMRX 0-length pcmd"; pmrx_intr_info[0].stat_idx = -1; pmrx_intr_info[0].fatal = 1U; pmrx_intr_info[0].int_handler = 0; pmrx_intr_info[1].mask = 4194288U; pmrx_intr_info[1].msg = "PMRX framing error"; pmrx_intr_info[1].stat_idx = -1; pmrx_intr_info[1].fatal = 1U; pmrx_intr_info[1].int_handler = 0; pmrx_intr_info[2].mask = 8U; pmrx_intr_info[2].msg = "PMRX ocspi parity error"; pmrx_intr_info[2].stat_idx = -1; pmrx_intr_info[2].fatal = 1U; pmrx_intr_info[2].int_handler = 0; pmrx_intr_info[3].mask = 4U; pmrx_intr_info[3].msg = "PMRX db_options parity error"; pmrx_intr_info[3].stat_idx = -1; pmrx_intr_info[3].fatal = 1U; pmrx_intr_info[3].int_handler = 0; pmrx_intr_info[4].mask = 2U; pmrx_intr_info[4].msg = "PMRX iespi parity error"; pmrx_intr_info[4].stat_idx = -1; pmrx_intr_info[4].fatal = 1U; pmrx_intr_info[4].int_handler = 0; pmrx_intr_info[5].mask = 1U; pmrx_intr_info[5].msg = "PMRX e_pcmd parity error"; pmrx_intr_info[5].stat_idx = -1; pmrx_intr_info[5].fatal = 1U; pmrx_intr_info[5].int_handler = 0; pmrx_intr_info[6].mask = 0U; pmrx_intr_info[6].msg = 0; pmrx_intr_info[6].stat_idx = (short)0; pmrx_intr_info[6].fatal = (unsigned short)0; pmrx_intr_info[6].int_handler = 0; tmp = t4_handle_intr_status(adapter, 36828U, (struct intr_info const *)(& pmrx_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void cplsw_intr_handler(struct adapter *adapter ) { struct intr_info cplsw_intr_info[7U] ; int tmp ; { cplsw_intr_info[0].mask = 32U; cplsw_intr_info[0].msg = "CPLSW CIM op_map parity error"; cplsw_intr_info[0].stat_idx = -1; cplsw_intr_info[0].fatal = 1U; cplsw_intr_info[0].int_handler = 0; cplsw_intr_info[1].mask = 16U; cplsw_intr_info[1].msg = "CPLSW CIM overflow"; cplsw_intr_info[1].stat_idx = -1; cplsw_intr_info[1].fatal = 1U; cplsw_intr_info[1].int_handler = 0; cplsw_intr_info[2].mask = 8U; cplsw_intr_info[2].msg = "CPLSW TP framing error"; cplsw_intr_info[2].stat_idx = -1; cplsw_intr_info[2].fatal = 1U; cplsw_intr_info[2].int_handler = 0; cplsw_intr_info[3].mask = 4U; cplsw_intr_info[3].msg = "CPLSW SGE framing error"; cplsw_intr_info[3].stat_idx = -1; cplsw_intr_info[3].fatal = 1U; cplsw_intr_info[3].int_handler = 0; cplsw_intr_info[4].mask = 2U; cplsw_intr_info[4].msg = "CPLSW CIM framing error"; cplsw_intr_info[4].stat_idx = -1; cplsw_intr_info[4].fatal = 1U; cplsw_intr_info[4].int_handler = 0; cplsw_intr_info[5].mask = 1U; cplsw_intr_info[5].msg = "CPLSW no-switch error"; cplsw_intr_info[5].stat_idx = -1; cplsw_intr_info[5].fatal = 1U; cplsw_intr_info[5].int_handler = 0; cplsw_intr_info[6].mask = 0U; cplsw_intr_info[6].msg = 0; cplsw_intr_info[6].stat_idx = (short)0; cplsw_intr_info[6].fatal = (unsigned short)0; cplsw_intr_info[6].int_handler = 0; tmp = t4_handle_intr_status(adapter, 102484U, (struct intr_info const *)(& cplsw_intr_info)); if (tmp != 0) { t4_fatal_err(adapter); } else { } return; } } static void le_intr_handler(struct adapter *adap ) { enum chip_type chip ; struct intr_info le_intr_info[6U] ; struct intr_info t6_le_intr_info[6U] ; int tmp ; { chip = ((unsigned int )adap->params.chip >> 4) & 15U; le_intr_info[0].mask = 32U; le_intr_info[0].msg = "LE LIP miss"; le_intr_info[0].stat_idx = -1; le_intr_info[0].fatal = 0U; le_intr_info[0].int_handler = 0; le_intr_info[1].mask = 16U; le_intr_info[1].msg = "LE 0 LIP error"; le_intr_info[1].stat_idx = -1; le_intr_info[1].fatal = 0U; le_intr_info[1].int_handler = 0; le_intr_info[2].mask = 64U; le_intr_info[2].msg = "LE parity error"; le_intr_info[2].stat_idx = -1; le_intr_info[2].fatal = 1U; le_intr_info[2].int_handler = 0; le_intr_info[3].mask = 32768U; le_intr_info[3].msg = "LE unknown command"; le_intr_info[3].stat_idx = -1; le_intr_info[3].fatal = 1U; le_intr_info[3].int_handler = 0; le_intr_info[4].mask = 65536U; le_intr_info[4].msg = "LE request queue parity error"; le_intr_info[4].stat_idx = -1; le_intr_info[4].fatal = 1U; le_intr_info[4].int_handler = 0; le_intr_info[5].mask = 0U; le_intr_info[5].msg = 0; le_intr_info[5].stat_idx = (short)0; le_intr_info[5].fatal = (unsigned short)0; le_intr_info[5].int_handler = 0; t6_le_intr_info[0].mask = 2U; t6_le_intr_info[0].msg = "LE LIP miss"; t6_le_intr_info[0].stat_idx = -1; t6_le_intr_info[0].fatal = 0U; t6_le_intr_info[0].int_handler = 0; t6_le_intr_info[1].mask = 4U; t6_le_intr_info[1].msg = "LE 0 LIP error"; t6_le_intr_info[1].stat_idx = -1; t6_le_intr_info[1].fatal = 0U; t6_le_intr_info[1].int_handler = 0; t6_le_intr_info[2].mask = 8192U; t6_le_intr_info[2].msg = "LE parity error"; t6_le_intr_info[2].stat_idx = -1; t6_le_intr_info[2].fatal = 1U; t6_le_intr_info[2].int_handler = 0; t6_le_intr_info[3].mask = 8U; t6_le_intr_info[3].msg = "LE unknown command"; t6_le_intr_info[3].stat_idx = -1; t6_le_intr_info[3].fatal = 1U; t6_le_intr_info[3].int_handler = 0; t6_le_intr_info[4].mask = 1024U; t6_le_intr_info[4].msg = "LE request queue parity error"; t6_le_intr_info[4].stat_idx = -1; t6_le_intr_info[4].fatal = 1U; t6_le_intr_info[4].int_handler = 0; t6_le_intr_info[5].mask = 0U; t6_le_intr_info[5].msg = 0; t6_le_intr_info[5].stat_idx = (short)0; t6_le_intr_info[5].fatal = (unsigned short)0; t6_le_intr_info[5].int_handler = 0; tmp = t4_handle_intr_status(adap, 105532U, (unsigned int )chip <= 5U ? (struct intr_info const *)(& le_intr_info) : (struct intr_info const *)(& t6_le_intr_info)); if (tmp != 0) { t4_fatal_err(adap); } else { } return; } } static void mps_intr_handler(struct adapter *adapter ) { struct intr_info mps_rx_intr_info[2U] ; struct intr_info mps_tx_intr_info[8U] ; struct intr_info mps_trc_intr_info[4U] ; struct intr_info mps_stat_sram_intr_info[2U] ; struct intr_info mps_stat_tx_intr_info[2U] ; struct intr_info mps_stat_rx_intr_info[2U] ; struct intr_info mps_cls_intr_info[4U] ; int fat ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; { mps_rx_intr_info[0].mask = 16777215U; mps_rx_intr_info[0].msg = "MPS Rx parity error"; mps_rx_intr_info[0].stat_idx = -1; mps_rx_intr_info[0].fatal = 1U; mps_rx_intr_info[0].int_handler = 0; mps_rx_intr_info[1].mask = 0U; mps_rx_intr_info[1].msg = 0; mps_rx_intr_info[1].stat_idx = (short)0; mps_rx_intr_info[1].fatal = (unsigned short)0; mps_rx_intr_info[1].int_handler = 0; mps_tx_intr_info[0].mask = 15U; mps_tx_intr_info[0].msg = "MPS Tx TP FIFO parity error"; mps_tx_intr_info[0].stat_idx = -1; mps_tx_intr_info[0].fatal = 1U; mps_tx_intr_info[0].int_handler = 0; mps_tx_intr_info[1].mask = 16U; mps_tx_intr_info[1].msg = "MPS Tx NC-SI FIFO parity error"; mps_tx_intr_info[1].stat_idx = -1; mps_tx_intr_info[1].fatal = 1U; mps_tx_intr_info[1].int_handler = 0; mps_tx_intr_info[2].mask = 480U; mps_tx_intr_info[2].msg = "MPS Tx data FIFO parity error"; mps_tx_intr_info[2].stat_idx = -1; mps_tx_intr_info[2].fatal = 1U; mps_tx_intr_info[2].int_handler = 0; mps_tx_intr_info[3].mask = 7680U; mps_tx_intr_info[3].msg = "MPS Tx desc FIFO parity error"; mps_tx_intr_info[3].stat_idx = -1; mps_tx_intr_info[3].fatal = 1U; mps_tx_intr_info[3].int_handler = 0; mps_tx_intr_info[4].mask = 8192U; mps_tx_intr_info[4].msg = "MPS Tx underflow"; mps_tx_intr_info[4].stat_idx = -1; mps_tx_intr_info[4].fatal = 1U; mps_tx_intr_info[4].int_handler = 0; mps_tx_intr_info[5].mask = 16384U; mps_tx_intr_info[5].msg = "MPS Tx SOP/EOP error"; mps_tx_intr_info[5].stat_idx = -1; mps_tx_intr_info[5].fatal = 1U; mps_tx_intr_info[5].int_handler = 0; mps_tx_intr_info[6].mask = 32768U; mps_tx_intr_info[6].msg = "MPS Tx framing error"; mps_tx_intr_info[6].stat_idx = -1; mps_tx_intr_info[6].fatal = 1U; mps_tx_intr_info[6].int_handler = 0; mps_tx_intr_info[7].mask = 0U; mps_tx_intr_info[7].msg = 0; mps_tx_intr_info[7].stat_idx = (short)0; mps_tx_intr_info[7].fatal = (unsigned short)0; mps_tx_intr_info[7].int_handler = 0; mps_trc_intr_info[0].mask = 15U; mps_trc_intr_info[0].msg = "MPS TRC filter parity error"; mps_trc_intr_info[0].stat_idx = -1; mps_trc_intr_info[0].fatal = 1U; mps_trc_intr_info[0].int_handler = 0; mps_trc_intr_info[1].mask = 240U; mps_trc_intr_info[1].msg = "MPS TRC packet FIFO parity error"; mps_trc_intr_info[1].stat_idx = -1; mps_trc_intr_info[1].fatal = 1U; mps_trc_intr_info[1].int_handler = 0; mps_trc_intr_info[2].mask = 256U; mps_trc_intr_info[2].msg = "MPS TRC misc parity error"; mps_trc_intr_info[2].stat_idx = -1; mps_trc_intr_info[2].fatal = 1U; mps_trc_intr_info[2].int_handler = 0; mps_trc_intr_info[3].mask = 0U; mps_trc_intr_info[3].msg = 0; mps_trc_intr_info[3].stat_idx = (short)0; mps_trc_intr_info[3].fatal = (unsigned short)0; mps_trc_intr_info[3].int_handler = 0; mps_stat_sram_intr_info[0].mask = 2097151U; mps_stat_sram_intr_info[0].msg = "MPS statistics SRAM parity error"; mps_stat_sram_intr_info[0].stat_idx = -1; mps_stat_sram_intr_info[0].fatal = 1U; mps_stat_sram_intr_info[0].int_handler = 0; mps_stat_sram_intr_info[1].mask = 0U; mps_stat_sram_intr_info[1].msg = 0; mps_stat_sram_intr_info[1].stat_idx = (short)0; mps_stat_sram_intr_info[1].fatal = (unsigned short)0; mps_stat_sram_intr_info[1].int_handler = 0; mps_stat_tx_intr_info[0].mask = 1048575U; mps_stat_tx_intr_info[0].msg = "MPS statistics Tx FIFO parity error"; mps_stat_tx_intr_info[0].stat_idx = -1; mps_stat_tx_intr_info[0].fatal = 1U; mps_stat_tx_intr_info[0].int_handler = 0; mps_stat_tx_intr_info[1].mask = 0U; mps_stat_tx_intr_info[1].msg = 0; mps_stat_tx_intr_info[1].stat_idx = (short)0; mps_stat_tx_intr_info[1].fatal = (unsigned short)0; mps_stat_tx_intr_info[1].int_handler = 0; mps_stat_rx_intr_info[0].mask = 16777215U; mps_stat_rx_intr_info[0].msg = "MPS statistics Rx FIFO parity error"; mps_stat_rx_intr_info[0].stat_idx = -1; mps_stat_rx_intr_info[0].fatal = 1U; mps_stat_rx_intr_info[0].int_handler = 0; mps_stat_rx_intr_info[1].mask = 0U; mps_stat_rx_intr_info[1].msg = 0; mps_stat_rx_intr_info[1].stat_idx = (short)0; mps_stat_rx_intr_info[1].fatal = (unsigned short)0; mps_stat_rx_intr_info[1].int_handler = 0; mps_cls_intr_info[0].mask = 1U; mps_cls_intr_info[0].msg = "MPS match SRAM parity error"; mps_cls_intr_info[0].stat_idx = -1; mps_cls_intr_info[0].fatal = 1U; mps_cls_intr_info[0].int_handler = 0; mps_cls_intr_info[1].mask = 2U; mps_cls_intr_info[1].msg = "MPS match TCAM parity error"; mps_cls_intr_info[1].stat_idx = -1; mps_cls_intr_info[1].fatal = 1U; mps_cls_intr_info[1].int_handler = 0; mps_cls_intr_info[2].mask = 4U; mps_cls_intr_info[2].msg = "MPS hash SRAM parity error"; mps_cls_intr_info[2].stat_idx = -1; mps_cls_intr_info[2].fatal = 1U; mps_cls_intr_info[2].int_handler = 0; mps_cls_intr_info[3].mask = 0U; mps_cls_intr_info[3].msg = 0; mps_cls_intr_info[3].stat_idx = (short)0; mps_cls_intr_info[3].fatal = (unsigned short)0; mps_cls_intr_info[3].int_handler = 0; tmp = t4_handle_intr_status(adapter, 69748U, (struct intr_info const *)(& mps_rx_intr_info)); tmp___0 = t4_handle_intr_status(adapter, 37896U, (struct intr_info const *)(& mps_tx_intr_info)); tmp___1 = t4_handle_intr_status(adapter, 39004U, (struct intr_info const *)(& mps_trc_intr_info)); tmp___2 = t4_handle_intr_status(adapter, 38420U, (struct intr_info const *)(& mps_stat_sram_intr_info)); tmp___3 = t4_handle_intr_status(adapter, 38432U, (struct intr_info const *)(& mps_stat_tx_intr_info)); tmp___4 = t4_handle_intr_status(adapter, 38444U, (struct intr_info const *)(& mps_stat_rx_intr_info)); tmp___5 = t4_handle_intr_status(adapter, 53288U, (struct intr_info const *)(& mps_cls_intr_info)); fat = (((((tmp + tmp___0) + tmp___1) + tmp___2) + tmp___3) + tmp___4) + tmp___5; t4_write_reg(adapter, 36872U, 0U); t4_read_reg(adapter, 36872U); if (fat != 0) { t4_fatal_err(adapter); } else { } return; } } static void mem_intr_handler(struct adapter *adapter , int idx ) { char name[4U][7U] ; unsigned int tmp ; unsigned int tmp___0 ; unsigned int tmp___1 ; unsigned int addr ; unsigned int cnt_addr ; unsigned int v ; int tmp___2 ; u32 tmp___3 ; u32 cnt ; u32 tmp___4 ; int tmp___5 ; { name[0][0] = 'E'; name[0][1] = 'D'; name[0][2] = 'C'; name[0][3] = '0'; name[0][4] = '\000'; tmp = 5U; while (1) { if (tmp >= 7U) { break; } else { } name[0][tmp] = (char)0; tmp = tmp + 1U; } name[1][0] = 'E'; name[1][1] = 'D'; name[1][2] = 'C'; name[1][3] = '1'; name[1][4] = '\000'; tmp___0 = 5U; while (1) { if (tmp___0 >= 7U) { break; } else { } name[1][tmp___0] = (char)0; tmp___0 = tmp___0 + 1U; } name[2][0] = 'M'; name[2][1] = 'C'; name[2][2] = '/'; name[2][3] = 'M'; name[2][4] = 'C'; name[2][5] = '0'; name[2][6] = '\000'; name[3][0] = 'M'; name[3][1] = 'C'; name[3][2] = '1'; name[3][3] = '\000'; tmp___1 = 4U; while (1) { if (tmp___1 >= 7U) { break; } else { } name[3][tmp___1] = (char)0; tmp___1 = tmp___1 + 1U; } if (idx <= 1) { addr = (unsigned int )(idx * 128 + 31096); cnt_addr = (unsigned int )(idx * 128 + 31100); } else if (idx == 2) { tmp___2 = is_t4(adapter->params.chip); if (tmp___2 != 0) { addr = 29976U; cnt_addr = 29980U; } else { addr = 267032U; cnt_addr = 267036U; } } else { addr = 299800U; cnt_addr = 299804U; } tmp___3 = t4_read_reg(adapter, addr); v = tmp___3 & 7U; if ((int )v & 1) { dev_alert((struct device const *)adapter->pdev_dev, "%s FIFO parity error\n", (char const *)(& name) + (unsigned long )idx); } else { } if ((v & 2U) != 0U) { tmp___4 = t4_read_reg(adapter, cnt_addr); cnt = tmp___4 >> 16; t4_write_reg(adapter, cnt_addr, 4294901760U); tmp___5 = __printk_ratelimit("mem_intr_handler"); if (tmp___5 != 0) { dev_warn((struct device const *)adapter->pdev_dev, "%u %s correctable ECC data error%s\n", cnt, (char const *)(& name) + (unsigned long )idx, cnt > 1U ? (char *)"s" : (char *)""); } else { } } else { } if ((v & 4U) != 0U) { dev_alert((struct device const *)adapter->pdev_dev, "%s uncorrectable ECC data error\n", (char const *)(& name) + (unsigned long )idx); } else { } t4_write_reg(adapter, addr, v); if ((v & 5U) != 0U) { t4_fatal_err(adapter); } else { } return; } } static void ma_intr_handler(struct adapter *adap ) { u32 v ; u32 status ; u32 tmp ; u32 tmp___0 ; u32 tmp___1 ; int tmp___2 ; { tmp = t4_read_reg(adap, 30688U); status = tmp; if ((status & 2U) != 0U) { tmp___0 = t4_read_reg(adap, 30708U); dev_alert((struct device const *)adap->pdev_dev, "MA parity error, parity status %#x\n", tmp___0); tmp___2 = is_t5(adap->params.chip); if (tmp___2 != 0) { tmp___1 = t4_read_reg(adap, 30724U); dev_alert((struct device const *)adap->pdev_dev, "MA parity error, parity status %#x\n", tmp___1); } else { } } else { } if ((int )status & 1) { v = t4_read_reg(adap, 30692U); dev_alert((struct device const *)adap->pdev_dev, "MA address wrap-around error by client %u to address %#x\n", v & 15U, v & 4294967280U); } else { } t4_write_reg(adap, 30688U, status); t4_fatal_err(adap); return; } } static void smb_intr_handler(struct adapter *adap ) { struct intr_info smb_intr_info[4U] ; int tmp ; { smb_intr_info[0].mask = 2097152U; smb_intr_info[0].msg = "SMB master Tx FIFO parity error"; smb_intr_info[0].stat_idx = -1; smb_intr_info[0].fatal = 1U; smb_intr_info[0].int_handler = 0; smb_intr_info[1].mask = 1048576U; smb_intr_info[1].msg = "SMB master Rx FIFO parity error"; smb_intr_info[1].stat_idx = -1; smb_intr_info[1].fatal = 1U; smb_intr_info[1].int_handler = 0; smb_intr_info[2].mask = 524288U; smb_intr_info[2].msg = "SMB slave FIFO parity error"; smb_intr_info[2].stat_idx = -1; smb_intr_info[2].fatal = 1U; smb_intr_info[2].int_handler = 0; smb_intr_info[3].mask = 0U; smb_intr_info[3].msg = 0; smb_intr_info[3].stat_idx = (short)0; smb_intr_info[3].fatal = (unsigned short)0; smb_intr_info[3].int_handler = 0; tmp = t4_handle_intr_status(adap, 102544U, (struct intr_info const *)(& smb_intr_info)); if (tmp != 0) { t4_fatal_err(adap); } else { } return; } } static void ncsi_intr_handler(struct adapter *adap ) { struct intr_info ncsi_intr_info[5U] ; int tmp ; { ncsi_intr_info[0].mask = 256U; ncsi_intr_info[0].msg = "NC-SI CIM parity error"; ncsi_intr_info[0].stat_idx = -1; ncsi_intr_info[0].fatal = 1U; ncsi_intr_info[0].int_handler = 0; ncsi_intr_info[1].mask = 128U; ncsi_intr_info[1].msg = "NC-SI MPS parity error"; ncsi_intr_info[1].stat_idx = -1; ncsi_intr_info[1].fatal = 1U; ncsi_intr_info[1].int_handler = 0; ncsi_intr_info[2].mask = 2U; ncsi_intr_info[2].msg = "NC-SI Tx FIFO parity error"; ncsi_intr_info[2].stat_idx = -1; ncsi_intr_info[2].fatal = 1U; ncsi_intr_info[2].int_handler = 0; ncsi_intr_info[3].mask = 1U; ncsi_intr_info[3].msg = "NC-SI Rx FIFO parity error"; ncsi_intr_info[3].stat_idx = -1; ncsi_intr_info[3].fatal = 1U; ncsi_intr_info[3].int_handler = 0; ncsi_intr_info[4].mask = 0U; ncsi_intr_info[4].msg = 0; ncsi_intr_info[4].stat_idx = (short)0; ncsi_intr_info[4].fatal = (unsigned short)0; ncsi_intr_info[4].int_handler = 0; tmp = t4_handle_intr_status(adap, 106712U, (struct intr_info const *)(& ncsi_intr_info)); if (tmp != 0) { t4_fatal_err(adap); } else { } return; } } static void xgmac_intr_handler(struct adapter *adap , int port ) { u32 v ; u32 int_cause_reg ; int tmp ; { tmp = is_t4(adap->params.chip); if (tmp != 0) { int_cause_reg = (u32 )((port + 16) * 8192 + 4316); } else { int_cause_reg = (u32 )((port + 12) * 16384 + 2268); } v = t4_read_reg(adap, int_cause_reg); v = v & 3U; if (v == 0U) { return; } else { } if ((v & 2U) != 0U) { dev_alert((struct device const *)adap->pdev_dev, "XGMAC %d Tx FIFO parity error\n", port); } else { } if ((int )v & 1) { dev_alert((struct device const *)adap->pdev_dev, "XGMAC %d Rx FIFO parity error\n", port); } else { } t4_write_reg(adap, (u32 )((port + 16) * 8192 + 4316), v); t4_fatal_err(adap); return; } } static void pl_intr_handler(struct adapter *adap ) { struct intr_info pl_intr_info[3U] ; int tmp ; { pl_intr_info[0].mask = 16U; pl_intr_info[0].msg = "T4 fatal parity error"; pl_intr_info[0].stat_idx = -1; pl_intr_info[0].fatal = 1U; pl_intr_info[0].int_handler = 0; pl_intr_info[1].mask = 1U; pl_intr_info[1].msg = "PL VFID_MAP parity error"; pl_intr_info[1].stat_idx = -1; pl_intr_info[1].fatal = 1U; pl_intr_info[1].int_handler = 0; pl_intr_info[2].mask = 0U; pl_intr_info[2].msg = 0; pl_intr_info[2].stat_idx = (short)0; pl_intr_info[2].fatal = (unsigned short)0; pl_intr_info[2].int_handler = 0; tmp = t4_handle_intr_status(adap, 103472U, (struct intr_info const *)(& pl_intr_info)); if (tmp != 0) { t4_fatal_err(adap); } else { } return; } } int t4_slow_intr_handler(struct adapter *adapter ) { u32 cause ; u32 tmp ; int tmp___0 ; { tmp = t4_read_reg(adapter, 103436U); cause = tmp; if ((cause & 234864721U) == 0U) { return (0); } else { } if ((int )cause & 1) { cim_intr_handler(adapter); } else { } if ((cause & 16U) != 0U) { mps_intr_handler(adapter); } else { } if ((cause & 32U) != 0U) { ncsi_intr_handler(adapter); } else { } if ((cause & 64U) != 0U) { pl_intr_handler(adapter); } else { } if ((cause & 256U) != 0U) { smb_intr_handler(adapter); } else { } if ((cause & 512U) != 0U) { xgmac_intr_handler(adapter, 0); } else { } if ((cause & 1024U) != 0U) { xgmac_intr_handler(adapter, 1); } else { } if ((cause & 2048U) != 0U) { xgmac_intr_handler(adapter, 2); } else { } if ((cause & 4096U) != 0U) { xgmac_intr_handler(adapter, 3); } else { } if ((cause & 16384U) != 0U) { pcie_intr_handler(adapter); } else { } if ((cause & 32768U) != 0U) { mem_intr_handler(adapter, 2); } else { } tmp___0 = is_t5(adapter->params.chip); if (tmp___0 != 0 && (int )cause < 0) { mem_intr_handler(adapter, 3); } else { } if ((cause & 65536U) != 0U) { mem_intr_handler(adapter, 0); } else { } if ((cause & 131072U) != 0U) { mem_intr_handler(adapter, 1); } else { } if ((cause & 262144U) != 0U) { le_intr_handler(adapter); } else { } if ((cause & 524288U) != 0U) { tp_intr_handler(adapter); } else { } if ((cause & 1048576U) != 0U) { ma_intr_handler(adapter); } else { } if ((cause & 2097152U) != 0U) { pmtx_intr_handler(adapter); } else { } if ((cause & 4194304U) != 0U) { pmrx_intr_handler(adapter); } else { } if ((cause & 8388608U) != 0U) { ulprx_intr_handler(adapter); } else { } if ((cause & 16777216U) != 0U) { cplsw_intr_handler(adapter); } else { } if ((cause & 67108864U) != 0U) { sge_intr_handler(adapter); } else { } if ((cause & 134217728U) != 0U) { ulptx_intr_handler(adapter); } else { } t4_write_reg(adapter, 103436U, cause & 234864721U); t4_read_reg(adapter, 103436U); return (1); } } void t4_intr_enable(struct adapter *adapter ) { u32 val ; u32 pf ; u32 tmp ; { val = 0U; tmp = t4_read_reg(adapter, 103424U); pf = (tmp >> 8) & 7U; if ((((unsigned int )adapter->params.chip >> 4) & 15U) <= 5U) { val = 262912U; } else { } t4_write_reg(adapter, 4160U, val | 7074992U); t4_write_reg(adapter, 111556U, 8U); t4_set_reg_field(adapter, 103444U, 0U, (u32 )(1 << (int )pf)); return; } } void t4_intr_disable(struct adapter *adapter ) { u32 pf ; u32 tmp ; { tmp = t4_read_reg(adapter, 103424U); pf = (tmp >> 8) & 7U; t4_write_reg(adapter, 111556U, 0U); t4_set_reg_field(adapter, 103444U, (u32 )(1 << (int )pf), 0U); return; } } static int hash_mac_addr(u8 const *addr ) { u32 a ; u32 b ; { a = (((unsigned int )*addr << 16) | ((unsigned int )*(addr + 1UL) << 8)) | (unsigned int )*(addr + 2UL); b = (((unsigned int )*(addr + 3UL) << 16) | ((unsigned int )*(addr + 4UL) << 8)) | (unsigned int )*(addr + 5UL); a = a ^ b; a = (a >> 12) ^ a; a = (a >> 6) ^ a; return ((int )a & 63); } } int t4_config_rss_range(struct adapter *adapter , int mbox , unsigned int viid , int start , int n , u16 const *rspq , unsigned int nrspq ) { int ret ; u16 const *rsp ; u16 const *rsp_end ; struct fw_rss_ind_tbl_cmd cmd ; __u32 tmp ; int nq ; int _min1 ; int _min2 ; __be32 *qp ; __u16 tmp___0 ; __u16 tmp___1 ; unsigned int v ; __be32 *tmp___2 ; __u32 tmp___3 ; { rsp = rspq; rsp_end = rspq + (unsigned long )nrspq; memset((void *)(& cmd), 0, 64UL); tmp = __fswab32(viid | 547356672U); cmd.op_to_viid = tmp; cmd.retval_len16 = 67108864U; goto ldv_50236; ldv_50235: _min1 = n; _min2 = 32; nq = _min1 < _min2 ? _min1 : _min2; qp = & cmd.iq0_to_iq2; tmp___0 = __fswab16((int )((__u16 )nq)); cmd.niqid = tmp___0; tmp___1 = __fswab16((int )((__u16 )start)); cmd.startidx = tmp___1; start = start + nq; n = n - nq; goto ldv_50233; ldv_50232: v = (unsigned int )((int )*rsp << 20); rsp = rsp + 1; if ((unsigned long )rsp >= (unsigned long )rsp_end) { rsp = rspq; } else { } v = (unsigned int )((int )*rsp << 10) | v; rsp = rsp + 1; if ((unsigned long )rsp >= (unsigned long )rsp_end) { rsp = rspq; } else { } v = (unsigned int )*rsp | v; rsp = rsp + 1; if ((unsigned long )rsp >= (unsigned long )rsp_end) { rsp = rspq; } else { } tmp___2 = qp; qp = qp + 1; tmp___3 = __fswab32(v); *tmp___2 = tmp___3; nq = nq + -3; ldv_50233: ; if (nq > 0) { goto ldv_50232; } else { } ret = t4_wr_mbox(adapter, mbox, (void const *)(& cmd), 64, (void *)0); if (ret != 0) { return (ret); } else { } ldv_50236: ; if (n > 0) { goto ldv_50235; } else { } return (0); } } int t4_config_glbl_rss(struct adapter *adapter , int mbox , unsigned int mode , unsigned int flags ) { struct fw_rss_glb_config_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; int tmp___2 ; { memset((void *)(& c), 0, 32UL); c.op_to_write = 40994U; c.retval_len16 = 33554432U; if (mode == 0U) { tmp = __fswab32(mode << 28); c.u.manual.mode_pkd = tmp; } else if (mode == 1U) { tmp___0 = __fswab32(mode << 28); c.u.basicvirtual.mode_pkd = tmp___0; tmp___1 = __fswab32(flags); c.u.basicvirtual.synmapen_to_hashtoeplitz = tmp___1; } else { return (-22); } tmp___2 = t4_wr_mbox(adapter, mbox, (void const *)(& c), 32, (void *)0); return (tmp___2); } } int t4_config_vi_rss(struct adapter *adapter , int mbox , unsigned int viid , unsigned int flags , unsigned int defq ) { struct fw_rss_vi_config_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 32UL); tmp = __fswab32(viid | 597688320U); c.op_to_viid = tmp; c.retval_len16 = 33554432U; tmp___0 = __fswab32((defq << 16) | flags); c.u.basicvirtual.defaultq_to_udpen = tmp___0; tmp___1 = t4_wr_mbox(adapter, mbox, (void const *)(& c), 32, (void *)0); return (tmp___1); } } static int rd_rss_row(struct adapter *adap , int row , u32 *val ) { int tmp ; { t4_write_reg(adap, 32236U, (unsigned int )row | 4293918720U); tmp = t4_wait_op_done_val(adap, 32236, 2147483648U, 1, 5, 0, val); return (tmp); } } int t4_read_rss(struct adapter *adapter , u16 *map ) { u32 val ; int i ; int ret ; u16 *tmp ; u16 *tmp___0 ; { i = 0; goto ldv_50266; ldv_50265: ret = rd_rss_row(adapter, i, & val); if (ret != 0) { return (ret); } else { } tmp = map; map = map + 1; *tmp = (unsigned int )((u16 )val) & 1023U; tmp___0 = map; map = map + 1; *tmp___0 = (unsigned int )((u16 )(val >> 10)) & 1023U; i = i + 1; ldv_50266: ; if (i <= 1023) { goto ldv_50265; } else { } return (0); } } static void t4_fw_tp_pio_rw(struct adapter *adap , u32 *vals , unsigned int nregs , unsigned int start_index , unsigned int rw ) { int ret ; int i ; int cmd ; struct fw_ldst_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; { cmd = 16; i = 0; goto ldv_50280; ldv_50279: memset((void *)(& c), 0, 64UL); tmp = __fswab32((rw != 0U ? 29360128U : 27262976U) | (unsigned int )cmd); c.op_to_addrspace = tmp; c.cycles_to_len16 = 67108864U; tmp___0 = __fswab32(start_index + (unsigned int )i); c.u.addrval.addr = tmp___0; if (rw == 0U) { tmp___1 = __fswab32(*(vals + (unsigned long )i)); c.u.addrval.val = tmp___1; } else { c.u.addrval.val = 0U; } ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 64, (void *)(& c)); if (ret == 0 && rw != 0U) { tmp___2 = __fswab32(c.u.addrval.val); *(vals + (unsigned long )i) = tmp___2; } else { } i = i + 1; ldv_50280: ; if ((unsigned int )i < nregs) { goto ldv_50279; } else { } return; } } void t4_read_rss_key(struct adapter *adap , u32 *key ) { { if ((adap->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adap, key, 10U, 64U, 1U); } else { t4_read_indirect(adap, 32320U, 32324U, key, 10U, 64U); } return; } } void t4_write_rss_key(struct adapter *adap , u32 const *key , int idx ) { u8 rss_key_addr_cnt ; u32 vrt ; u32 tmp ; { rss_key_addr_cnt = 16U; tmp = t4_read_reg(adap, 32256U); vrt = tmp; if (((((unsigned int )adap->params.chip >> 4) & 15U) > 5U && (vrt & 67108864U) != 0U) && ((vrt >> 6) & 3U) == 3U) { rss_key_addr_cnt = 32U; } else { } if ((adap->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adap, (u32 *)key, 10U, 64U, 0U); } else { t4_write_indirect(adap, 32320U, 32324U, key, 10U, 64U); } if (idx >= 0 && (int )rss_key_addr_cnt > idx) { if ((unsigned int )rss_key_addr_cnt > 16U) { t4_write_reg(adap, 32256U, (unsigned int )(((idx >> 4) << 30) | (idx << 8)) | 16U); } else { t4_write_reg(adap, 32256U, (unsigned int )idx | 16U); } } else { } return; } } void t4_read_rss_pf_config(struct adapter *adapter , unsigned int index , u32 *valp ) { { if ((adapter->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adapter, valp, 1U, index + 48U, 1U); } else { t4_read_indirect(adapter, 32320U, 32324U, valp, 1U, index + 48U); } return; } } void t4_read_rss_vf_config(struct adapter *adapter , unsigned int index , u32 *vfl , u32 *vfh ) { u32 vrt ; u32 mask ; u32 data ; { if ((((unsigned int )adapter->params.chip >> 4) & 15U) <= 5U) { mask = 32512U; data = index << 8; } else { mask = 65280U; data = index << 8; } vrt = t4_read_reg(adapter, 32256U); vrt = ~ (mask | 33554480U) & vrt; vrt = (data | vrt) | 16777216U; t4_write_reg(adapter, 32256U, vrt); if ((adapter->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adapter, vfl, 1U, 58U, 1U); t4_fw_tp_pio_rw(adapter, vfh, 1U, 59U, 1U); } else { t4_read_indirect(adapter, 32320U, 32324U, vfl, 1U, 58U); t4_read_indirect(adapter, 32320U, 32324U, vfh, 1U, 59U); } return; } } u32 t4_read_rss_pf_map(struct adapter *adapter ) { u32 pfmap ; { if ((adapter->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adapter, & pfmap, 1U, 56U, 1U); } else { t4_read_indirect(adapter, 32320U, 32324U, & pfmap, 1U, 56U); } return (pfmap); } } u32 t4_read_rss_pf_mask(struct adapter *adapter ) { u32 pfmask ; { if ((adapter->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adapter, & pfmask, 1U, 57U, 1U); } else { t4_read_indirect(adapter, 32320U, 32324U, & pfmask, 1U, 57U); } return (pfmask); } } void t4_tp_get_tcp_stats(struct adapter *adap , struct tp_tcp_stats *v4 , struct tp_tcp_stats *v6 ) { u32 val[10U] ; { if ((unsigned long )v4 != (unsigned long )((struct tp_tcp_stats *)0)) { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& val), 10U, 12U); v4->tcp_out_rsts = val[0]; v4->tcp_in_segs = ((unsigned long long )val[4] << 32) | (unsigned long long )val[5]; v4->tcp_out_segs = ((unsigned long long )val[6] << 32) | (unsigned long long )val[7]; v4->tcp_retrans_segs = ((unsigned long long )val[8] << 32) | (unsigned long long )val[9]; } else { } if ((unsigned long )v6 != (unsigned long )((struct tp_tcp_stats *)0)) { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& val), 10U, 44U); v6->tcp_out_rsts = val[0]; v6->tcp_in_segs = ((unsigned long long )val[4] << 32) | (unsigned long long )val[5]; v6->tcp_out_segs = ((unsigned long long )val[6] << 32) | (unsigned long long )val[7]; v6->tcp_retrans_segs = ((unsigned long long )val[8] << 32) | (unsigned long long )val[9]; } else { } return; } } void t4_tp_get_err_stats(struct adapter *adap , struct tp_err_stats *st ) { { if ((unsigned int )adap->params.arch.nchan == 4U) { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->mac_in_errs), 12U, 0U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tnl_cong_drops), 8U, 24U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tnl_tx_drops), 4U, 68U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->ofld_vlan_drops), 4U, 88U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tcp6_in_errs), 4U, 40U); } else { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->mac_in_errs), 2U, 0U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->hdr_in_errs), 2U, 4U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tcp_in_errs), 2U, 8U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tnl_cong_drops), 2U, 24U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->ofld_chan_drops), 2U, 28U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tnl_tx_drops), 2U, 68U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->ofld_vlan_drops), 2U, 88U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->tcp6_in_errs), 2U, 40U); } t4_read_indirect(adap, 32336U, 32340U, & st->ofld_no_neigh, 2U, 54U); return; } } void t4_tp_get_cpl_stats(struct adapter *adap , struct tp_cpl_stats *st ) { { if ((unsigned int )adap->params.arch.nchan == 4U) { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->req), 8U, 56U); } else { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->req), 2U, 56U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& st->rsp), 2U, 60U); } return; } } void t4_tp_get_rdma_stats(struct adapter *adap , struct tp_rdma_stats *st ) { { t4_read_indirect(adap, 32336U, 32340U, & st->rqe_dfr_pkt, 2U, 100U); return; } } void t4_get_fcoe_stats(struct adapter *adap , unsigned int idx , struct tp_fcoe_stats *st ) { u32 val[2U] ; { t4_read_indirect(adap, 32336U, 32340U, & st->frames_ddp, 1U, idx + 72U); t4_read_indirect(adap, 32336U, 32340U, & st->frames_drop, 1U, idx + 76U); t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& val), 2U, (idx + 40U) * 2U); st->octets_ddp = ((unsigned long long )val[0] << 32) | (unsigned long long )val[1]; return; } } void t4_get_usm_stats(struct adapter *adap , struct tp_usm_stats *st ) { u32 val[4U] ; { t4_read_indirect(adap, 32336U, 32340U, (u32 *)(& val), 4U, 92U); st->frames = val[0]; st->drops = val[1]; st->octets = ((unsigned long long )val[2] << 32) | (unsigned long long )val[3]; return; } } void t4_read_mtu_tbl(struct adapter *adap , u16 *mtus , u8 *mtu_log ) { u32 v ; int i ; { i = 0; goto ldv_50356; ldv_50355: t4_write_reg(adap, 32228U, (u32 )(i | -16777216)); v = t4_read_reg(adap, 32228U); *(mtus + (unsigned long )i) = (unsigned int )((u16 )v) & 16383U; if ((unsigned long )mtu_log != (unsigned long )((u8 *)0U)) { *(mtu_log + (unsigned long )i) = (unsigned int )((u8 )(v >> 16)) & 15U; } else { } i = i + 1; ldv_50356: ; if (i <= 15) { goto ldv_50355; } else { } return; } } void t4_read_cong_tbl(struct adapter *adap , u16 (*incr)[32] ) { unsigned int mtu ; unsigned int w ; u32 tmp ; { mtu = 0U; goto ldv_50368; ldv_50367: w = 0U; goto ldv_50365; ldv_50364: t4_write_reg(adap, 32220U, ((mtu << 5) | w) | 4294901760U); tmp = t4_read_reg(adap, 32220U); (*(incr + (unsigned long )mtu))[w] = (unsigned int )((u16 )tmp) & 8191U; w = w + 1U; ldv_50365: ; if (w <= 31U) { goto ldv_50364; } else { } mtu = mtu + 1U; ldv_50368: ; if (mtu <= 15U) { goto ldv_50367; } else { } return; } } void t4_tp_wr_bits_indirect(struct adapter *adap , unsigned int addr , unsigned int mask , unsigned int val ) { u32 tmp ; { t4_write_reg(adap, 32320U, addr); tmp = t4_read_reg(adap, 32324U); val = (tmp & ~ mask) | val; t4_write_reg(adap, 32324U, val); return; } } static void init_cong_ctrl(unsigned short *a , unsigned short *b ) { unsigned short tmp ; unsigned short tmp___0 ; unsigned short tmp___1 ; unsigned short tmp___2 ; unsigned short tmp___3 ; unsigned short tmp___4 ; unsigned short tmp___5 ; unsigned short tmp___6 ; unsigned short tmp___7 ; unsigned short tmp___8 ; unsigned short tmp___9 ; unsigned short tmp___10 ; unsigned short tmp___11 ; unsigned short tmp___12 ; unsigned short tmp___13 ; unsigned short tmp___14 ; unsigned short tmp___15 ; unsigned short tmp___16 ; unsigned short tmp___17 ; unsigned short tmp___18 ; unsigned short tmp___19 ; unsigned short tmp___20 ; unsigned short tmp___21 ; unsigned short tmp___22 ; unsigned short tmp___23 ; unsigned short tmp___24 ; unsigned short tmp___25 ; unsigned short tmp___26 ; unsigned short tmp___27 ; unsigned short tmp___28 ; unsigned short tmp___29 ; unsigned short tmp___30 ; { tmp___6 = 1U; *(a + 8UL) = tmp___6; tmp___5 = tmp___6; *(a + 7UL) = tmp___5; tmp___4 = tmp___5; *(a + 6UL) = tmp___4; tmp___3 = tmp___4; *(a + 5UL) = tmp___3; tmp___2 = tmp___3; *(a + 4UL) = tmp___2; tmp___1 = tmp___2; *(a + 3UL) = tmp___1; tmp___0 = tmp___1; *(a + 2UL) = tmp___0; tmp = tmp___0; *(a + 1UL) = tmp; *a = tmp; *(a + 9UL) = 2U; *(a + 10UL) = 3U; *(a + 11UL) = 4U; *(a + 12UL) = 5U; *(a + 13UL) = 6U; *(a + 14UL) = 7U; *(a + 15UL) = 8U; *(a + 16UL) = 9U; *(a + 17UL) = 10U; *(a + 18UL) = 14U; *(a + 19UL) = 17U; *(a + 20UL) = 21U; *(a + 21UL) = 25U; *(a + 22UL) = 30U; *(a + 23UL) = 35U; *(a + 24UL) = 45U; *(a + 25UL) = 60U; *(a + 26UL) = 80U; *(a + 27UL) = 100U; *(a + 28UL) = 200U; *(a + 29UL) = 300U; *(a + 30UL) = 400U; *(a + 31UL) = 500U; tmp___14 = 0U; *(b + 8UL) = tmp___14; tmp___13 = tmp___14; *(b + 7UL) = tmp___13; tmp___12 = tmp___13; *(b + 6UL) = tmp___12; tmp___11 = tmp___12; *(b + 5UL) = tmp___11; tmp___10 = tmp___11; *(b + 4UL) = tmp___10; tmp___9 = tmp___10; *(b + 3UL) = tmp___9; tmp___8 = tmp___9; *(b + 2UL) = tmp___8; tmp___7 = tmp___8; *(b + 1UL) = tmp___7; *b = tmp___7; tmp___15 = 1U; *(b + 10UL) = tmp___15; *(b + 9UL) = tmp___15; tmp___16 = 2U; *(b + 12UL) = tmp___16; *(b + 11UL) = tmp___16; tmp___19 = 3U; *(b + 16UL) = tmp___19; tmp___18 = tmp___19; *(b + 15UL) = tmp___18; tmp___17 = tmp___18; *(b + 14UL) = tmp___17; *(b + 13UL) = tmp___17; tmp___23 = 4U; *(b + 21UL) = tmp___23; tmp___22 = tmp___23; *(b + 20UL) = tmp___22; tmp___21 = tmp___22; *(b + 19UL) = tmp___21; tmp___20 = tmp___21; *(b + 18UL) = tmp___20; *(b + 17UL) = tmp___20; tmp___28 = 5U; *(b + 27UL) = tmp___28; tmp___27 = tmp___28; *(b + 26UL) = tmp___27; tmp___26 = tmp___27; *(b + 25UL) = tmp___26; tmp___25 = tmp___26; *(b + 24UL) = tmp___25; tmp___24 = tmp___25; *(b + 23UL) = tmp___24; *(b + 22UL) = tmp___24; tmp___29 = 6U; *(b + 29UL) = tmp___29; *(b + 28UL) = tmp___29; tmp___30 = 7U; *(b + 31UL) = tmp___30; *(b + 30UL) = tmp___30; return; } } void t4_load_mtus(struct adapter *adap , unsigned short const *mtus , unsigned short const *alpha , unsigned short const *beta ) { unsigned int avg_pkts[32U] ; unsigned int i ; unsigned int w ; unsigned int mtu ; unsigned int log2 ; int tmp ; unsigned int inc ; unsigned int _max1 ; unsigned int _max2 ; { avg_pkts[0] = 2U; avg_pkts[1] = 6U; avg_pkts[2] = 10U; avg_pkts[3] = 14U; avg_pkts[4] = 20U; avg_pkts[5] = 28U; avg_pkts[6] = 40U; avg_pkts[7] = 56U; avg_pkts[8] = 80U; avg_pkts[9] = 112U; avg_pkts[10] = 160U; avg_pkts[11] = 224U; avg_pkts[12] = 320U; avg_pkts[13] = 448U; avg_pkts[14] = 640U; avg_pkts[15] = 896U; avg_pkts[16] = 1281U; avg_pkts[17] = 1792U; avg_pkts[18] = 2560U; avg_pkts[19] = 3584U; avg_pkts[20] = 5120U; avg_pkts[21] = 7168U; avg_pkts[22] = 10240U; avg_pkts[23] = 14336U; avg_pkts[24] = 20480U; avg_pkts[25] = 28672U; avg_pkts[26] = 40960U; avg_pkts[27] = 57344U; avg_pkts[28] = 81920U; avg_pkts[29] = 114688U; avg_pkts[30] = 163840U; avg_pkts[31] = 229376U; i = 0U; goto ldv_50399; ldv_50398: mtu = (unsigned int )*(mtus + (unsigned long )i); tmp = fls((int )mtu); log2 = (unsigned int )tmp; if (((unsigned int )((1 << (int )log2) >> 2) & mtu) == 0U) { log2 = log2 - 1U; } else { } t4_write_reg(adap, 32228U, ((i << 24) | (log2 << 16)) | mtu); w = 0U; goto ldv_50396; ldv_50395: _max1 = ((mtu - 40U) * (unsigned int )*(alpha + (unsigned long )w)) / avg_pkts[w]; _max2 = 2U; inc = _max1 > _max2 ? _max1 : _max2; t4_write_reg(adap, 32220U, (((i << 21) | (w << 16)) | (unsigned int )((int )*(beta + (unsigned long )w) << 13)) | inc); w = w + 1U; ldv_50396: ; if (w <= 31U) { goto ldv_50395; } else { } i = i + 1U; ldv_50399: ; if (i <= 15U) { goto ldv_50398; } else { } return; } } static u64 chan_rate(struct adapter *adap , unsigned int bytes256 ) { u64 v ; { v = (u64 )(adap->params.vpd.cclk * bytes256); return (v * 62ULL + v / 2ULL); } } void t4_get_chan_txrate(struct adapter *adap , u64 *nic_rate , u64 *ofld_rate ) { u32 v ; { v = t4_read_reg(adap, 32464U); *nic_rate = chan_rate(adap, v & 255U); *(nic_rate + 1UL) = chan_rate(adap, (v >> 8) & 255U); if ((unsigned int )adap->params.arch.nchan == 4U) { *(nic_rate + 2UL) = chan_rate(adap, (v >> 16) & 255U); *(nic_rate + 3UL) = chan_rate(adap, v >> 24); } else { } v = t4_read_reg(adap, 32444U); *ofld_rate = chan_rate(adap, v & 255U); *(ofld_rate + 1UL) = chan_rate(adap, (v >> 8) & 255U); if ((unsigned int )adap->params.arch.nchan == 4U) { *(ofld_rate + 2UL) = chan_rate(adap, (v >> 16) & 255U); *(ofld_rate + 3UL) = chan_rate(adap, v >> 24); } else { } return; } } void t4_pmtx_get_stats(struct adapter *adap , u32 *cnt , u64 *cycles ) { int i ; u32 data[2U] ; int tmp ; { i = 0; goto ldv_50420; ldv_50419: t4_write_reg(adap, 36840U, (u32 )(i + 1)); *(cnt + (unsigned long )i) = t4_read_reg(adap, 36844U); tmp = is_t4(adap->params.chip); if (tmp != 0) { *(cycles + (unsigned long )i) = t4_read_reg64(adap, 36848U); } else { t4_read_indirect(adap, 36848U, 36852U, (u32 *)(& data), 2U, 65562U); *(cycles + (unsigned long )i) = ((unsigned long long )data[0] << 32) | (unsigned long long )data[1]; } i = i + 1; ldv_50420: ; if (i <= 4) { goto ldv_50419; } else { } return; } } void t4_pmrx_get_stats(struct adapter *adap , u32 *cnt , u64 *cycles ) { int i ; u32 data[2U] ; int tmp ; { i = 0; goto ldv_50430; ldv_50429: t4_write_reg(adap, 36808U, (u32 )(i + 1)); *(cnt + (unsigned long )i) = t4_read_reg(adap, 36812U); tmp = is_t4(adap->params.chip); if (tmp != 0) { *(cycles + (unsigned long )i) = t4_read_reg64(adap, 36816U); } else { t4_read_indirect(adap, 36816U, 36820U, (u32 *)(& data), 2U, 65555U); *(cycles + (unsigned long )i) = ((unsigned long long )data[0] << 32) | (unsigned long long )data[1]; } i = i + 1; ldv_50430: ; if (i <= 4) { goto ldv_50429; } else { } return; } } unsigned int t4_get_mps_bg_map(struct adapter *adap , int idx ) { u32 n ; u32 tmp ; { tmp = t4_read_reg(adap, 36864U); n = tmp & 3U; if (n == 0U) { return (idx == 0 ? 15U : 0U); } else { } if (n == 1U) { return (idx <= 1 ? (unsigned int )(3 << idx * 2) : 0U); } else { } return ((unsigned int )(1 << idx)); } } char const *t4_get_port_type_description(enum fw_port_type port_type ) { char const *port_type_description[16U] ; { port_type_description[0] = "R XFI"; port_type_description[1] = "R XAUI"; port_type_description[2] = "T SGMII"; port_type_description[3] = "T XFI"; port_type_description[4] = "T XAUI"; port_type_description[5] = "KX4"; port_type_description[6] = "CX4"; port_type_description[7] = "KX"; port_type_description[8] = "KR"; port_type_description[9] = "R SFP+"; port_type_description[10] = "KR/KX"; port_type_description[11] = "KR/KX/KX4"; port_type_description[12] = "R QSFP_10G"; port_type_description[13] = "R QSA"; port_type_description[14] = "R QSFP"; port_type_description[15] = "R BP40_BA"; if ((unsigned int )port_type <= 15U) { return (port_type_description[(unsigned int )port_type]); } else { } return ("UNKNOWN"); } } void t4_get_port_stats_offset(struct adapter *adap , int idx , struct port_stats *stats , struct port_stats *offset ) { u64 *s ; u64 *o ; int i ; { t4_get_port_stats(adap, idx, stats); i = 0; s = (u64 *)stats; o = (u64 *)offset; goto ldv_50453; ldv_50452: *s = *s - *o; i = i + 1; s = s + 1; o = o + 1; ldv_50453: ; if ((unsigned int )i <= 57U) { goto ldv_50452; } else { } return; } } void t4_get_port_stats(struct adapter *adap , int idx , struct port_stats *p ) { u32 bgmap ; unsigned int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; int tmp___24 ; int tmp___25 ; int tmp___26 ; int tmp___27 ; int tmp___28 ; int tmp___29 ; int tmp___30 ; int tmp___31 ; int tmp___32 ; int tmp___33 ; int tmp___34 ; int tmp___35 ; int tmp___36 ; int tmp___37 ; int tmp___38 ; int tmp___39 ; int tmp___40 ; int tmp___41 ; int tmp___42 ; int tmp___43 ; int tmp___44 ; int tmp___45 ; int tmp___46 ; int tmp___47 ; int tmp___48 ; int tmp___49 ; u64 tmp___50 ; u64 tmp___51 ; u64 tmp___52 ; u64 tmp___53 ; u64 tmp___54 ; u64 tmp___55 ; u64 tmp___56 ; u64 tmp___57 ; { tmp = t4_get_mps_bg_map(adap, idx); bgmap = tmp; tmp___0 = is_t4(adap->params.chip); p->tx_octets = t4_read_reg64(adap, (u32 )(tmp___0 != 0 ? (idx + 16) * 8192 + 1024 : (idx + 12) * 16384 + 1024)); tmp___1 = is_t4(adap->params.chip); p->tx_frames = t4_read_reg64(adap, (u32 )(tmp___1 != 0 ? (idx + 16) * 8192 + 1032 : (idx + 12) * 16384 + 1032)); tmp___2 = is_t4(adap->params.chip); p->tx_bcast_frames = t4_read_reg64(adap, (u32 )(tmp___2 != 0 ? (idx + 16) * 8192 + 1040 : (idx + 12) * 16384 + 1040)); tmp___3 = is_t4(adap->params.chip); p->tx_mcast_frames = t4_read_reg64(adap, (u32 )(tmp___3 != 0 ? (idx + 16) * 8192 + 1048 : (idx + 12) * 16384 + 1048)); tmp___4 = is_t4(adap->params.chip); p->tx_ucast_frames = t4_read_reg64(adap, (u32 )(tmp___4 != 0 ? (idx + 16) * 8192 + 1056 : (idx + 12) * 16384 + 1056)); tmp___5 = is_t4(adap->params.chip); p->tx_error_frames = t4_read_reg64(adap, (u32 )(tmp___5 != 0 ? (idx + 16) * 8192 + 1064 : (idx + 12) * 16384 + 1064)); tmp___6 = is_t4(adap->params.chip); p->tx_frames_64 = t4_read_reg64(adap, (u32 )(tmp___6 != 0 ? (idx + 16) * 8192 + 1072 : (idx + 12) * 16384 + 1072)); tmp___7 = is_t4(adap->params.chip); p->tx_frames_65_127 = t4_read_reg64(adap, (u32 )(tmp___7 != 0 ? (idx + 16) * 8192 + 1080 : (idx + 12) * 16384 + 1080)); tmp___8 = is_t4(adap->params.chip); p->tx_frames_128_255 = t4_read_reg64(adap, (u32 )(tmp___8 != 0 ? (idx + 16) * 8192 + 1088 : (idx + 12) * 16384 + 1088)); tmp___9 = is_t4(adap->params.chip); p->tx_frames_256_511 = t4_read_reg64(adap, (u32 )(tmp___9 != 0 ? (idx + 16) * 8192 + 1096 : (idx + 12) * 16384 + 1096)); tmp___10 = is_t4(adap->params.chip); p->tx_frames_512_1023 = t4_read_reg64(adap, (u32 )(tmp___10 != 0 ? (idx + 16) * 8192 + 1104 : (idx + 12) * 16384 + 1104)); tmp___11 = is_t4(adap->params.chip); p->tx_frames_1024_1518 = t4_read_reg64(adap, (u32 )(tmp___11 != 0 ? (idx + 16) * 8192 + 1112 : (idx + 12) * 16384 + 1112)); tmp___12 = is_t4(adap->params.chip); p->tx_frames_1519_max = t4_read_reg64(adap, (u32 )(tmp___12 != 0 ? (idx + 16) * 8192 + 1120 : (idx + 12) * 16384 + 1120)); tmp___13 = is_t4(adap->params.chip); p->tx_drop = t4_read_reg64(adap, (u32 )(tmp___13 != 0 ? (idx + 16) * 8192 + 1128 : (idx + 12) * 16384 + 1128)); tmp___14 = is_t4(adap->params.chip); p->tx_pause = t4_read_reg64(adap, (u32 )(tmp___14 != 0 ? (idx + 16) * 8192 + 1136 : (idx + 12) * 16384 + 1136)); tmp___15 = is_t4(adap->params.chip); p->tx_ppp0 = t4_read_reg64(adap, (u32 )(tmp___15 != 0 ? (idx + 16) * 8192 + 1144 : (idx + 12) * 16384 + 1144)); tmp___16 = is_t4(adap->params.chip); p->tx_ppp1 = t4_read_reg64(adap, (u32 )(tmp___16 != 0 ? (idx + 16) * 8192 + 1152 : (idx + 12) * 16384 + 1152)); tmp___17 = is_t4(adap->params.chip); p->tx_ppp2 = t4_read_reg64(adap, (u32 )(tmp___17 != 0 ? (idx + 16) * 8192 + 1160 : (idx + 12) * 16384 + 1160)); tmp___18 = is_t4(adap->params.chip); p->tx_ppp3 = t4_read_reg64(adap, (u32 )(tmp___18 != 0 ? (idx + 16) * 8192 + 1168 : (idx + 12) * 16384 + 1168)); tmp___19 = is_t4(adap->params.chip); p->tx_ppp4 = t4_read_reg64(adap, (u32 )(tmp___19 != 0 ? (idx + 16) * 8192 + 1176 : (idx + 12) * 16384 + 1176)); tmp___20 = is_t4(adap->params.chip); p->tx_ppp5 = t4_read_reg64(adap, (u32 )(tmp___20 != 0 ? (idx + 16) * 8192 + 1184 : (idx + 12) * 16384 + 1184)); tmp___21 = is_t4(adap->params.chip); p->tx_ppp6 = t4_read_reg64(adap, (u32 )(tmp___21 != 0 ? (idx + 16) * 8192 + 1192 : (idx + 12) * 16384 + 1192)); tmp___22 = is_t4(adap->params.chip); p->tx_ppp7 = t4_read_reg64(adap, (u32 )(tmp___22 != 0 ? (idx + 16) * 8192 + 1200 : (idx + 12) * 16384 + 1200)); tmp___23 = is_t4(adap->params.chip); p->rx_octets = t4_read_reg64(adap, (u32 )(tmp___23 != 0 ? (idx + 16) * 8192 + 1344 : (idx + 12) * 16384 + 1344)); tmp___24 = is_t4(adap->params.chip); p->rx_frames = t4_read_reg64(adap, (u32 )(tmp___24 != 0 ? (idx + 16) * 8192 + 1352 : (idx + 12) * 16384 + 1352)); tmp___25 = is_t4(adap->params.chip); p->rx_bcast_frames = t4_read_reg64(adap, (u32 )(tmp___25 != 0 ? (idx + 16) * 8192 + 1360 : (idx + 12) * 16384 + 1360)); tmp___26 = is_t4(adap->params.chip); p->rx_mcast_frames = t4_read_reg64(adap, (u32 )(tmp___26 != 0 ? (idx + 16) * 8192 + 1368 : (idx + 12) * 16384 + 1368)); tmp___27 = is_t4(adap->params.chip); p->rx_ucast_frames = t4_read_reg64(adap, (u32 )(tmp___27 != 0 ? (idx + 16) * 8192 + 1376 : (idx + 12) * 16384 + 1376)); tmp___28 = is_t4(adap->params.chip); p->rx_too_long = t4_read_reg64(adap, (u32 )(tmp___28 != 0 ? (idx + 16) * 8192 + 1384 : (idx + 12) * 16384 + 1384)); tmp___29 = is_t4(adap->params.chip); p->rx_jabber = t4_read_reg64(adap, (u32 )(tmp___29 != 0 ? (idx + 16) * 8192 + 1392 : (idx + 12) * 16384 + 1392)); tmp___30 = is_t4(adap->params.chip); p->rx_fcs_err = t4_read_reg64(adap, (u32 )(tmp___30 != 0 ? (idx + 16) * 8192 + 1400 : (idx + 12) * 16384 + 1400)); tmp___31 = is_t4(adap->params.chip); p->rx_len_err = t4_read_reg64(adap, (u32 )(tmp___31 != 0 ? (idx + 16) * 8192 + 1408 : (idx + 12) * 16384 + 1408)); tmp___32 = is_t4(adap->params.chip); p->rx_symbol_err = t4_read_reg64(adap, (u32 )(tmp___32 != 0 ? (idx + 16) * 8192 + 1416 : (idx + 12) * 16384 + 1416)); tmp___33 = is_t4(adap->params.chip); p->rx_runt = t4_read_reg64(adap, (u32 )(tmp___33 != 0 ? (idx + 16) * 8192 + 1552 : (idx + 12) * 16384 + 1552)); tmp___34 = is_t4(adap->params.chip); p->rx_frames_64 = t4_read_reg64(adap, (u32 )(tmp___34 != 0 ? (idx + 16) * 8192 + 1424 : (idx + 12) * 16384 + 1424)); tmp___35 = is_t4(adap->params.chip); p->rx_frames_65_127 = t4_read_reg64(adap, (u32 )(tmp___35 != 0 ? (idx + 16) * 8192 + 1432 : (idx + 12) * 16384 + 1432)); tmp___36 = is_t4(adap->params.chip); p->rx_frames_128_255 = t4_read_reg64(adap, (u32 )(tmp___36 != 0 ? (idx + 16) * 8192 + 1440 : (idx + 12) * 16384 + 1440)); tmp___37 = is_t4(adap->params.chip); p->rx_frames_256_511 = t4_read_reg64(adap, (u32 )(tmp___37 != 0 ? (idx + 16) * 8192 + 1448 : (idx + 12) * 16384 + 1448)); tmp___38 = is_t4(adap->params.chip); p->rx_frames_512_1023 = t4_read_reg64(adap, (u32 )(tmp___38 != 0 ? (idx + 16) * 8192 + 1456 : (idx + 12) * 16384 + 1456)); tmp___39 = is_t4(adap->params.chip); p->rx_frames_1024_1518 = t4_read_reg64(adap, (u32 )(tmp___39 != 0 ? (idx + 16) * 8192 + 1464 : (idx + 12) * 16384 + 1464)); tmp___40 = is_t4(adap->params.chip); p->rx_frames_1519_max = t4_read_reg64(adap, (u32 )(tmp___40 != 0 ? (idx + 16) * 8192 + 1472 : (idx + 12) * 16384 + 1472)); tmp___41 = is_t4(adap->params.chip); p->rx_pause = t4_read_reg64(adap, (u32 )(tmp___41 != 0 ? (idx + 16) * 8192 + 1480 : (idx + 12) * 16384 + 1480)); tmp___42 = is_t4(adap->params.chip); p->rx_ppp0 = t4_read_reg64(adap, (u32 )(tmp___42 != 0 ? (idx + 16) * 8192 + 1488 : (idx + 12) * 16384 + 1488)); tmp___43 = is_t4(adap->params.chip); p->rx_ppp1 = t4_read_reg64(adap, (u32 )(tmp___43 != 0 ? (idx + 16) * 8192 + 1496 : (idx + 12) * 16384 + 1496)); tmp___44 = is_t4(adap->params.chip); p->rx_ppp2 = t4_read_reg64(adap, (u32 )(tmp___44 != 0 ? (idx + 16) * 8192 + 1504 : (idx + 12) * 16384 + 1504)); tmp___45 = is_t4(adap->params.chip); p->rx_ppp3 = t4_read_reg64(adap, (u32 )(tmp___45 != 0 ? (idx + 16) * 8192 + 1512 : (idx + 12) * 16384 + 1512)); tmp___46 = is_t4(adap->params.chip); p->rx_ppp4 = t4_read_reg64(adap, (u32 )(tmp___46 != 0 ? (idx + 16) * 8192 + 1520 : (idx + 12) * 16384 + 1520)); tmp___47 = is_t4(adap->params.chip); p->rx_ppp5 = t4_read_reg64(adap, (u32 )(tmp___47 != 0 ? (idx + 16) * 8192 + 1528 : (idx + 12) * 16384 + 1528)); tmp___48 = is_t4(adap->params.chip); p->rx_ppp6 = t4_read_reg64(adap, (u32 )(tmp___48 != 0 ? (idx + 16) * 8192 + 1536 : (idx + 12) * 16384 + 1536)); tmp___49 = is_t4(adap->params.chip); p->rx_ppp7 = t4_read_reg64(adap, (u32 )(tmp___49 != 0 ? (idx + 16) * 8192 + 1544 : (idx + 12) * 16384 + 1544)); if ((int )bgmap & 1) { tmp___50 = t4_read_reg64(adap, 38464U); p->rx_ovflow0 = tmp___50; } else { p->rx_ovflow0 = 0ULL; } if ((bgmap & 2U) != 0U) { tmp___51 = t4_read_reg64(adap, 38472U); p->rx_ovflow1 = tmp___51; } else { p->rx_ovflow1 = 0ULL; } if ((bgmap & 4U) != 0U) { tmp___52 = t4_read_reg64(adap, 38480U); p->rx_ovflow2 = tmp___52; } else { p->rx_ovflow2 = 0ULL; } if ((bgmap & 8U) != 0U) { tmp___53 = t4_read_reg64(adap, 38488U); p->rx_ovflow3 = tmp___53; } else { p->rx_ovflow3 = 0ULL; } if ((int )bgmap & 1) { tmp___54 = t4_read_reg64(adap, 38528U); p->rx_trunc0 = tmp___54; } else { p->rx_trunc0 = 0ULL; } if ((bgmap & 2U) != 0U) { tmp___55 = t4_read_reg64(adap, 38536U); p->rx_trunc1 = tmp___55; } else { p->rx_trunc1 = 0ULL; } if ((bgmap & 4U) != 0U) { tmp___56 = t4_read_reg64(adap, 38544U); p->rx_trunc2 = tmp___56; } else { p->rx_trunc2 = 0ULL; } if ((bgmap & 8U) != 0U) { tmp___57 = t4_read_reg64(adap, 38552U); p->rx_trunc3 = tmp___57; } else { p->rx_trunc3 = 0ULL; } return; } } void t4_get_lb_stats(struct adapter *adap , int idx , struct lb_port_stats *p ) { u32 bgmap ; unsigned int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; u64 tmp___14 ; u64 tmp___15 ; u64 tmp___16 ; u64 tmp___17 ; u64 tmp___18 ; u64 tmp___19 ; u64 tmp___20 ; u64 tmp___21 ; { tmp = t4_get_mps_bg_map(adap, idx); bgmap = tmp; tmp___0 = is_t4(adap->params.chip); p->octets = t4_read_reg64(adap, (u32 )(tmp___0 != 0 ? (idx + 16) * 8192 + 1216 : (idx + 12) * 16384 + 1216)); tmp___1 = is_t4(adap->params.chip); p->frames = t4_read_reg64(adap, (u32 )(tmp___1 != 0 ? (idx + 16) * 8192 + 1224 : (idx + 12) * 16384 + 1224)); tmp___2 = is_t4(adap->params.chip); p->bcast_frames = t4_read_reg64(adap, (u32 )(tmp___2 != 0 ? (idx + 16) * 8192 + 1232 : (idx + 12) * 16384 + 1232)); tmp___3 = is_t4(adap->params.chip); p->mcast_frames = t4_read_reg64(adap, (u32 )(tmp___3 != 0 ? (idx + 16) * 8192 + 1240 : (idx + 12) * 16384 + 1240)); tmp___4 = is_t4(adap->params.chip); p->ucast_frames = t4_read_reg64(adap, (u32 )(tmp___4 != 0 ? (idx + 16) * 8192 + 1248 : (idx + 12) * 16384 + 1248)); tmp___5 = is_t4(adap->params.chip); p->error_frames = t4_read_reg64(adap, (u32 )(tmp___5 != 0 ? (idx + 16) * 8192 + 1256 : (idx + 12) * 16384 + 1256)); tmp___6 = is_t4(adap->params.chip); p->frames_64 = t4_read_reg64(adap, (u32 )(tmp___6 != 0 ? (idx + 16) * 8192 + 1264 : (idx + 12) * 16384 + 1264)); tmp___7 = is_t4(adap->params.chip); p->frames_65_127 = t4_read_reg64(adap, (u32 )(tmp___7 != 0 ? (idx + 16) * 8192 + 1272 : (idx + 12) * 16384 + 1272)); tmp___8 = is_t4(adap->params.chip); p->frames_128_255 = t4_read_reg64(adap, (u32 )(tmp___8 != 0 ? (idx + 16) * 8192 + 1280 : (idx + 12) * 16384 + 1280)); tmp___9 = is_t4(adap->params.chip); p->frames_256_511 = t4_read_reg64(adap, (u32 )(tmp___9 != 0 ? (idx + 16) * 8192 + 1288 : (idx + 12) * 16384 + 1288)); tmp___10 = is_t4(adap->params.chip); p->frames_512_1023 = t4_read_reg64(adap, (u32 )(tmp___10 != 0 ? (idx + 16) * 8192 + 1296 : (idx + 12) * 16384 + 1296)); tmp___11 = is_t4(adap->params.chip); p->frames_1024_1518 = t4_read_reg64(adap, (u32 )(tmp___11 != 0 ? (idx + 16) * 8192 + 1304 : (idx + 12) * 16384 + 1304)); tmp___12 = is_t4(adap->params.chip); p->frames_1519_max = t4_read_reg64(adap, (u32 )(tmp___12 != 0 ? (idx + 16) * 8192 + 1312 : (idx + 12) * 16384 + 1312)); tmp___13 = is_t4(adap->params.chip); p->drop = t4_read_reg64(adap, (u32 )(tmp___13 != 0 ? (idx + 16) * 8192 + 1320 : (idx + 12) * 16384 + 1320)); if ((int )bgmap & 1) { tmp___14 = t4_read_reg64(adap, 38496U); p->ovflow0 = tmp___14; } else { p->ovflow0 = 0ULL; } if ((bgmap & 2U) != 0U) { tmp___15 = t4_read_reg64(adap, 38504U); p->ovflow1 = tmp___15; } else { p->ovflow1 = 0ULL; } if ((bgmap & 4U) != 0U) { tmp___16 = t4_read_reg64(adap, 38512U); p->ovflow2 = tmp___16; } else { p->ovflow2 = 0ULL; } if ((bgmap & 8U) != 0U) { tmp___17 = t4_read_reg64(adap, 38520U); p->ovflow3 = tmp___17; } else { p->ovflow3 = 0ULL; } if ((int )bgmap & 1) { tmp___18 = t4_read_reg64(adap, 38560U); p->trunc0 = tmp___18; } else { p->trunc0 = 0ULL; } if ((bgmap & 2U) != 0U) { tmp___19 = t4_read_reg64(adap, 38568U); p->trunc1 = tmp___19; } else { p->trunc1 = 0ULL; } if ((bgmap & 4U) != 0U) { tmp___20 = t4_read_reg64(adap, 38576U); p->trunc2 = tmp___20; } else { p->trunc2 = 0ULL; } if ((bgmap & 8U) != 0U) { tmp___21 = t4_read_reg64(adap, 38584U); p->trunc3 = tmp___21; } else { p->trunc3 = 0ULL; } return; } } void t4_mk_filtdelwr(unsigned int ftid , struct fw_filter_wr *wr , int qid ) { __u32 tmp ; __u16 tmp___0 ; { memset((void *)wr, 0, 128UL); wr->op_pkd = 2U; wr->len16_pkd = 134217728U; tmp = __fswab32((ftid << 12) | (qid < 0 ? 1024U : 0U)); wr->tid_to_iq = tmp; wr->del_filter_to_l2tix = 128U; if (qid >= 0) { tmp___0 = __fswab16((int )((__u16 )qid)); wr->rx_chan_rx_rpl_iq = tmp___0; } else { } return; } } int t4_fwaddrspace_write(struct adapter *adap , unsigned int mbox , u32 addr , u32 val ) { u32 ldst_addrspace ; struct fw_ldst_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; int tmp___2 ; { memset((void *)(& c), 0, 64UL); ldst_addrspace = 1U; tmp = __fswab32(ldst_addrspace | 27262976U); c.op_to_addrspace = tmp; c.cycles_to_len16 = 67108864U; tmp___0 = __fswab32(addr); c.u.addrval.addr = tmp___0; tmp___1 = __fswab32(val); c.u.addrval.val = tmp___1; tmp___2 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)0); return (tmp___2); } } int t4_mdio_rd(struct adapter *adap , unsigned int mbox , unsigned int phy_addr , unsigned int mmd , unsigned int reg , u16 *valp ) { int ret ; u32 ldst_addrspace ; struct fw_ldst_cmd c ; __u32 tmp ; __u16 tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; { memset((void *)(& c), 0, 64UL); ldst_addrspace = 24U; tmp = __fswab32(ldst_addrspace | 29360128U); c.op_to_addrspace = tmp; c.cycles_to_len16 = 67108864U; tmp___0 = __fswab16(((int )((__u16 )phy_addr) << 8U) | (int )((__u16 )mmd)); c.u.mdio.paddr_mmd = tmp___0; tmp___1 = __fswab16((int )((__u16 )reg)); c.u.mdio.raddr = tmp___1; ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); if (ret == 0) { tmp___2 = __fswab16((int )c.u.mdio.rval); *valp = tmp___2; } else { } return (ret); } } int t4_mdio_wr(struct adapter *adap , unsigned int mbox , unsigned int phy_addr , unsigned int mmd , unsigned int reg , u16 val ) { u32 ldst_addrspace ; struct fw_ldst_cmd c ; __u32 tmp ; __u16 tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; int tmp___3 ; { memset((void *)(& c), 0, 64UL); ldst_addrspace = 24U; tmp = __fswab32(ldst_addrspace | 27262976U); c.op_to_addrspace = tmp; c.cycles_to_len16 = 67108864U; tmp___0 = __fswab16(((int )((__u16 )phy_addr) << 8U) | (int )((__u16 )mmd)); c.u.mdio.paddr_mmd = tmp___0; tmp___1 = __fswab16((int )((__u16 )reg)); c.u.mdio.raddr = tmp___1; tmp___2 = __fswab16((int )val); c.u.mdio.rval = tmp___2; tmp___3 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)0); return (tmp___3); } } void t4_sge_decode_idma_state(struct adapter *adapter , int state ) { char const *t4_decode[35U] ; char const *t5_decode[33U] ; u32 sge_regs[3U] ; char const **sge_idma_decode ; int sge_idma_decode_nstates ; int i ; int tmp ; u32 tmp___0 ; { t4_decode[0] = "IDMA_IDLE"; t4_decode[1] = "IDMA_PUSH_MORE_CPL_FIFO"; t4_decode[2] = "IDMA_PUSH_CPL_MSG_HEADER_TO_FIFO"; t4_decode[3] = "Not used"; t4_decode[4] = "IDMA_PHYSADDR_SEND_PCIEHDR"; t4_decode[5] = "IDMA_PHYSADDR_SEND_PAYLOAD_FIRST"; t4_decode[6] = "IDMA_PHYSADDR_SEND_PAYLOAD"; t4_decode[7] = "IDMA_SEND_FIFO_TO_IMSG"; t4_decode[8] = "IDMA_FL_REQ_DATA_FL_PREP"; t4_decode[9] = "IDMA_FL_REQ_DATA_FL"; t4_decode[10] = "IDMA_FL_DROP"; t4_decode[11] = "IDMA_FL_H_REQ_HEADER_FL"; t4_decode[12] = "IDMA_FL_H_SEND_PCIEHDR"; t4_decode[13] = "IDMA_FL_H_PUSH_CPL_FIFO"; t4_decode[14] = "IDMA_FL_H_SEND_CPL"; t4_decode[15] = "IDMA_FL_H_SEND_IP_HDR_FIRST"; t4_decode[16] = "IDMA_FL_H_SEND_IP_HDR"; t4_decode[17] = "IDMA_FL_H_REQ_NEXT_HEADER_FL"; t4_decode[18] = "IDMA_FL_H_SEND_NEXT_PCIEHDR"; t4_decode[19] = "IDMA_FL_H_SEND_IP_HDR_PADDING"; t4_decode[20] = "IDMA_FL_D_SEND_PCIEHDR"; t4_decode[21] = "IDMA_FL_D_SEND_CPL_AND_IP_HDR"; t4_decode[22] = "IDMA_FL_D_REQ_NEXT_DATA_FL"; t4_decode[23] = "IDMA_FL_SEND_PCIEHDR"; t4_decode[24] = "IDMA_FL_PUSH_CPL_FIFO"; t4_decode[25] = "IDMA_FL_SEND_CPL"; t4_decode[26] = "IDMA_FL_SEND_PAYLOAD_FIRST"; t4_decode[27] = "IDMA_FL_SEND_PAYLOAD"; t4_decode[28] = "IDMA_FL_REQ_NEXT_DATA_FL"; t4_decode[29] = "IDMA_FL_SEND_NEXT_PCIEHDR"; t4_decode[30] = "IDMA_FL_SEND_PADDING"; t4_decode[31] = "IDMA_FL_SEND_COMPLETION_TO_IMSG"; t4_decode[32] = "IDMA_FL_SEND_FIFO_TO_IMSG"; t4_decode[33] = "IDMA_FL_REQ_DATAFL_DONE"; t4_decode[34] = "IDMA_FL_REQ_HEADERFL_DONE"; t5_decode[0] = "IDMA_IDLE"; t5_decode[1] = "IDMA_ALMOST_IDLE"; t5_decode[2] = "IDMA_PUSH_MORE_CPL_FIFO"; t5_decode[3] = "IDMA_PUSH_CPL_MSG_HEADER_TO_FIFO"; t5_decode[4] = "IDMA_SGEFLRFLUSH_SEND_PCIEHDR"; t5_decode[5] = "IDMA_PHYSADDR_SEND_PCIEHDR"; t5_decode[6] = "IDMA_PHYSADDR_SEND_PAYLOAD_FIRST"; t5_decode[7] = "IDMA_PHYSADDR_SEND_PAYLOAD"; t5_decode[8] = "IDMA_SEND_FIFO_TO_IMSG"; t5_decode[9] = "IDMA_FL_REQ_DATA_FL"; t5_decode[10] = "IDMA_FL_DROP"; t5_decode[11] = "IDMA_FL_DROP_SEND_INC"; t5_decode[12] = "IDMA_FL_H_REQ_HEADER_FL"; t5_decode[13] = "IDMA_FL_H_SEND_PCIEHDR"; t5_decode[14] = "IDMA_FL_H_PUSH_CPL_FIFO"; t5_decode[15] = "IDMA_FL_H_SEND_CPL"; t5_decode[16] = "IDMA_FL_H_SEND_IP_HDR_FIRST"; t5_decode[17] = "IDMA_FL_H_SEND_IP_HDR"; t5_decode[18] = "IDMA_FL_H_REQ_NEXT_HEADER_FL"; t5_decode[19] = "IDMA_FL_H_SEND_NEXT_PCIEHDR"; t5_decode[20] = "IDMA_FL_H_SEND_IP_HDR_PADDING"; t5_decode[21] = "IDMA_FL_D_SEND_PCIEHDR"; t5_decode[22] = "IDMA_FL_D_SEND_CPL_AND_IP_HDR"; t5_decode[23] = "IDMA_FL_D_REQ_NEXT_DATA_FL"; t5_decode[24] = "IDMA_FL_SEND_PCIEHDR"; t5_decode[25] = "IDMA_FL_PUSH_CPL_FIFO"; t5_decode[26] = "IDMA_FL_SEND_CPL"; t5_decode[27] = "IDMA_FL_SEND_PAYLOAD_FIRST"; t5_decode[28] = "IDMA_FL_SEND_PAYLOAD"; t5_decode[29] = "IDMA_FL_REQ_NEXT_DATA_FL"; t5_decode[30] = "IDMA_FL_SEND_NEXT_PCIEHDR"; t5_decode[31] = "IDMA_FL_SEND_PADDING"; t5_decode[32] = "IDMA_FL_SEND_COMPLETION_TO_IMSG"; sge_regs[0] = 4808U; sge_regs[1] = 4812U; sge_regs[2] = 4776U; tmp = is_t4(adapter->params.chip); if (tmp != 0) { sge_idma_decode = (char const **)(& t4_decode); sge_idma_decode_nstates = 35; } else { sge_idma_decode = (char const **)(& t5_decode); sge_idma_decode_nstates = 33; } if (state < sge_idma_decode_nstates) { dev_warn((struct device const *)adapter->pdev_dev, "idma state %s\n", *(sge_idma_decode + (unsigned long )state)); } else { dev_warn((struct device const *)adapter->pdev_dev, "idma state %d unknown\n", state); } i = 0; goto ldv_50518; ldv_50517: tmp___0 = t4_read_reg(adapter, sge_regs[i]); dev_warn((struct device const *)adapter->pdev_dev, "SGE register %#x value %#x\n", sge_regs[i], tmp___0); i = i + 1; ldv_50518: ; if ((unsigned int )i <= 2U) { goto ldv_50517; } else { } return; } } int t4_sge_ctxt_flush(struct adapter *adap , unsigned int mbox ) { int ret ; u32 ldst_addrspace ; struct fw_ldst_cmd c ; __u32 tmp ; { memset((void *)(& c), 0, 64UL); ldst_addrspace = 8U; tmp = __fswab32(ldst_addrspace | 29360128U); c.op_to_addrspace = tmp; c.cycles_to_len16 = 67108864U; c.u.idctxt.msg_ctxtflush = 64U; ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); return (ret); } } int t4_fw_hello(struct adapter *adap , unsigned int mbox , unsigned int evt_mbox , enum dev_master master , enum dev_state *state ) { int ret ; struct fw_hello_cmd c ; u32 v ; unsigned int master_mbox ; int retries ; __u32 tmp ; int tmp___0 ; u32 tmp___1 ; __u32 tmp___2 ; int waiting ; u32 pcie_fw ; int tmp___3 ; { retries = 3; retry: memset((void *)(& c), 0, 16UL); c.op_to_write = 40964U; c.retval_len16 = 16777216U; tmp = __fswab32((((unsigned int )(((unsigned int )master == 0U ? 536870912 : 0) | ((unsigned int )master == 2U ? 268435456 : 0)) | ((unsigned int )master == 2U ? mbox << 24 : 251658240U)) | (evt_mbox << 20)) | 65536U); c.err_to_clearinit = tmp; ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)(& c)); if (ret < 0) { if (ret == -16 || ret == -110) { tmp___0 = retries; retries = retries - 1; if (tmp___0 > 0) { goto retry; } else { } } else { } tmp___1 = t4_read_reg(adap, 12472U); if ((int )tmp___1 < 0) { t4_report_fw_error(adap); } else { } return (ret); } else { } tmp___2 = __fswab32(c.err_to_clearinit); v = tmp___2; master_mbox = (v >> 24) & 15U; if ((unsigned long )state != (unsigned long )((enum dev_state *)0)) { if ((int )v < 0) { *state = 2; } else if ((v & 1073741824U) != 0U) { *state = 1; } else { *state = 0; } } else { } if ((v & 3221225472U) == 0U && master_mbox != mbox) { waiting = 30000; ldv_50544: msleep(50U); waiting = waiting + -50; pcie_fw = t4_read_reg(adap, 12472U); if ((pcie_fw & 3221225472U) == 0U) { if (waiting <= 0) { tmp___3 = retries; retries = retries - 1; if (tmp___3 > 0) { goto retry; } else { } return (-110); } else { } goto ldv_50542; } else { } if ((unsigned long )state != (unsigned long )((enum dev_state *)0)) { if ((int )pcie_fw < 0) { *state = 2; } else if ((pcie_fw & 1073741824U) != 0U) { *state = 1; } else { } } else { } if (master_mbox == 7U && (pcie_fw & 32768U) != 0U) { master_mbox = (pcie_fw >> 12) & 7U; } else { } goto ldv_50543; ldv_50542: ; goto ldv_50544; ldv_50543: ; } else { } return ((int )master_mbox); } } int t4_fw_bye(struct adapter *adap , unsigned int mbox ) { struct fw_bye_cmd c ; int tmp ; { memset((void *)(& c), 0, 16UL); c.op_to_write = 40965U; c.retval_len16 = 16777216U; tmp = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp); } } int t4_early_init(struct adapter *adap , unsigned int mbox ) { struct fw_initialize_cmd c ; int tmp ; { memset((void *)(& c), 0, 16UL); c.op_to_write = 40966U; c.retval_len16 = 16777216U; tmp = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp); } } int t4_fw_reset(struct adapter *adap , unsigned int mbox , int reset ) { struct fw_reset_cmd c ; __u32 tmp ; int tmp___0 ; { memset((void *)(& c), 0, 16UL); c.op_to_write = 40963U; c.retval_len16 = 16777216U; tmp = __fswab32((__u32 )reset); c.val = tmp; tmp___0 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp___0); } } static int t4_fw_halt(struct adapter *adap , unsigned int mbox , int force ) { int ret ; struct fw_reset_cmd c ; { ret = 0; if (mbox <= 7U) { memset((void *)(& c), 0, 16UL); c.op_to_write = 40963U; c.retval_len16 = 16777216U; c.val = 50331648U; c.halt_pkd = 128U; ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); } else { } if (ret == 0 || force != 0) { t4_set_reg_field(adap, 31488U, 1U, 1U); t4_set_reg_field(adap, 12472U, 536870912U, 536870912U); } else { } return (ret); } } static int t4_fw_restart(struct adapter *adap , unsigned int mbox , int reset ) { int tmp ; int ms ; u32 tmp___0 ; { if (reset != 0) { t4_set_reg_field(adap, 12472U, 536870912U, 0U); if (mbox <= 7U) { t4_set_reg_field(adap, 31488U, 1U, 0U); msleep(100U); tmp = t4_fw_reset(adap, mbox, 3); if (tmp == 0) { return (0); } else { } } else { } t4_write_reg(adap, 103464U, 3U); msleep(2000U); } else { t4_set_reg_field(adap, 31488U, 1U, 0U); ms = 0; goto ldv_50575; ldv_50574: tmp___0 = t4_read_reg(adap, 12472U); if ((tmp___0 & 536870912U) == 0U) { return (0); } else { } msleep(100U); ms = ms + 100; ldv_50575: ; if (ms <= 9999) { goto ldv_50574; } else { } return (-110); } return (0); } } int t4_fw_upgrade(struct adapter *adap , unsigned int mbox , u8 const *fw_data , unsigned int size , int force ) { struct fw_hdr const *fw_hdr ; int reset ; int ret ; bool tmp ; int tmp___0 ; __u32 tmp___1 ; int tmp___2 ; { fw_hdr = (struct fw_hdr const *)fw_data; tmp = t4_fw_matches_chip((struct adapter const *)adap, fw_hdr); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-22); } else { } ret = t4_fw_halt(adap, mbox, force); if (ret < 0 && force == 0) { return (ret); } else { } ret = t4_load_fw(adap, fw_data, size); if (ret < 0) { return (ret); } else { } tmp___1 = __fswab32(fw_hdr->flags); reset = (tmp___1 & 1U) == 0U; tmp___2 = t4_fw_restart(adap, mbox, reset); return (tmp___2); } } int t4_fixup_host_params(struct adapter *adap , unsigned int page_size , unsigned int cache_line_size ) { unsigned int page_shift ; int tmp ; unsigned int sge_hps ; unsigned int stat_len ; unsigned int fl_align ; unsigned int fl_align_log ; int tmp___0 ; int tmp___1 ; u32 tmp___2 ; u32 tmp___3 ; { tmp = fls((int )page_size); page_shift = (unsigned int )(tmp + -1); sge_hps = page_shift - 10U; stat_len = cache_line_size > 64U ? 128U : 64U; fl_align = 32U > cache_line_size ? 32U : cache_line_size; tmp___0 = fls((int )fl_align); fl_align_log = (unsigned int )(tmp___0 + -1); t4_write_reg(adap, 4108U, (((((((sge_hps << 4) | sge_hps) | (sge_hps << 8)) | (sge_hps << 12)) | (sge_hps << 16)) | (sge_hps << 20)) | (sge_hps << 24)) | (sge_hps << 28)); tmp___1 = is_t4(adap->params.chip); if (tmp___1 != 0) { t4_set_reg_field(adap, 4104U, 131184U, ((fl_align_log - 5U) << 4) | (stat_len != 64U ? 131072U : 0U)); } else { if (fl_align <= 32U) { fl_align = 64U; fl_align_log = 6U; } else { } t4_set_reg_field(adap, 4104U, 131184U, stat_len != 64U ? 131072U : 0U); t4_set_reg_field(adap, 4388U, 458752U, (fl_align_log - 5U) << 16); } t4_write_reg(adap, 4164U, page_size); tmp___2 = t4_read_reg(adap, 4172U); t4_write_reg(adap, 4172U, ((tmp___2 + fl_align) - 1U) & - fl_align); tmp___3 = t4_read_reg(adap, 4176U); t4_write_reg(adap, 4176U, ((tmp___3 + fl_align) - 1U) & - fl_align); t4_write_reg(adap, 102776U, page_shift - 12U); return (0); } } int t4_fw_initialize(struct adapter *adap , unsigned int mbox ) { struct fw_initialize_cmd c ; int tmp ; { memset((void *)(& c), 0, 16UL); c.op_to_write = 40966U; c.retval_len16 = 16777216U; tmp = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp); } } int t4_query_params_rw(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 *val , int rw ) { int i ; int ret ; struct fw_params_cmd c ; __be32 *p ; __u32 tmp ; __be32 *tmp___0 ; u32 const *tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; u32 *tmp___4 ; __u32 tmp___5 ; { p = & c.param[0].mnem; if (nparams > 7U) { return (-22); } else { } memset((void *)(& c), 0, 64UL); tmp = __fswab32(((pf << 8) | vf) | 146800640U); c.op_to_vfn = tmp; c.retval_len16 = 67108864U; i = 0; goto ldv_50617; ldv_50616: tmp___0 = p; p = p + 1; tmp___1 = params; params = params + 1; tmp___2 = __fswab32(*tmp___1); *tmp___0 = tmp___2; if (rw != 0) { tmp___3 = __fswab32(*(val + (unsigned long )i)); *p = tmp___3; } else { } p = p + 1; i = i + 1; ldv_50617: ; if ((unsigned int )i < nparams) { goto ldv_50616; } else { } ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); if (ret == 0) { i = 0; p = & c.param[0].val; goto ldv_50620; ldv_50619: tmp___4 = val; val = val + 1; tmp___5 = __fswab32(*p); *tmp___4 = tmp___5; i = i + 1; p = p + 2UL; ldv_50620: ; if ((unsigned int )i < nparams) { goto ldv_50619; } else { } } else { } return (ret); } } int t4_query_params(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 *val ) { int tmp ; { tmp = t4_query_params_rw(adap, mbox, pf, vf, nparams, params, val, 0); return (tmp); } } int t4_set_params_timeout(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 const *val , int timeout ) { struct fw_params_cmd c ; __be32 *p ; __u32 tmp ; __be32 *tmp___0 ; u32 const *tmp___1 ; __u32 tmp___2 ; __be32 *tmp___3 ; u32 const *tmp___4 ; __u32 tmp___5 ; unsigned int tmp___6 ; int tmp___7 ; { p = & c.param[0].mnem; if (nparams > 7U) { return (-22); } else { } memset((void *)(& c), 0, 64UL); tmp = __fswab32(((pf << 8) | vf) | 144703488U); c.op_to_vfn = tmp; c.retval_len16 = 67108864U; goto ldv_50644; ldv_50643: tmp___0 = p; p = p + 1; tmp___1 = params; params = params + 1; tmp___2 = __fswab32(*tmp___1); *tmp___0 = tmp___2; tmp___3 = p; p = p + 1; tmp___4 = val; val = val + 1; tmp___5 = __fswab32(*tmp___4); *tmp___3 = tmp___5; ldv_50644: tmp___6 = nparams; nparams = nparams - 1U; if (tmp___6 != 0U) { goto ldv_50643; } else { } tmp___7 = t4_wr_mbox_timeout(adap, (int )mbox, (void const *)(& c), 64, (void *)0, timeout); return (tmp___7); } } int t4_set_params(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int nparams , u32 const *params , u32 const *val ) { int tmp ; { tmp = t4_set_params_timeout(adap, mbox, pf, vf, nparams, params, val, 10000); return (tmp); } } int t4_cfg_pfvf(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int txq , unsigned int txq_eth_ctrl , unsigned int rxqi , unsigned int rxq , unsigned int tc , unsigned int vi , unsigned int cmask , unsigned int pmask , unsigned int nexact , unsigned int rcaps , unsigned int wxcaps ) { struct fw_pfvf_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; int tmp___4 ; { memset((void *)(& c), 0, 32UL); tmp = __fswab32(((pf << 8) | vf) | 161480704U); c.op_to_vfn = tmp; c.retval_len16 = 33554432U; tmp___0 = __fswab32((rxqi << 20) | rxq); c.niqflint_niq = tmp___0; tmp___1 = __fswab32(((cmask << 24) | (pmask << 20)) | txq); c.type_to_neq = tmp___1; tmp___2 = __fswab32(((tc << 24) | (vi << 16)) | nexact); c.tc_to_nexactf = tmp___2; tmp___3 = __fswab32(((rcaps << 24) | (wxcaps << 16)) | txq_eth_ctrl); c.r_caps_to_nethctrl = tmp___3; tmp___4 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 32, (void *)0); return (tmp___4); } } int t4_alloc_vi(struct adapter *adap , unsigned int mbox , unsigned int port , unsigned int pf , unsigned int vf , unsigned int nmac , u8 *mac , unsigned int *rss_size ) { int ret ; struct fw_vi_cmd c ; __u32 tmp ; __u16 tmp___0 ; __u16 tmp___1 ; { memset((void *)(& c), 0, 64UL); tmp = __fswab32(((pf << 8) | vf) | 347078656U); c.op_to_vfn = tmp; c.alloc_to_len16 = 67108992U; c.portid_pkd = (int )((u8 )port) << 4U; c.nmac = (unsigned int )((u8 )nmac) - 1U; ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); if (ret != 0) { return (ret); } else { } if ((unsigned long )mac != (unsigned long )((u8 *)0U)) { memcpy((void *)mac, (void const *)(& c.mac), 6UL); switch (nmac) { case 5U: memcpy((void *)mac + 24U, (void const *)(& c.nmac3), 6UL); case 4U: memcpy((void *)mac + 18U, (void const *)(& c.nmac2), 6UL); case 3U: memcpy((void *)mac + 12U, (void const *)(& c.nmac1), 6UL); case 2U: memcpy((void *)mac + 6U, (void const *)(& c.nmac0), 6UL); } } else { } if ((unsigned long )rss_size != (unsigned long )((unsigned int *)0U)) { tmp___0 = __fswab16((int )c.rsssize_pkd); *rss_size = (unsigned int )tmp___0 & 2047U; } else { } tmp___1 = __fswab16((int )c.type_viid); return ((int )tmp___1 & 4095); } } int t4_free_vi(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int viid ) { struct fw_vi_cmd c ; __u32 tmp ; __u16 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 64UL); tmp = __fswab32(((pf << 8) | vf) | 344981504U); c.op_to_vfn = tmp; c.alloc_to_len16 = 67108928U; tmp___0 = __fswab16((int )((__u16 )viid)); c.type_viid = tmp___0; tmp___1 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); return (tmp___1); } } int t4_set_rxmode(struct adapter *adap , unsigned int mbox , unsigned int viid , int mtu , int promisc , int all_multi , int bcast , int vlanex , bool sleep_ok ) { struct fw_vi_rxmode_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { if (mtu < 0) { mtu = 65535; } else { } if (promisc < 0) { promisc = 3; } else { } if (all_multi < 0) { all_multi = 3; } else { } if (bcast < 0) { bcast = 3; } else { } if (vlanex < 0) { vlanex = 3; } else { } memset((void *)(& c), 0, 16UL); tmp = __fswab32(viid | 379584512U); c.op_to_viid = tmp; c.retval_len16 = 16777216U; tmp___0 = __fswab32((__u32 )(((((mtu << 16) | (promisc << 14)) | (all_multi << 12)) | (bcast << 10)) | (vlanex << 8))); c.mtu_to_vlanexen = tmp___0; tmp___1 = t4_wr_mbox_meat(adap, (int )mbox, (void const *)(& c), 16, (void *)0, (int )sleep_ok); return (tmp___1); } } int t4_alloc_mac_filt(struct adapter *adap , unsigned int mbox , unsigned int viid , bool free , unsigned int naddr , u8 const **addr , u16 *idx , u64 *hash , bool sleep_ok ) { int offset ; int ret ; struct fw_vi_mac_cmd c ; unsigned int nfilters ; unsigned int max_naddr ; unsigned int rem ; unsigned int fw_naddr ; size_t len16 ; struct fw_vi_mac_exact *p ; int i ; __u32 tmp ; __u32 tmp___0 ; u16 index ; __u16 tmp___1 ; int tmp___2 ; { ret = 0; nfilters = 0U; max_naddr = (unsigned int )adap->params.arch.mps_tcam_size; rem = naddr; if (naddr > max_naddr) { return (-22); } else { } offset = 0; goto ldv_50743; ldv_50742: fw_naddr = 7U < rem ? 7U : rem; len16 = (((unsigned long )fw_naddr + 3UL) * 8UL - 1UL) / 16UL; memset((void *)(& c), 0, 64UL); tmp = __fswab32(((unsigned int )((int )free << 20) | viid) | 362807296U); c.op_to_viid = tmp; tmp___0 = __fswab32((__u32 )((int )free << 31) | (__u32 )len16); c.freemacs_to_len16 = tmp___0; i = 0; p = (struct fw_vi_mac_exact *)(& c.u.exact); goto ldv_50735; ldv_50734: p->valid_to_idx = 65411U; memcpy((void *)(& p->macaddr), (void const *)*(addr + (unsigned long )(offset + i)), 6UL); i = i + 1; p = p + 1; ldv_50735: ; if ((unsigned int )i < fw_naddr) { goto ldv_50734; } else { } ret = t4_wr_mbox_meat(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c), (int )sleep_ok); if (ret != 0 && ret != -12) { goto ldv_50737; } else { } i = 0; p = (struct fw_vi_mac_exact *)(& c.u.exact); goto ldv_50740; ldv_50739: tmp___1 = __fswab16((int )p->valid_to_idx); index = (unsigned int )tmp___1 & 1023U; if ((unsigned long )idx != (unsigned long )((u16 *)0U)) { *(idx + (unsigned long )(offset + i)) = (unsigned int )index < max_naddr ? index : 65535U; } else { } if ((unsigned int )index < max_naddr) { nfilters = nfilters + 1U; } else if ((unsigned long )hash != (unsigned long )((u64 *)0ULL)) { tmp___2 = hash_mac_addr(*(addr + (unsigned long )(offset + i))); *hash = *hash | (1ULL << tmp___2); } else { } i = i + 1; p = p + 1; ldv_50740: ; if ((unsigned int )i < fw_naddr) { goto ldv_50739; } else { } free = 0; offset = (int )((unsigned int )offset + fw_naddr); rem = rem - fw_naddr; ldv_50743: ; if ((unsigned int )offset < naddr) { goto ldv_50742; } else { } ldv_50737: ; if (ret == 0 || ret == -12) { ret = (int )nfilters; } else { } return (ret); } } int t4_change_mac(struct adapter *adap , unsigned int mbox , unsigned int viid , int idx , u8 const *addr , bool persist , bool add_smt ) { int ret ; int mode ; struct fw_vi_mac_cmd c ; struct fw_vi_mac_exact *p ; unsigned int max_mac_addr ; __u32 tmp ; __u16 tmp___0 ; __u16 tmp___1 ; { p = (struct fw_vi_mac_exact *)(& c.u.exact); max_mac_addr = (unsigned int )adap->params.arch.mps_tcam_size; if (idx < 0) { idx = (int )persist ? 1022 : 1023; } else { } mode = (int )add_smt ? 3 : 0; memset((void *)(& c), 0, 64UL); tmp = __fswab32(viid | 362807296U); c.op_to_viid = tmp; c.freemacs_to_len16 = 16777216U; tmp___0 = __fswab16((int )((unsigned int )(((int )((__u16 )mode) << 10U) | (int )((__u16 )idx)) | 32768U)); p->valid_to_idx = tmp___0; memcpy((void *)(& p->macaddr), (void const *)addr, 6UL); ret = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)(& c)); if (ret == 0) { tmp___1 = __fswab16((int )p->valid_to_idx); ret = (int )tmp___1 & 1023; if ((unsigned int )ret >= max_mac_addr) { ret = -12; } else { } } else { } return (ret); } } int t4_set_addr_hash(struct adapter *adap , unsigned int mbox , unsigned int viid , bool ucast , u64 vec , bool sleep_ok ) { struct fw_vi_mac_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u64 tmp___1 ; int tmp___2 ; { memset((void *)(& c), 0, 64UL); tmp = __fswab32(viid | 362807296U); c.op_to_viid = tmp; tmp___0 = __fswab32((unsigned int )((int )ucast << 22) | 8388609U); c.freemacs_to_len16 = tmp___0; tmp___1 = __fswab64(vec); c.u.hash.hashvec = tmp___1; tmp___2 = t4_wr_mbox_meat(adap, (int )mbox, (void const *)(& c), 64, (void *)0, (int )sleep_ok); return (tmp___2); } } int t4_enable_vi_params(struct adapter *adap , unsigned int mbox , unsigned int viid , bool rx_en , bool tx_en , bool dcb_en ) { struct fw_vi_enable_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 16UL); tmp = __fswab32(viid | 395313152U); c.op_to_viid = tmp; tmp___0 = __fswab32((__u32 )(((((int )rx_en << 31) | ((int )tx_en << 30)) | ((int )dcb_en << 28)) | 1)); c.ien_to_len16 = tmp___0; tmp___1 = t4_wr_mbox_ns(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp___1); } } int t4_enable_vi(struct adapter *adap , unsigned int mbox , unsigned int viid , bool rx_en , bool tx_en ) { int tmp ; { tmp = t4_enable_vi_params(adap, mbox, viid, (int )rx_en, (int )tx_en, 0); return (tmp); } } int t4_identify_port(struct adapter *adap , unsigned int mbox , unsigned int viid , unsigned int nblinks ) { struct fw_vi_enable_cmd c ; __u32 tmp ; __u16 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 16UL); tmp = __fswab32(viid | 395313152U); c.op_to_viid = tmp; c.ien_to_len16 = 16777248U; tmp___0 = __fswab16((int )((__u16 )nblinks)); c.blinkdur = tmp___0; tmp___1 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 16, (void *)0); return (tmp___1); } } int t4_iq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int iqtype , unsigned int iqid , unsigned int fl0id , unsigned int fl1id ) { struct fw_iq_cmd c ; __u32 tmp ; __u32 tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; __u16 tmp___3 ; int tmp___4 ; { memset((void *)(& c), 0, 64UL); tmp = __fswab32(((pf << 8) | vf) | 277872640U); c.op_to_vfn = tmp; c.alloc_to_len16 = 67108928U; tmp___0 = __fswab32(iqtype << 29); c.type_to_iqandstindex = tmp___0; tmp___1 = __fswab16((int )((__u16 )iqid)); c.iqid = tmp___1; tmp___2 = __fswab16((int )((__u16 )fl0id)); c.fl0id = tmp___2; tmp___3 = __fswab16((int )((__u16 )fl1id)); c.fl1id = tmp___3; tmp___4 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 64, (void *)0); return (tmp___4); } } int t4_eth_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) { struct fw_eq_eth_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 48UL); tmp = __fswab32(((pf << 8) | vf) | 311427072U); c.op_to_vfn = tmp; c.alloc_to_len16 = 50331712U; tmp___0 = __fswab32(eqid); c.eqid_pkd = tmp___0; tmp___1 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 48, (void *)0); return (tmp___1); } } int t4_ctrl_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) { struct fw_eq_ctrl_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 32UL); tmp = __fswab32(((pf << 8) | vf) | 328204288U); c.op_to_vfn = tmp; c.alloc_to_len16 = 33554496U; tmp___0 = __fswab32(eqid); c.cmpliqid_eqid = tmp___0; tmp___1 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 32, (void *)0); return (tmp___1); } } int t4_ofld_eq_free(struct adapter *adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int eqid ) { struct fw_eq_ofld_cmd c ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { memset((void *)(& c), 0, 32UL); tmp = __fswab32(((pf << 8) | vf) | 563085312U); c.op_to_vfn = tmp; c.alloc_to_len16 = 33554496U; tmp___0 = __fswab32(eqid); c.eqid_pkd = tmp___0; tmp___1 = t4_wr_mbox(adap, (int )mbox, (void const *)(& c), 32, (void *)0); return (tmp___1); } } int t4_handle_fw_rpl(struct adapter *adap , __be64 const *rpl ) { u8 opcode ; int speed ; int fc ; struct fw_port_cmd const *p ; int chan ; __u32 tmp ; int port ; struct port_info *pi ; struct port_info *tmp___0 ; struct link_config *lc ; u32 stat ; __u32 tmp___1 ; int link_ok ; u32 mod ; __u16 tmp___2 ; { opcode = *((u8 const *)rpl); if ((unsigned int )opcode == 27U) { speed = 0; fc = 0; p = (struct fw_port_cmd const *)rpl; tmp = __fswab32(p->op_to_portid); chan = (int )tmp & 15; port = (int )adap->chan_map[chan]; tmp___0 = adap2pinfo(adap, port); pi = tmp___0; lc = & pi->link_cfg; tmp___1 = __fswab32(p->u.info.lstatus_to_modtype); stat = tmp___1; link_ok = (int )stat < 0; mod = stat & 31U; if ((stat & 4194304U) != 0U) { fc = fc | 1; } else { } if ((stat & 8388608U) != 0U) { fc = fc | 2; } else { } if ((stat & 16777216U) != 0U) { speed = 100; } else if ((stat & 33554432U) != 0U) { speed = 1000; } else if ((stat & 134217728U) != 0U) { speed = 10000; } else if ((stat & 268435456U) != 0U) { speed = 40000; } else { } if (((int )lc->link_ok != link_ok || (int )lc->speed != speed) || (int )lc->fc != fc) { lc->link_ok = (unsigned char )link_ok; lc->speed = (unsigned short )speed; lc->fc = (unsigned char )fc; tmp___2 = __fswab16((int )p->u.info.pcap); lc->supported = tmp___2; t4_os_link_changed(adap, port, link_ok); } else { } if ((u32 )pi->mod_type != mod) { pi->mod_type = (u8 )mod; t4_os_portmod_changed((struct adapter const *)adap, port); } else { } } else { } return (0); } } static void get_pci_mode(struct adapter *adapter , struct pci_params *p ) { u16 val ; bool tmp ; { tmp = pci_is_pcie(adapter->pdev); if ((int )tmp) { pcie_capability_read_word(adapter->pdev, 18, & val); p->speed = (unsigned int )((unsigned char )val) & 15U; p->width = (unsigned char )(((int )val & 1008) >> 4); } else { } return; } } static void init_link_config(struct link_config *lc , unsigned int caps ) { unsigned char tmp ; { lc->supported = (unsigned short )caps; lc->requested_speed = 0U; lc->speed = 0U; tmp = 3U; lc->fc = tmp; lc->requested_fc = tmp; if (((int )lc->supported & 256) != 0) { lc->advertising = (unsigned int )lc->supported & 283U; lc->autoneg = 1U; lc->requested_fc = (unsigned int )lc->requested_fc | 4U; } else { lc->advertising = 0U; lc->autoneg = 0U; } return; } } int t4_wait_dev_ready(void *regs ) { u32 whoami ; { whoami = readl((void const volatile *)regs + 103424U); if (whoami != 4294967295U && whoami != 4008636142U) { return (0); } else { } msleep(500U); whoami = readl((void const volatile *)regs + 103424U); return (whoami != 4294967295U && whoami != 4008636142U ? 0 : -5); } } static int get_flash_params(struct adapter *adap ) { struct flash_desc supported_flash[1U] ; int ret ; u32 info ; u32 tmp ; { supported_flash[0].vendor_and_model_id = 1376769U; supported_flash[0].size_mb = 4194304U; ret = sf1_write(adap, 1U, 1, 0, 159U); if (ret == 0) { ret = sf1_read(adap, 3U, 0, 1, & info); } else { } t4_write_reg(adap, 103420U, 0U); if (ret != 0) { return (ret); } else { } ret = 0; goto ldv_50865; ldv_50864: ; if (supported_flash[ret].vendor_and_model_id == info) { adap->params.sf_size = supported_flash[ret].size_mb; adap->params.sf_nsec = adap->params.sf_size / 65536U; return (0); } else { } ret = ret + 1; ldv_50865: ; if (ret == 0) { goto ldv_50864; } else { } if ((info & 255U) != 32U) { return (-22); } else { } info = info >> 16; if (info > 19U && info <= 23U) { adap->params.sf_nsec = (unsigned int )(1 << (int )(info - 16U)); } else if (info == 24U) { adap->params.sf_nsec = 64U; } else { return (-22); } adap->params.sf_size = (unsigned int )(1 << (int )info); tmp = t4_read_reg(adap, 31488U); adap->params.sf_fw_start = tmp & 4294967040U; if (adap->params.sf_size <= 2097151U) { dev_warn((struct device const *)adap->pdev_dev, "WARNING!!! FLASH size %#x < %#x!!!\n", adap->params.sf_size, 2097152); } else { } return (0); } } static void set_pcie_completion_timeout(struct adapter *adapter , u8 range ) { u16 val ; u32 pcie_cap ; int tmp ; { tmp = pci_find_capability(adapter->pdev, 16); pcie_cap = (u32 )tmp; if (pcie_cap != 0U) { pci_read_config_word((struct pci_dev const *)adapter->pdev, (int )(pcie_cap + 40U), & val); val = (unsigned int )val & 65520U; val = (int )((u16 )range) | (int )val; pci_write_config_word((struct pci_dev const *)adapter->pdev, (int )(pcie_cap + 40U), (int )val); } else { } return; } } int t4_prep_adapter(struct adapter *adapter ) { int ret ; int ver ; uint16_t device_id ; u32 pl_rev ; u32 tmp ; { get_pci_mode(adapter, & adapter->params.pci); tmp = t4_read_reg(adapter, 103484U); pl_rev = tmp & 15U; ret = get_flash_params(adapter); if (ret < 0) { dev_err((struct device const *)adapter->pdev_dev, "error %d identifying flash\n", ret); return (ret); } else { } pci_read_config_word((struct pci_dev const *)adapter->pdev, 2, & device_id); ver = (int )device_id >> 12; adapter->params.chip = 0; switch (ver) { case 4: adapter->params.chip = (enum chip_type )(((unsigned int )adapter->params.chip | pl_rev) | 64U); adapter->params.arch.sge_fl_db = 16384U; adapter->params.arch.mps_tcam_size = 336U; adapter->params.arch.mps_rplc_size = 128U; adapter->params.arch.nchan = 4U; adapter->params.arch.vfcount = 128U; goto ldv_50881; case 5: adapter->params.chip = (enum chip_type )(((unsigned int )adapter->params.chip | pl_rev) | 80U); adapter->params.arch.sge_fl_db = 24576U; adapter->params.arch.mps_tcam_size = 512U; adapter->params.arch.mps_rplc_size = 128U; adapter->params.arch.nchan = 4U; adapter->params.arch.vfcount = 128U; goto ldv_50881; case 6: adapter->params.chip = (enum chip_type )(((unsigned int )adapter->params.chip | pl_rev) | 96U); adapter->params.arch.sge_fl_db = 0U; adapter->params.arch.mps_tcam_size = 512U; adapter->params.arch.mps_rplc_size = 256U; adapter->params.arch.nchan = 2U; adapter->params.arch.vfcount = 256U; goto ldv_50881; default: dev_err((struct device const *)adapter->pdev_dev, "Device %d is not supported\n", (int )device_id); return (-22); } ldv_50881: adapter->params.cim_la_size = 2048U; init_cong_ctrl((unsigned short *)(& adapter->params.a_wnd), (unsigned short *)(& adapter->params.b_wnd)); adapter->params.nports = 1U; adapter->params.portvec = 1U; adapter->params.vpd.cclk = 50000U; set_pcie_completion_timeout(adapter, 13); return (0); } } int t4_bar2_sge_qregs(struct adapter *adapter , unsigned int qid , enum t4_bar2_qtype qtype , int user , u64 *pbar2_qoffset , unsigned int *pbar2_qid ) { unsigned int page_shift ; unsigned int page_size ; unsigned int qpp_shift ; unsigned int qpp_mask ; u64 bar2_page_offset ; u64 bar2_qoffset ; unsigned int bar2_qid ; unsigned int bar2_qid_offset ; unsigned int bar2_qinferred ; int tmp ; { if (user == 0) { tmp = is_t4(adapter->params.chip); if (tmp != 0) { return (-22); } else { } } else { } page_shift = adapter->params.sge.hps + 10U; page_size = (unsigned int )(1 << (int )page_shift); qpp_shift = (unsigned int )qtype == 0U ? adapter->params.sge.eq_qpp : adapter->params.sge.iq_qpp; qpp_mask = (unsigned int )((1 << (int )qpp_shift) + -1); bar2_page_offset = (unsigned long long )(qid >> (int )qpp_shift) << (int )page_shift; bar2_qid = qid & qpp_mask; bar2_qid_offset = bar2_qid * 128U; bar2_qoffset = bar2_page_offset; bar2_qinferred = bar2_qid_offset < page_size; if (bar2_qinferred != 0U) { bar2_qoffset = (u64 )bar2_qid_offset + bar2_qoffset; bar2_qid = 0U; } else { } *pbar2_qoffset = bar2_qoffset; *pbar2_qid = bar2_qid; return (0); } } int t4_init_devlog_params(struct adapter *adap ) { struct devlog_params *dparams ; u32 pf_dparams ; unsigned int devlog_meminfo ; struct fw_devlog_cmd devlog_cmd ; int ret ; unsigned int nentries ; unsigned int nentries128 ; __u32 tmp ; __u32 tmp___0 ; { dparams = & adap->params.devlog; pf_dparams = t4_read_reg(adap, 12504U); if (pf_dparams != 0U) { dparams->memtype = pf_dparams & 15U; dparams->start = pf_dparams & 268435440U; nentries128 = pf_dparams >> 28; nentries = (nentries128 + 1U) * 128U; dparams->size = nentries * 256U; return (0); } else { } memset((void *)(& devlog_cmd), 0, 32UL); devlog_cmd.op_to_write = 49189U; devlog_cmd.retval_len16 = 33554432U; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& devlog_cmd), 32, (void *)(& devlog_cmd)); if (ret != 0) { return (ret); } else { } tmp = __fswab32(devlog_cmd.memtype_devlog_memaddr16_devlog); devlog_meminfo = tmp; dparams->memtype = devlog_meminfo >> 28; dparams->start = devlog_meminfo << 4; tmp___0 = __fswab32(devlog_cmd.memsize_devlog); dparams->size = tmp___0; return (0); } } int t4_init_sge_params(struct adapter *adapter ) { struct sge_params *sge_params ; u32 hps ; u32 qpp ; unsigned int s_hps ; unsigned int s_qpp ; { sge_params = & adapter->params.sge; hps = t4_read_reg(adapter, 4108U); s_hps = adapter->pf * 4U; sge_params->hps = (hps >> (int )s_hps) & 15U; s_qpp = adapter->pf * 4U; qpp = t4_read_reg(adapter, 4112U); sge_params->eq_qpp = (qpp >> (int )s_qpp) & 15U; qpp = t4_read_reg(adapter, 4340U); sge_params->iq_qpp = (qpp >> (int )s_qpp) & 15U; return (0); } } int t4_init_tp_params(struct adapter *adap ) { int chan ; u32 v ; { v = t4_read_reg(adap, 32144U); adap->params.tp.tre = (v >> 16) & 255U; adap->params.tp.dack_re = v & 255U; chan = 0; goto ldv_50926; ldv_50925: adap->params.tp.tx_modq[chan] = (unsigned short )chan; chan = chan + 1; ldv_50926: ; if (chan <= 3) { goto ldv_50925; } else { } if ((adap->flags & 16U) != 0U) { t4_fw_tp_pio_rw(adap, & adap->params.tp.vlan_pri_map, 1U, 320U, 1U); t4_fw_tp_pio_rw(adap, & adap->params.tp.ingress_config, 1U, 321U, 1U); } else { t4_read_indirect(adap, 32320U, 32324U, & adap->params.tp.vlan_pri_map, 1U, 320U); t4_read_indirect(adap, 32320U, 32324U, & adap->params.tp.ingress_config, 1U, 321U); } adap->params.tp.vlan_shift = t4_filter_field_shift((struct adapter const *)adap, 8); adap->params.tp.vnic_shift = t4_filter_field_shift((struct adapter const *)adap, 4); adap->params.tp.port_shift = t4_filter_field_shift((struct adapter const *)adap, 2); adap->params.tp.protocol_shift = t4_filter_field_shift((struct adapter const *)adap, 32); if ((adap->params.tp.ingress_config & 2048U) == 0U) { adap->params.tp.vnic_shift = -1; } else { } return (0); } } int t4_filter_field_shift(struct adapter const *adap , int filter_sel ) { unsigned int filter_mode ; unsigned int sel ; int field_shift ; { filter_mode = adap->params.tp.vlan_pri_map; if ((filter_mode & (unsigned int )filter_sel) == 0U) { return (-1); } else { } sel = 1U; field_shift = 0; goto ldv_50947; ldv_50946: ; switch (filter_mode & sel) { case 1U: field_shift = field_shift + 1; goto ldv_50936; case 2U: field_shift = field_shift + 3; goto ldv_50936; case 4U: field_shift = field_shift + 17; goto ldv_50936; case 8U: field_shift = field_shift + 17; goto ldv_50936; case 16U: field_shift = field_shift + 8; goto ldv_50936; case 32U: field_shift = field_shift + 8; goto ldv_50936; case 64U: field_shift = field_shift + 16; goto ldv_50936; case 128U: field_shift = field_shift + 9; goto ldv_50936; case 256U: field_shift = field_shift + 3; goto ldv_50936; case 512U: field_shift = field_shift + 1; goto ldv_50936; } ldv_50936: sel = sel << 1; ldv_50947: ; if ((unsigned int )filter_sel > sel) { goto ldv_50946; } else { } return (field_shift); } } int t4_init_rss_mode(struct adapter *adap , int mbox ) { int i ; int ret ; struct fw_rss_vi_config_cmd rvc ; struct port_info *p ; struct port_info *tmp ; __u32 tmp___0 ; __u32 tmp___1 ; { memset((void *)(& rvc), 0, 32UL); i = 0; goto ldv_50958; ldv_50957: tmp = adap2pinfo(adap, i); p = tmp; tmp___0 = __fswab32((unsigned int )p->viid | 599785472U); rvc.op_to_viid = tmp___0; rvc.retval_len16 = 33554432U; ret = t4_wr_mbox(adap, mbox, (void const *)(& rvc), 32, (void *)(& rvc)); if (ret != 0) { return (ret); } else { } tmp___1 = __fswab32(rvc.u.basicvirtual.defaultq_to_udpen); p->rss_mode = (u8 )tmp___1; i = i + 1; ldv_50958: ; if ((int )adap->params.nports > i) { goto ldv_50957; } else { } return (0); } } int t4_port_init(struct adapter *adap , int mbox , int pf , int vf ) { u8 addr[6U] ; int ret ; int i ; int j ; struct fw_port_cmd c ; struct fw_rss_vi_config_cmd rvc ; unsigned int rss_size ; struct port_info *p ; struct port_info *tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u16 tmp___4 ; { j = 0; memset((void *)(& c), 0, 32UL); memset((void *)(& rvc), 0, 32UL); i = 0; goto ldv_50978; ldv_50977: tmp = adap2pinfo(adap, i); p = tmp; goto ldv_50975; ldv_50974: j = j + 1; ldv_50975: ; if ((((int )adap->params.portvec >> j) & 1) == 0) { goto ldv_50974; } else { } tmp___0 = __fswab32((unsigned int )j | 465567744U); c.op_to_portid = tmp___0; c.action_to_len16 = 33555200U; ret = t4_wr_mbox(adap, mbox, (void const *)(& c), 32, (void *)(& c)); if (ret != 0) { return (ret); } else { } ret = t4_alloc_vi(adap, (unsigned int )mbox, (unsigned int )j, (unsigned int )pf, (unsigned int )vf, 1U, (u8 *)(& addr), & rss_size); if (ret < 0) { return (ret); } else { } p->viid = (u16 )ret; p->tx_chan = (u8 )j; p->lport = (u8 )j; p->rss_size = (u16 )rss_size; memcpy((void *)(adap->port[i])->dev_addr, (void const *)(& addr), 6UL); (adap->port[i])->dev_port = (unsigned short )j; tmp___1 = __fswab32(c.u.info.lstatus_to_modtype); ret = (int )tmp___1; p->mdio_addr = ((unsigned int )ret & 2097152U) != 0U ? (int )((s8 )(ret >> 16)) & 31 : -1; p->port_type = (enum fw_port_type )((ret >> 8) & 31); p->mod_type = 0U; tmp___2 = __fswab32((unsigned int )p->viid | 599785472U); rvc.op_to_viid = tmp___2; rvc.retval_len16 = 33554432U; ret = t4_wr_mbox(adap, mbox, (void const *)(& rvc), 32, (void *)(& rvc)); if (ret != 0) { return (ret); } else { } tmp___3 = __fswab32(rvc.u.basicvirtual.defaultq_to_udpen); p->rss_mode = (u8 )tmp___3; tmp___4 = __fswab16((int )c.u.info.pcap); init_link_config(& p->link_cfg, (unsigned int )tmp___4); j = j + 1; i = i + 1; ldv_50978: ; if ((int )adap->params.nports > i) { goto ldv_50977; } else { } return (0); } } void t4_read_cimq_cfg(struct adapter *adap , u16 *base , u16 *size , u16 *thres ) { unsigned int i ; unsigned int v ; int cim_num_obq ; int tmp ; u16 *tmp___0 ; u16 *tmp___1 ; u16 *tmp___2 ; u16 *tmp___3 ; u16 *tmp___4 ; { tmp = is_t4(adap->params.chip); cim_num_obq = tmp != 0 ? 6 : 8; i = 0U; goto ldv_50990; ldv_50989: t4_write_reg(adap, 31560U, i | 8U); v = t4_read_reg(adap, 31564U); tmp___0 = base; base = base + 1; *tmp___0 = ((unsigned int )((u16 )(v >> 16)) & 63U) * 256U; tmp___1 = size; size = size + 1; *tmp___1 = ((unsigned int )((u16 )(v >> 24)) & 63U) * 256U; tmp___2 = thres; thres = thres + 1; *tmp___2 = ((unsigned int )((u16 )v) & 511U) * 8U; i = i + 1U; ldv_50990: ; if (i <= 5U) { goto ldv_50989; } else { } i = 0U; goto ldv_50993; ldv_50992: t4_write_reg(adap, 31560U, i | 16U); v = t4_read_reg(adap, 31564U); tmp___3 = base; base = base + 1; *tmp___3 = ((unsigned int )((u16 )(v >> 16)) & 63U) * 256U; tmp___4 = size; size = size + 1; *tmp___4 = ((unsigned int )((u16 )(v >> 24)) & 63U) * 256U; i = i + 1U; ldv_50993: ; if ((unsigned int )cim_num_obq > i) { goto ldv_50992; } else { } return; } } int t4_read_cim_ibq(struct adapter *adap , unsigned int qid , u32 *data , size_t n ) { int i ; int err ; int attempts ; unsigned int addr ; unsigned int nwords ; u32 *tmp ; { nwords = 512U; if (qid > 5U || (n & 3UL) != 0UL) { return (-22); } else { } addr = qid * nwords; if ((size_t )nwords < n) { n = (size_t )nwords; } else { } attempts = 1000000; i = 0; goto ldv_51007; ldv_51006: t4_write_reg(adap, 31584U, (addr << 16) | 1U); err = t4_wait_op_done(adap, 31584, 2U, 0, attempts, 1); if (err != 0) { return (err); } else { } tmp = data; data = data + 1; *tmp = t4_read_reg(adap, 31592U); i = i + 1; addr = addr + 1U; ldv_51007: ; if ((size_t )i < n) { goto ldv_51006; } else { } t4_write_reg(adap, 31584U, 0U); return (i); } } int t4_read_cim_obq(struct adapter *adap , unsigned int qid , u32 *data , size_t n ) { int i ; int err ; unsigned int addr ; unsigned int v ; unsigned int nwords ; int cim_num_obq ; int tmp ; u32 *tmp___0 ; { tmp = is_t4(adap->params.chip); cim_num_obq = tmp != 0 ? 6 : 8; if ((unsigned int )(cim_num_obq + -1) < qid || (n & 3UL) != 0UL) { return (-22); } else { } t4_write_reg(adap, 31560U, qid | 16U); v = t4_read_reg(adap, 31564U); addr = ((v >> 16) & 63U) * 64U; nwords = ((v >> 24) & 63U) * 64U; if ((size_t )nwords < n) { n = (size_t )nwords; } else { } i = 0; goto ldv_51022; ldv_51021: t4_write_reg(adap, 31588U, (addr << 16) | 1U); err = t4_wait_op_done(adap, 31588, 2U, 0, 2, 1); if (err != 0) { return (err); } else { } tmp___0 = data; data = data + 1; *tmp___0 = t4_read_reg(adap, 31596U); i = i + 1; addr = addr + 1U; ldv_51022: ; if ((size_t )i < n) { goto ldv_51021; } else { } t4_write_reg(adap, 31588U, 0U); return (i); } } int t4_cim_read(struct adapter *adap , unsigned int addr , unsigned int n , unsigned int *valp ) { int ret ; u32 tmp ; unsigned int *tmp___0 ; unsigned int tmp___1 ; { ret = 0; tmp = t4_read_reg(adap, 31568U); if ((tmp & 131072U) != 0U) { return (-16); } else { } goto ldv_51032; ldv_51031: t4_write_reg(adap, 31568U, addr); ret = t4_wait_op_done(adap, 31568, 131072U, 0, 5, 2); if (ret == 0) { tmp___0 = valp; valp = valp + 1; *tmp___0 = t4_read_reg(adap, 31572U); } else { } addr = addr + 4U; ldv_51032: ; if (ret == 0) { tmp___1 = n; n = n - 1U; if (tmp___1 != 0U) { goto ldv_51031; } else { goto ldv_51033; } } else { } ldv_51033: ; return (ret); } } int t4_cim_write(struct adapter *adap , unsigned int addr , unsigned int n , unsigned int const *valp ) { int ret ; u32 tmp ; unsigned int const *tmp___0 ; unsigned int tmp___1 ; { ret = 0; tmp = t4_read_reg(adap, 31568U); if ((tmp & 131072U) != 0U) { return (-16); } else { } goto ldv_51042; ldv_51041: tmp___0 = valp; valp = valp + 1; t4_write_reg(adap, 31572U, *tmp___0); t4_write_reg(adap, 31568U, addr | 65536U); ret = t4_wait_op_done(adap, 31568, 131072U, 0, 5, 2); addr = addr + 4U; ldv_51042: ; if (ret == 0) { tmp___1 = n; n = n - 1U; if (tmp___1 != 0U) { goto ldv_51041; } else { goto ldv_51043; } } else { } ldv_51043: ; return (ret); } } static int t4_cim_write1(struct adapter *adap , unsigned int addr , unsigned int val ) { int tmp ; { tmp = t4_cim_write(adap, addr, 1U, (unsigned int const *)(& val)); return (tmp); } } int t4_cim_read_la(struct adapter *adap , u32 *la_buf , unsigned int *wrptr ) { int i ; int ret ; unsigned int cfg ; unsigned int val ; unsigned int idx ; int r ; int tmp ; { ret = t4_cim_read(adap, 320U, 1U, & cfg); if (ret != 0) { return (ret); } else { } if ((int )cfg & 1) { ret = t4_cim_write1(adap, 320U, 0U); if (ret != 0) { return (ret); } else { } } else { } ret = t4_cim_read(adap, 320U, 1U, & val); if (ret != 0) { goto restart; } else { } idx = (val >> 16) & 4095U; if ((unsigned long )wrptr != (unsigned long )((unsigned int *)0U)) { *wrptr = idx; } else { } i = 0; goto ldv_51062; ldv_51061: ret = t4_cim_write1(adap, 320U, (idx << 2) | 2U); if (ret != 0) { goto ldv_51060; } else { } ret = t4_cim_read(adap, 320U, 1U, & val); if (ret != 0) { goto ldv_51060; } else { } if ((val & 2U) != 0U) { ret = -110; goto ldv_51060; } else { } ret = t4_cim_read(adap, 324U, 1U, la_buf + (unsigned long )i); if (ret != 0) { goto ldv_51060; } else { } idx = (idx + 1U) & 4095U; i = i + 1; ldv_51062: ; if ((unsigned int )i < adap->params.cim_la_size) { goto ldv_51061; } else { } ldv_51060: ; restart: ; if ((int )cfg & 1) { tmp = t4_cim_write1(adap, 320U, cfg & 4294967293U); r = tmp; if (ret == 0) { ret = r; } else { } } else { } return (ret); } } void t4_tp_read_la(struct adapter *adap , u64 *la_buf , unsigned int *wrptr ) { bool last_incomplete ; unsigned int i ; unsigned int cfg ; unsigned int val ; unsigned int idx ; u32 tmp ; { tmp = t4_read_reg(adap, 32468U); cfg = tmp & 65535U; if ((cfg & 4096U) != 0U) { t4_write_reg(adap, 32468U, adap->params.tp.la_mask | (cfg ^ 4096U)); } else { } val = t4_read_reg(adap, 32468U); idx = (val >> 16) & 127U; last_incomplete = (bool )(((val >> 14) & 3U) > 1U && (val & 8388608U) == 0U); if ((int )last_incomplete) { idx = (idx + 1U) & 127U; } else { } if ((unsigned long )wrptr != (unsigned long )((unsigned int *)0U)) { *wrptr = idx; } else { } val = val & 65535U; val = val & 4294967168U; val = adap->params.tp.la_mask | val; i = 0U; goto ldv_51075; ldv_51074: t4_write_reg(adap, 32468U, idx | val); *(la_buf + (unsigned long )i) = t4_read_reg64(adap, 32472U); idx = (idx + 1U) & 127U; i = i + 1U; ldv_51075: ; if (i <= 127U) { goto ldv_51074; } else { } if ((int )last_incomplete) { *(la_buf + 127UL) = 0xffffffffffffffffULL; } else { } if ((cfg & 4096U) != 0U) { t4_write_reg(adap, 32468U, adap->params.tp.la_mask | cfg); } else { } return; } } void t4_idma_monitor_init(struct adapter *adapter , struct sge_idma_monitor_state *idma ) { unsigned int tmp ; { tmp = core_ticks_per_usec((struct adapter const *)adapter); idma->idma_1s_thresh = tmp * 1000000U; idma->idma_stalled[0] = 0U; idma->idma_stalled[1] = 0U; return; } } void t4_idma_monitor(struct adapter *adapter , struct sge_idma_monitor_state *idma , int hz , int ticks ) { int i ; int idma_same_state_cnt[2U] ; u32 tmp ; u32 tmp___0 ; u32 debug0 ; u32 debug11 ; { t4_write_reg(adapter, 4300U, 13U); tmp = t4_read_reg(adapter, 4304U); idma_same_state_cnt[0] = (int )tmp; tmp___0 = t4_read_reg(adapter, 4308U); idma_same_state_cnt[1] = (int )tmp___0; i = 0; goto ldv_51093; ldv_51092: ; if ((unsigned int )idma_same_state_cnt[i] < idma->idma_1s_thresh) { if (idma->idma_stalled[i] >= (unsigned int )hz) { dev_warn((struct device const *)adapter->pdev_dev, "SGE idma%d, queue %u, resumed after %d seconds\n", i, idma->idma_qid[i], idma->idma_stalled[i] / (unsigned int )hz); } else { } idma->idma_stalled[i] = 0U; goto ldv_51091; } else { } if (idma->idma_stalled[i] == 0U) { idma->idma_stalled[i] = (unsigned int )hz; idma->idma_warn[i] = 0U; } else { idma->idma_stalled[i] = idma->idma_stalled[i] + (unsigned int )ticks; idma->idma_warn[i] = idma->idma_warn[i] - (unsigned int )ticks; } if (idma->idma_stalled[i] < (unsigned int )hz) { goto ldv_51091; } else { } if (idma->idma_warn[i] != 0U) { goto ldv_51091; } else { } idma->idma_warn[i] = (unsigned int )(hz * 300); t4_write_reg(adapter, 4300U, 0U); debug0 = t4_read_reg(adapter, 4308U); idma->idma_state[i] = (debug0 >> i * 9) & 63U; t4_write_reg(adapter, 4300U, 11U); debug11 = t4_read_reg(adapter, 4308U); idma->idma_qid[i] = (debug11 >> i * 16) & 65535U; dev_warn((struct device const *)adapter->pdev_dev, "SGE idma%u, queue %u, potentially stuck in state %u for %d seconds (debug0=%#x, debug11=%#x)\n", i, idma->idma_qid[i], idma->idma_state[i], idma->idma_stalled[i] / (unsigned int )hz, debug0, debug11); t4_sge_decode_idma_state(adapter, (int )idma->idma_state[i]); ldv_51091: i = i + 1; ldv_51093: ; if (i <= 1) { goto ldv_51092; } else { } return; } } bool ldv_queue_work_on_97(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_98(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_99(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_100(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_101(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void __builtin_prefetch(void const * , ...) ; __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static void set_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static int variable_test_bit(long nr , unsigned long const volatile *addr ) { int oldbit ; { __asm__ volatile ("bt %2,%1\n\tsbb %0,%0": "=r" (oldbit): "m" (*((unsigned long *)addr)), "Ir" (nr)); return (oldbit); } } __inline static unsigned long __ffs(unsigned long word ) { { __asm__ ("rep; bsf %1,%0": "=r" (word): "rm" (word)); return (word); } } extern void warn_slowpath_null(char const * , int const ) ; extern unsigned long __phys_addr(unsigned long ) ; __inline static int preempt_count(void) { int pfo_ret__ ; { switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (__preempt_count)); goto ldv_6002; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6002; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6002; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6002; default: __bad_percpu_size(); } ldv_6002: ; return (pfo_ret__ & 2147483647); } } extern int _raw_spin_trylock(raw_spinlock_t * ) ; __inline static int spin_trylock(spinlock_t *lock ) { int tmp ; { tmp = _raw_spin_trylock(& lock->__annonCompField18.rlock); return (tmp); } } extern void dump_page(struct page * , char const * ) ; extern int mod_timer(struct timer_list * , unsigned long ) ; int ldv_mod_timer_116(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; int ldv_mod_timer_117(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; int ldv_mod_timer_118(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; int ldv_mod_timer_119(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; extern int del_timer_sync(struct timer_list * ) ; int ldv_del_timer_sync_120(struct timer_list *ldv_func_arg1 ) ; int ldv_del_timer_sync_121(struct timer_list *ldv_func_arg1 ) ; bool ldv_queue_work_on_111(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_113(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_112(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_115(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_114(struct workqueue_struct *ldv_func_arg1 ) ; extern pg_data_t *node_data[] ; extern int numa_node ; __inline static int numa_node_id(void) { int pscr_ret__ ; void const *__vpp_verify ; int pfo_ret__ ; int pfo_ret_____0 ; int pfo_ret_____1 ; int pfo_ret_____2 ; { __vpp_verify = (void const *)0; switch (4UL) { case 1UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (numa_node)); goto ldv_13539; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (numa_node)); goto ldv_13539; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (numa_node)); goto ldv_13539; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (numa_node)); goto ldv_13539; default: __bad_percpu_size(); } ldv_13539: pscr_ret__ = pfo_ret__; goto ldv_13545; case 2UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____0): "m" (numa_node)); goto ldv_13549; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (numa_node)); goto ldv_13549; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (numa_node)); goto ldv_13549; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (numa_node)); goto ldv_13549; default: __bad_percpu_size(); } ldv_13549: pscr_ret__ = pfo_ret_____0; goto ldv_13545; case 4UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____1): "m" (numa_node)); goto ldv_13558; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (numa_node)); goto ldv_13558; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (numa_node)); goto ldv_13558; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (numa_node)); goto ldv_13558; default: __bad_percpu_size(); } ldv_13558: pscr_ret__ = pfo_ret_____1; goto ldv_13545; case 8UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____2): "m" (numa_node)); goto ldv_13567; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (numa_node)); goto ldv_13567; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (numa_node)); goto ldv_13567; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (numa_node)); goto ldv_13567; default: __bad_percpu_size(); } ldv_13567: pscr_ret__ = pfo_ret_____2; goto ldv_13545; default: __bad_size_call_parameter(); goto ldv_13545; } ldv_13545: ; return (pscr_ret__); } } __inline static int gfp_zonelist(gfp_t flags ) { long tmp ; { tmp = ldv__builtin_expect((flags & 262144U) != 0U, 0L); if (tmp != 0L) { return (1); } else { } return (0); } } __inline static struct zonelist *node_zonelist(int nid , gfp_t flags ) { int tmp ; { tmp = gfp_zonelist(flags); return ((struct zonelist *)(& (node_data[nid])->node_zonelists) + (unsigned long )tmp); } } extern struct page *__alloc_pages_nodemask(gfp_t , unsigned int , struct zonelist * , nodemask_t * ) ; __inline static struct page *__alloc_pages(gfp_t gfp_mask , unsigned int order , struct zonelist *zonelist ) { struct page *tmp ; { tmp = __alloc_pages_nodemask(gfp_mask, order, zonelist, (nodemask_t *)0); return (tmp); } } __inline static struct page *alloc_pages_node(int nid , gfp_t gfp_mask , unsigned int order ) { struct zonelist *tmp ; struct page *tmp___0 ; { if (nid < 0) { nid = numa_node_id(); } else { } tmp = node_zonelist(nid, gfp_mask); tmp___0 = __alloc_pages(gfp_mask, order, tmp); return (tmp___0); } } extern void __free_pages(struct page * , unsigned int ) ; extern void *__kmalloc_node(size_t , gfp_t , int ) ; __inline static void *kmalloc_node(size_t size , gfp_t flags , int node ) { void *tmp___1 ; { tmp___1 = __kmalloc_node(size, flags, node); return (tmp___1); } } __inline static void *kzalloc_node(size_t size , gfp_t flags , int node ) { void *tmp ; { tmp = kmalloc_node(size, flags | 32768U, node); return (tmp); } } int reg_timer_10(struct timer_list *timer , void (*function)(unsigned long ) , unsigned long data ) ; void disable_suitable_timer_11(struct timer_list *timer ) ; void ldv_timer_10(int state , struct timer_list *timer ) ; void choose_timer_11(void) ; void activate_suitable_timer_10(struct timer_list *timer , unsigned long data ) ; int reg_timer_11(struct timer_list *timer , void (*function)(unsigned long ) , unsigned long data ) ; void activate_suitable_timer_11(struct timer_list *timer , unsigned long data ) ; void activate_pending_timer_10(struct timer_list *timer , unsigned long data , int pending_flag ) ; void disable_suitable_timer_10(struct timer_list *timer ) ; void ldv_timer_11(int state , struct timer_list *timer ) ; void activate_pending_timer_11(struct timer_list *timer , unsigned long data , int pending_flag ) ; void choose_timer_10(void) ; __inline static void kmemcheck_mark_initialized(void *address , unsigned int n ) { { return; } } __inline static __wsum csum_unfold(__sum16 n ) { { return ((__wsum )n); } } __inline static int PageTail(struct page const *page ) { int tmp ; { tmp = constant_test_bit(15L, (unsigned long const volatile *)(& page->flags)); return (tmp); } } __inline static struct page *compound_head_by_tail(struct page *tail ) { struct page *head ; int tmp ; long tmp___0 ; { head = tail->__annonCompField46.first_page; __asm__ volatile ("": : : "memory"); tmp = PageTail((struct page const *)tail); tmp___0 = ldv__builtin_expect(tmp != 0, 1L); if (tmp___0 != 0L) { return (head); } else { } return (tail); } } __inline static struct page *compound_head(struct page *page ) { struct page *tmp ; int tmp___0 ; long tmp___1 ; { tmp___0 = PageTail((struct page const *)page); tmp___1 = ldv__builtin_expect(tmp___0 != 0, 0L); if (tmp___1 != 0L) { tmp = compound_head_by_tail(page); return (tmp); } else { } return (page); } } extern bool __get_page_tail(struct page * ) ; __inline static void get_page(struct page *page ) { bool tmp ; long tmp___0 ; int tmp___1 ; long tmp___2 ; int tmp___3 ; long tmp___4 ; { tmp___1 = PageTail((struct page const *)page); tmp___2 = ldv__builtin_expect(tmp___1 != 0, 0L); if (tmp___2 != 0L) { tmp = __get_page_tail(page); tmp___0 = ldv__builtin_expect((long )tmp, 1L); if (tmp___0 != 0L) { return; } else { } } else { } tmp___3 = atomic_read((atomic_t const *)(& page->__annonCompField42.__annonCompField41.__annonCompField40._count)); tmp___4 = ldv__builtin_expect(tmp___3 <= 0, 0L); if (tmp___4 != 0L) { dump_page(page, "VM_BUG_ON_PAGE(atomic_read(&page->_count) <= 0)"); __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/mm.h"), "i" (543), "i" (12UL)); ldv_24190: ; goto ldv_24190; } else { } atomic_inc(& page->__annonCompField42.__annonCompField41.__annonCompField40._count); return; } } extern void put_page(struct page * ) ; __inline static void *lowmem_page_address(struct page const *page ) { { return ((void *)((unsigned long )((unsigned long long )(((long )page + 24189255811072L) / 64L) << 12) + 0xffff880000000000UL)); } } __inline static int valid_dma_direction(int dma_direction ) { { return ((dma_direction == 0 || dma_direction == 1) || dma_direction == 2); } } extern void debug_dma_map_page(struct device * , struct page * , size_t , size_t , int , dma_addr_t , bool ) ; extern void debug_dma_mapping_error(struct device * , dma_addr_t ) ; extern void debug_dma_unmap_page(struct device * , dma_addr_t , size_t , int , bool ) ; extern void debug_dma_sync_single_for_cpu(struct device * , dma_addr_t , size_t , int ) ; extern struct dma_map_ops *dma_ops ; __inline static struct dma_map_ops *get_dma_ops(struct device *dev ) { long tmp ; { tmp = ldv__builtin_expect((unsigned long )dev == (unsigned long )((struct device *)0), 0L); if (tmp != 0L || (unsigned long )dev->archdata.dma_ops == (unsigned long )((struct dma_map_ops *)0)) { return (dma_ops); } else { return (dev->archdata.dma_ops); } } } __inline static dma_addr_t dma_map_single_attrs(struct device *dev , void *ptr , size_t size , enum dma_data_direction dir , struct dma_attrs *attrs ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; dma_addr_t addr ; int tmp___0 ; long tmp___1 ; unsigned long tmp___2 ; unsigned long tmp___3 ; { tmp = get_dma_ops(dev); ops = tmp; kmemcheck_mark_initialized(ptr, (unsigned int )size); tmp___0 = valid_dma_direction((int )dir); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/asm-generic/dma-mapping-common.h"), "i" (19), "i" (12UL)); ldv_26242: ; goto ldv_26242; } else { } tmp___2 = __phys_addr((unsigned long )ptr); addr = (*(ops->map_page))(dev, (struct page *)-24189255811072L + (tmp___2 >> 12), (unsigned long )ptr & 4095UL, size, dir, attrs); tmp___3 = __phys_addr((unsigned long )ptr); debug_dma_map_page(dev, (struct page *)-24189255811072L + (tmp___3 >> 12), (unsigned long )ptr & 4095UL, size, (int )dir, addr, 1); return (addr); } } __inline static void dma_unmap_single_attrs(struct device *dev , dma_addr_t addr , size_t size , enum dma_data_direction dir , struct dma_attrs *attrs ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; int tmp___0 ; long tmp___1 ; { tmp = get_dma_ops(dev); ops = tmp; tmp___0 = valid_dma_direction((int )dir); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/asm-generic/dma-mapping-common.h"), "i" (36), "i" (12UL)); ldv_26251: ; goto ldv_26251; } else { } if ((unsigned long )ops->unmap_page != (unsigned long )((void (*)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ))0)) { (*(ops->unmap_page))(dev, addr, size, dir, attrs); } else { } debug_dma_unmap_page(dev, addr, size, (int )dir, 1); return; } } __inline static dma_addr_t dma_map_page(struct device *dev , struct page *page , size_t offset , size_t size , enum dma_data_direction dir ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; dma_addr_t addr ; void *tmp___0 ; int tmp___1 ; long tmp___2 ; { tmp = get_dma_ops(dev); ops = tmp; tmp___0 = lowmem_page_address((struct page const *)page); kmemcheck_mark_initialized(tmp___0 + offset, (unsigned int )size); tmp___1 = valid_dma_direction((int )dir); tmp___2 = ldv__builtin_expect(tmp___1 == 0, 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/asm-generic/dma-mapping-common.h"), "i" (84), "i" (12UL)); ldv_26286: ; goto ldv_26286; } else { } addr = (*(ops->map_page))(dev, page, offset, size, dir, (struct dma_attrs *)0); debug_dma_map_page(dev, page, offset, size, (int )dir, addr, 0); return (addr); } } __inline static void dma_unmap_page(struct device *dev , dma_addr_t addr , size_t size , enum dma_data_direction dir ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; int tmp___0 ; long tmp___1 ; { tmp = get_dma_ops(dev); ops = tmp; tmp___0 = valid_dma_direction((int )dir); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/asm-generic/dma-mapping-common.h"), "i" (96), "i" (12UL)); ldv_26294: ; goto ldv_26294; } else { } if ((unsigned long )ops->unmap_page != (unsigned long )((void (*)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ))0)) { (*(ops->unmap_page))(dev, addr, size, dir, (struct dma_attrs *)0); } else { } debug_dma_unmap_page(dev, addr, size, (int )dir, 0); return; } } __inline static void dma_sync_single_for_cpu(struct device *dev , dma_addr_t addr , size_t size , enum dma_data_direction dir ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; int tmp___0 ; long tmp___1 ; { tmp = get_dma_ops(dev); ops = tmp; tmp___0 = valid_dma_direction((int )dir); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/asm-generic/dma-mapping-common.h"), "i" (108), "i" (12UL)); ldv_26302: ; goto ldv_26302; } else { } if ((unsigned long )ops->sync_single_for_cpu != (unsigned long )((void (*)(struct device * , dma_addr_t , size_t , enum dma_data_direction ))0)) { (*(ops->sync_single_for_cpu))(dev, addr, size, dir); } else { } debug_dma_sync_single_for_cpu(dev, addr, size, (int )dir); return; } } __inline static int dma_mapping_error(struct device *dev , dma_addr_t dma_addr ) { struct dma_map_ops *ops ; struct dma_map_ops *tmp ; int tmp___0 ; { tmp = get_dma_ops(dev); ops = tmp; debug_dma_mapping_error(dev, dma_addr); if ((unsigned long )ops->mapping_error != (unsigned long )((int (*)(struct device * , dma_addr_t ))0)) { tmp___0 = (*(ops->mapping_error))(dev, dma_addr); return (tmp___0); } else { } return (dma_addr == 0ULL); } } extern void *dma_alloc_attrs(struct device * , size_t , dma_addr_t * , gfp_t , struct dma_attrs * ) ; extern void dma_free_attrs(struct device * , size_t , void * , dma_addr_t , struct dma_attrs * ) ; __inline static unsigned int skb_frag_size(skb_frag_t const *frag ) { { return ((unsigned int )frag->size); } } __inline static void skb_frag_size_set(skb_frag_t *frag , unsigned int size ) { { frag->size = size; return; } } extern void consume_skb(struct sk_buff * ) ; __inline static void skb_set_hash(struct sk_buff *skb , __u32 hash , enum pkt_hash_types type ) { { skb->l4_hash = (unsigned int )type == 3U; skb->sw_hash = 0U; skb->hash = hash; return; } } __inline static unsigned char *skb_end_pointer(struct sk_buff const *skb ) { { return ((unsigned char *)skb->head + (unsigned long )skb->end); } } __inline static struct sk_buff *skb_peek(struct sk_buff_head const *list_ ) { struct sk_buff *skb ; { skb = list_->next; if ((unsigned long )skb == (unsigned long )((struct sk_buff *)list_)) { skb = (struct sk_buff *)0; } else { } return (skb); } } __inline static void __skb_queue_head_init(struct sk_buff_head *list ) { struct sk_buff *tmp ; { tmp = (struct sk_buff *)list; list->next = tmp; list->prev = tmp; list->qlen = 0U; return; } } __inline static void skb_queue_head_init(struct sk_buff_head *list ) { struct lock_class_key __key ; { spinlock_check(& list->lock); __raw_spin_lock_init(& list->lock.__annonCompField18.rlock, "&(&list->lock)->rlock", & __key); __skb_queue_head_init(list); return; } } __inline static void __skb_insert(struct sk_buff *newsk , struct sk_buff *prev , struct sk_buff *next , struct sk_buff_head *list ) { struct sk_buff *tmp ; { newsk->__annonCompField79.__annonCompField78.next = next; newsk->__annonCompField79.__annonCompField78.prev = prev; tmp = newsk; prev->__annonCompField79.__annonCompField78.next = tmp; next->__annonCompField79.__annonCompField78.prev = tmp; list->qlen = list->qlen + 1U; return; } } __inline static void __skb_queue_before(struct sk_buff_head *list , struct sk_buff *next , struct sk_buff *newsk ) { { __skb_insert(newsk, next->__annonCompField79.__annonCompField78.prev, next, list); return; } } __inline static void __skb_queue_tail(struct sk_buff_head *list , struct sk_buff *newsk ) { { __skb_queue_before(list, (struct sk_buff *)list, newsk); return; } } __inline static void __skb_unlink(struct sk_buff *skb , struct sk_buff_head *list ) { struct sk_buff *next ; struct sk_buff *prev ; struct sk_buff *tmp ; { list->qlen = list->qlen - 1U; next = skb->__annonCompField79.__annonCompField78.next; prev = skb->__annonCompField79.__annonCompField78.prev; tmp = (struct sk_buff *)0; skb->__annonCompField79.__annonCompField78.prev = tmp; skb->__annonCompField79.__annonCompField78.next = tmp; next->__annonCompField79.__annonCompField78.prev = prev; prev->__annonCompField79.__annonCompField78.next = next; return; } } __inline static struct sk_buff *__skb_dequeue(struct sk_buff_head *list ) { struct sk_buff *skb ; struct sk_buff *tmp ; { tmp = skb_peek((struct sk_buff_head const *)list); skb = tmp; if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { __skb_unlink(skb, list); } else { } return (skb); } } __inline static unsigned int skb_headlen(struct sk_buff const *skb ) { { return ((unsigned int )skb->len - (unsigned int )skb->data_len); } } __inline static void __skb_fill_page_desc(struct sk_buff *skb , int i , struct page *page , int off , int size ) { skb_frag_t *frag ; unsigned char *tmp ; { tmp = skb_end_pointer((struct sk_buff const *)skb); frag = (skb_frag_t *)(& ((struct skb_shared_info *)tmp)->frags) + (unsigned long )i; frag->page.p = page; frag->page_offset = (__u32 )off; skb_frag_size_set(frag, (unsigned int )size); page = compound_head(page); if ((int )page->__annonCompField42.__annonCompField37.pfmemalloc && (unsigned long )page->__annonCompField36.mapping == (unsigned long )((struct address_space *)0)) { skb->pfmemalloc = 1U; } else { } return; } } __inline static unsigned char *__skb_put___1(struct sk_buff *skb , unsigned int len ) { unsigned char *tmp ; unsigned char *tmp___0 ; bool tmp___1 ; long tmp___2 ; { tmp___0 = skb_tail_pointer((struct sk_buff const *)skb); tmp = tmp___0; tmp___1 = skb_is_nonlinear((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect((long )tmp___1, 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (1696), "i" (12UL)); ldv_27590: ; goto ldv_27590; } else { } skb->tail = skb->tail + len; skb->len = skb->len + len; return (tmp); } } __inline static unsigned char *__skb_pull(struct sk_buff *skb , unsigned int len ) { long tmp ; unsigned char *tmp___0 ; { skb->len = skb->len - len; tmp = ldv__builtin_expect(skb->len < skb->data_len, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (1714), "i" (12UL)); ldv_27605: ; goto ldv_27605; } else { } tmp___0 = skb->data + (unsigned long )len; skb->data = tmp___0; return (tmp___0); } } __inline static unsigned char *skb_transport_header(struct sk_buff const *skb ) { { return ((unsigned char *)skb->head + (unsigned long )skb->transport_header); } } __inline static void skb_reset_transport_header(struct sk_buff *skb ) { { skb->transport_header = (int )((__u16 )((long )skb->data)) - (int )((__u16 )((long )skb->head)); return; } } __inline static void skb_set_transport_header(struct sk_buff *skb , int const offset ) { { skb_reset_transport_header(skb); skb->transport_header = (int )skb->transport_header + (int )((__u16 )offset); return; } } __inline static unsigned char *skb_network_header(struct sk_buff const *skb ) { { return ((unsigned char *)skb->head + (unsigned long )skb->network_header); } } __inline static void skb_reset_network_header(struct sk_buff *skb ) { { skb->network_header = (int )((__u16 )((long )skb->data)) - (int )((__u16 )((long )skb->head)); return; } } __inline static void skb_set_network_header(struct sk_buff *skb , int const offset ) { { skb_reset_network_header(skb); skb->network_header = (int )skb->network_header + (int )((__u16 )offset); return; } } __inline static void skb_reset_mac_header(struct sk_buff *skb ) { { skb->mac_header = (int )((__u16 )((long )skb->data)) - (int )((__u16 )((long )skb->head)); return; } } __inline static int skb_transport_offset(struct sk_buff const *skb ) { unsigned char *tmp ; { tmp = skb_transport_header(skb); return ((int )((unsigned int )((long )tmp) - (unsigned int )((long )skb->data))); } } __inline static u32 skb_network_header_len(struct sk_buff const *skb ) { { return ((u32 )((int )skb->transport_header - (int )skb->network_header)); } } __inline static int skb_network_offset(struct sk_buff const *skb ) { unsigned char *tmp ; { tmp = skb_network_header(skb); return ((int )((unsigned int )((long )tmp) - (unsigned int )((long )skb->data))); } } __inline static void skb_orphan(struct sk_buff *skb ) { long tmp ; { if ((unsigned long )skb->destructor != (unsigned long )((void (*)(struct sk_buff * ))0)) { (*(skb->destructor))(skb); skb->destructor = (void (*)(struct sk_buff * ))0; skb->sk = (struct sock *)0; } else { tmp = ldv__builtin_expect((unsigned long )skb->sk != (unsigned long )((struct sock *)0), 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (2106), "i" (12UL)); ldv_27781: ; goto ldv_27781; } else { } } return; } } __inline static void __skb_queue_purge(struct sk_buff_head *list ) { struct sk_buff *skb ; { goto ldv_27793; ldv_27792: kfree_skb(skb); ldv_27793: skb = __skb_dequeue(list); if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { goto ldv_27792; } else { } return; } } extern struct sk_buff *__netdev_alloc_skb(struct net_device * , unsigned int , gfp_t ) ; __inline static struct sk_buff *netdev_alloc_skb(struct net_device *dev , unsigned int length ) { struct sk_buff *tmp ; { tmp = __netdev_alloc_skb(dev, length, 32U); return (tmp); } } __inline static struct sk_buff *dev_alloc_skb(unsigned int length ) { struct sk_buff *tmp ; { tmp = netdev_alloc_skb((struct net_device *)0, length); return (tmp); } } __inline static struct page *skb_frag_page(skb_frag_t const *frag ) { { return ((struct page *)frag->page.p); } } __inline static dma_addr_t skb_frag_dma_map(struct device *dev , skb_frag_t const *frag , size_t offset , size_t size , enum dma_data_direction dir ) { struct page *tmp ; dma_addr_t tmp___0 ; { tmp = skb_frag_page(frag); tmp___0 = dma_map_page(dev, tmp, (size_t )frag->page_offset + offset, size, dir); return (tmp___0); } } extern int skb_copy_bits(struct sk_buff const * , int , void * , int ) ; __inline static void skb_copy_from_linear_data(struct sk_buff const *skb , void *to , unsigned int const len ) { { memcpy(to, (void const *)skb->data, (size_t )len); return; } } __inline static void skb_copy_to_linear_data(struct sk_buff *skb , void const *from , unsigned int const len ) { { memcpy((void *)skb->data, from, (size_t )len); return; } } __inline static u16 skb_get_queue_mapping(struct sk_buff const *skb ) { { return ((u16 )skb->queue_mapping); } } __inline static void skb_record_rx_queue(struct sk_buff *skb , u16 rx_queue ) { { skb->queue_mapping = (unsigned int )rx_queue + 1U; return; } } __inline static void skb_checksum_none_assert(struct sk_buff const *skb ) { { return; } } extern void tasklet_kill(struct tasklet_struct * ) ; extern void tasklet_init(struct tasklet_struct * , void (*)(unsigned long ) , unsigned long ) ; extern void __napi_schedule(struct napi_struct * ) ; __inline static bool napi_disable_pending(struct napi_struct *n ) { int tmp ; { tmp = constant_test_bit(1L, (unsigned long const volatile *)(& n->state)); return (tmp != 0); } } __inline static bool napi_schedule_prep(struct napi_struct *n ) { bool tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { tmp = napi_disable_pending(n); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { tmp___1 = test_and_set_bit(0L, (unsigned long volatile *)(& n->state)); if (tmp___1 == 0) { tmp___2 = 1; } else { tmp___2 = 0; } } else { tmp___2 = 0; } return ((bool )tmp___2); } } __inline static void napi_schedule(struct napi_struct *n ) { bool tmp ; { tmp = napi_schedule_prep(n); if ((int )tmp) { __napi_schedule(n); } else { } return; } } __inline static bool napi_reschedule(struct napi_struct *napi ) { bool tmp ; { tmp = napi_schedule_prep(napi); if ((int )tmp) { __napi_schedule(napi); return (1); } else { } return (0); } } __inline static void napi_complete(struct napi_struct *n ) { { return; } } extern void napi_hash_add(struct napi_struct * ) ; extern void napi_hash_del(struct napi_struct * ) ; __inline static int netdev_queue_numa_node_read(struct netdev_queue const *q ) { { return ((int )q->numa_node); } } extern void netif_napi_add(struct net_device * , struct napi_struct * , int (*)(struct napi_struct * , int ) , int ) ; extern void netif_napi_del(struct napi_struct * ) ; __inline static void netif_tx_stop_queue(struct netdev_queue *dev_queue ) { { set_bit(0L, (unsigned long volatile *)(& dev_queue->state)); return; } } extern void __dev_kfree_skb_any(struct sk_buff * , enum skb_free_reason ) ; __inline static void dev_kfree_skb_any(struct sk_buff *skb ) { { __dev_kfree_skb_any(skb, 1); return; } } __inline static void dev_consume_skb_any(struct sk_buff *skb ) { { __dev_kfree_skb_any(skb, 0); return; } } extern int netif_receive_skb_sk(struct sock * , struct sk_buff * ) ; __inline static int netif_receive_skb(struct sk_buff *skb ) { int tmp ; { tmp = netif_receive_skb_sk(skb->sk, skb); return (tmp); } } extern struct sk_buff *napi_get_frags(struct napi_struct * ) ; extern gro_result_t napi_gro_frags(struct napi_struct * ) ; __inline static bool __netif_tx_trylock(struct netdev_queue *txq ) { bool ok ; int tmp ; int pscr_ret__ ; void const *__vpp_verify ; int pfo_ret__ ; int pfo_ret_____0 ; int pfo_ret_____1 ; int pfo_ret_____2 ; long tmp___0 ; { tmp = spin_trylock(& txq->_xmit_lock); ok = tmp != 0; tmp___0 = ldv__builtin_expect((long )ok, 1L); if (tmp___0 != 0L) { __vpp_verify = (void const *)0; switch (4UL) { case 1UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (cpu_number)); goto ldv_43397; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_43397; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_43397; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_43397; default: __bad_percpu_size(); } ldv_43397: pscr_ret__ = pfo_ret__; goto ldv_43403; case 2UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____0): "m" (cpu_number)); goto ldv_43407; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_43407; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_43407; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____0): "m" (cpu_number)); goto ldv_43407; default: __bad_percpu_size(); } ldv_43407: pscr_ret__ = pfo_ret_____0; goto ldv_43403; case 4UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____1): "m" (cpu_number)); goto ldv_43416; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_43416; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_43416; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____1): "m" (cpu_number)); goto ldv_43416; default: __bad_percpu_size(); } ldv_43416: pscr_ret__ = pfo_ret_____1; goto ldv_43403; case 8UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret_____2): "m" (cpu_number)); goto ldv_43425; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_43425; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_43425; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret_____2): "m" (cpu_number)); goto ldv_43425; default: __bad_percpu_size(); } ldv_43425: pscr_ret__ = pfo_ret_____2; goto ldv_43403; default: __bad_size_call_parameter(); goto ldv_43403; } ldv_43403: txq->xmit_lock_owner = pscr_ret__; } else { } return (ok); } } __inline static void __netif_tx_unlock(struct netdev_queue *txq ) { { txq->xmit_lock_owner = -1; spin_unlock(& txq->_xmit_lock); return; } } extern __be16 eth_type_trans(struct sk_buff * , struct net_device * ) ; __inline static void __vlan_hwaccel_put_tag(struct sk_buff *skb , __be16 vlan_proto , u16 vlan_tci ) { { skb->vlan_proto = vlan_proto; skb->vlan_tci = (__u16 )((unsigned int )vlan_tci | 4096U); return; } } __inline static struct iphdr *ip_hdr(struct sk_buff const *skb ) { unsigned char *tmp ; { tmp = skb_network_header(skb); return ((struct iphdr *)tmp); } } __inline static struct tcphdr *tcp_hdr(struct sk_buff const *skb ) { unsigned char *tmp ; { tmp = skb_transport_header(skb); return ((struct tcphdr *)tmp); } } __inline static void skb_mark_napi_id(struct sk_buff *skb , struct napi_struct *napi ) { { skb->__annonCompField82.napi_id = napi->napi_id; return; } } int cxgb4_ofld_send(struct net_device *dev , struct sk_buff *skb ) ; struct sk_buff *cxgb4_pktgl_to_skb(struct pkt_gl const *gl , unsigned int skb_len , unsigned int pull_len ) ; bool cxgb_fcoe_sof_eof_supported(struct adapter *adap , struct sk_buff *skb ) ; __inline static bool cxgb_poll_unlock_napi(struct sge_rspq *q ) { bool rc ; { rc = 0; spin_lock(& q->bpoll_lock); if (((unsigned long )q->bpoll_state & 8UL) != 0UL) { rc = 1; } else { } q->bpoll_state = 0U; spin_unlock(& q->bpoll_lock); return (rc); } } __inline static bool cxgb_poll_lock_poll(struct sge_rspq *q ) { bool rc ; { rc = 1; spin_lock_bh(& q->bpoll_lock); if (((unsigned long )q->bpoll_state & 3UL) != 0UL) { q->bpoll_state = q->bpoll_state | 8U; rc = 0; } else { q->bpoll_state = q->bpoll_state | 2U; } spin_unlock_bh(& q->bpoll_lock); return (rc); } } __inline static bool cxgb_poll_unlock_poll(struct sge_rspq *q ) { bool rc ; { rc = 0; spin_lock_bh(& q->bpoll_lock); if (((unsigned long )q->bpoll_state & 8UL) != 0UL) { rc = 1; } else { } q->bpoll_state = 0U; spin_unlock_bh(& q->bpoll_lock); return (rc); } } __inline static bool cxgb_poll_busy_polling(struct sge_rspq *q ) { { return (((unsigned long )q->bpoll_state & 10UL) != 0UL); } } void t4_free_ofld_rxqs(struct adapter *adap , int n , struct sge_ofld_rxq *q ) ; __inline static unsigned int core_ticks_to_us(struct adapter const *adapter , unsigned int ticks ) { { return ((ticks * 1000U + (unsigned int )adapter->params.vpd.cclk / 2U) / (unsigned int )adapter->params.vpd.cclk); } } __inline static unsigned int fl_mtu_bufsize(struct adapter *adapter , unsigned int mtu ) { struct sge *s ; { s = & adapter->sge; return ((((s->pktshift + mtu) + s->fl_align) + 17U) & - s->fl_align); } } static int timer_pkt_quota[6U] = { 1, 1, 2, 3, 4, 5}; __inline static dma_addr_t get_buf_addr(struct rx_sw_desc const *d ) { { return ((dma_addr_t )d->dma_addr & 0xffffffffffffffe0ULL); } } __inline static bool is_buf_mapped(struct rx_sw_desc const *d ) { { return (((unsigned long long )d->dma_addr & 16ULL) == 0ULL); } } __inline static unsigned int txq_avail(struct sge_txq const *q ) { { return (((unsigned int )q->size - (unsigned int )q->in_use) - 1U); } } __inline static unsigned int fl_cap(struct sge_fl const *fl ) { { return ((unsigned int )fl->size - 8U); } } __inline static bool fl_starving(struct adapter const *adapter , struct sge_fl const *fl ) { struct sge const *s ; { s = & adapter->sge; return ((unsigned int )fl->avail - (unsigned int )fl->pend_cred <= (unsigned int )s->fl_starve_thres); } } static int map_skb(struct device *dev , struct sk_buff const *skb , dma_addr_t *addr ) { skb_frag_t const *fp ; skb_frag_t const *end ; struct skb_shared_info const *si ; unsigned int tmp ; int tmp___0 ; unsigned char *tmp___1 ; unsigned int tmp___2 ; int tmp___3 ; unsigned int tmp___4 ; skb_frag_t const *tmp___5 ; unsigned int tmp___6 ; { tmp = skb_headlen(skb); *addr = dma_map_single_attrs(dev, (void *)skb->data, (size_t )tmp, 1, (struct dma_attrs *)0); tmp___0 = dma_mapping_error(dev, *addr); if (tmp___0 != 0) { goto out_err; } else { } tmp___1 = skb_end_pointer(skb); si = (struct skb_shared_info const *)tmp___1; end = (skb_frag_t const *)(& si->frags) + (unsigned long )si->nr_frags; fp = (skb_frag_t const *)(& si->frags); goto ldv_59109; ldv_59108: addr = addr + 1; tmp___2 = skb_frag_size(fp); *addr = skb_frag_dma_map(dev, fp, 0UL, (size_t )tmp___2, 1); tmp___3 = dma_mapping_error(dev, *addr); if (tmp___3 != 0) { goto unwind; } else { } fp = fp + 1; ldv_59109: ; if ((unsigned long )fp < (unsigned long )end) { goto ldv_59108; } else { } return (0); unwind: ; goto ldv_59112; ldv_59111: tmp___4 = skb_frag_size(fp); addr = addr - 1; dma_unmap_page(dev, *addr, (size_t )tmp___4, 1); ldv_59112: tmp___5 = fp; fp = fp - 1; if ((unsigned long )tmp___5 > (unsigned long )((skb_frag_t const *)(& si->frags))) { goto ldv_59111; } else { } tmp___6 = skb_headlen(skb); dma_unmap_single_attrs(dev, *(addr + 0xffffffffffffffffUL), (size_t )tmp___6, 1, (struct dma_attrs *)0); out_err: ; return (-12); } } static void unmap_skb(struct device *dev , struct sk_buff const *skb , dma_addr_t const *addr ) { skb_frag_t const *fp ; skb_frag_t const *end ; struct skb_shared_info const *si ; unsigned int tmp ; dma_addr_t const *tmp___0 ; unsigned char *tmp___1 ; unsigned int tmp___2 ; dma_addr_t const *tmp___3 ; { tmp = skb_headlen(skb); tmp___0 = addr; addr = addr + 1; dma_unmap_single_attrs(dev, *tmp___0, (size_t )tmp, 1, (struct dma_attrs *)0); tmp___1 = skb_end_pointer(skb); si = (struct skb_shared_info const *)tmp___1; end = (skb_frag_t const *)(& si->frags) + (unsigned long )si->nr_frags; fp = (skb_frag_t const *)(& si->frags); goto ldv_59123; ldv_59122: tmp___2 = skb_frag_size(fp); tmp___3 = addr; addr = addr + 1; dma_unmap_page(dev, *tmp___3, (size_t )tmp___2, 1); fp = fp + 1; ldv_59123: ; if ((unsigned long )fp < (unsigned long )end) { goto ldv_59122; } else { } return; } } static void deferred_unmap_destructor(struct sk_buff *skb ) { { unmap_skb((skb->dev)->dev.parent, (struct sk_buff const *)skb, (dma_addr_t const *)skb->head); return; } } static void unmap_sgl(struct device *dev , struct sk_buff const *skb , struct ulptx_sgl const *sgl , struct sge_txq const *q ) { struct ulptx_sge_pair const *p ; unsigned int nfrags ; unsigned char *tmp ; __u32 tmp___0 ; __u64 tmp___1 ; __u32 tmp___2 ; __u64 tmp___3 ; unsigned int tmp___4 ; long tmp___5 ; __u32 tmp___6 ; __u64 tmp___7 ; __u32 tmp___8 ; __u64 tmp___9 ; __be64 const *addr ; __u32 tmp___10 ; __u64 tmp___11 ; __u32 tmp___12 ; __u64 tmp___13 ; __be64 const *addr___0 ; __u32 tmp___14 ; __u64 tmp___15 ; __u32 tmp___16 ; __u64 tmp___17 ; long tmp___18 ; __be64 addr___1 ; __u32 tmp___19 ; __u64 tmp___20 ; { tmp = skb_end_pointer(skb); nfrags = (unsigned int )((struct skb_shared_info *)tmp)->nr_frags; tmp___4 = skb_headlen(skb); tmp___5 = ldv__builtin_expect(tmp___4 != 0U, 1L); if (tmp___5 != 0L) { tmp___0 = __fswab32(sgl->len0); tmp___1 = __fswab64(sgl->addr0); dma_unmap_single_attrs(dev, tmp___1, (size_t )tmp___0, 1, (struct dma_attrs *)0); } else { tmp___2 = __fswab32(sgl->len0); tmp___3 = __fswab64(sgl->addr0); dma_unmap_page(dev, tmp___3, (size_t )tmp___2, 1); nfrags = nfrags - 1U; } p = (struct ulptx_sge_pair const *)(& sgl->sge); goto ldv_59140; ldv_59139: tmp___18 = ldv__builtin_expect((unsigned long )((u8 *)p + 1U) <= (unsigned long )((u8 *)q->stat), 1L); if (tmp___18 != 0L) { unmap: tmp___6 = __fswab32(p->len[0]); tmp___7 = __fswab64(p->addr[0]); dma_unmap_page(dev, tmp___7, (size_t )tmp___6, 1); tmp___8 = __fswab32(p->len[1]); tmp___9 = __fswab64(p->addr[1]); dma_unmap_page(dev, tmp___9, (size_t )tmp___8, 1); p = p + 1; } else if ((unsigned long )((u8 *)q->stat) == (unsigned long )((u8 *)p)) { p = (struct ulptx_sge_pair const *)q->desc; goto unmap; } else if ((unsigned long )((u8 *)p + 8UL) == (unsigned long )((u8 *)q->stat)) { addr = (__be64 const *)q->desc; tmp___10 = __fswab32(p->len[0]); tmp___11 = __fswab64(*addr); dma_unmap_page(dev, tmp___11, (size_t )tmp___10, 1); tmp___12 = __fswab32(p->len[1]); tmp___13 = __fswab64(*(addr + 1UL)); dma_unmap_page(dev, tmp___13, (size_t )tmp___12, 1); p = (struct ulptx_sge_pair const *)addr + 2U; } else { addr___0 = (__be64 const *)q->desc; tmp___14 = __fswab32(p->len[0]); tmp___15 = __fswab64(p->addr[0]); dma_unmap_page(dev, tmp___15, (size_t )tmp___14, 1); tmp___16 = __fswab32(p->len[1]); tmp___17 = __fswab64(*addr___0); dma_unmap_page(dev, tmp___17, (size_t )tmp___16, 1); p = (struct ulptx_sge_pair const *)addr___0 + 1U; } nfrags = nfrags - 2U; ldv_59140: ; if (nfrags > 1U) { goto ldv_59139; } else { } if (nfrags != 0U) { if ((unsigned long )((u8 *)q->stat) == (unsigned long )((u8 *)p)) { p = (struct ulptx_sge_pair const *)q->desc; } else { } addr___1 = (unsigned long )((u8 *)p + 16UL) <= (unsigned long )((u8 *)q->stat) ? p->addr[0] : *((__be64 const *)q->desc); tmp___19 = __fswab32(p->len[0]); tmp___20 = __fswab64(addr___1); dma_unmap_page(dev, tmp___20, (size_t )tmp___19, 1); } else { } return; } } static void free_tx_desc(struct adapter *adap , struct sge_txq *q , unsigned int n , bool unmap ) { struct tx_sw_desc *d ; unsigned int cidx ; struct device *dev ; unsigned int tmp ; { cidx = q->cidx; dev = adap->pdev_dev; d = q->sdesc + (unsigned long )cidx; goto ldv_59153; ldv_59152: ; if ((unsigned long )d->skb != (unsigned long )((struct sk_buff *)0)) { if ((int )unmap) { unmap_sgl(dev, (struct sk_buff const *)d->skb, (struct ulptx_sgl const *)d->sgl, (struct sge_txq const *)q); } else { } dev_consume_skb_any(d->skb); d->skb = (struct sk_buff *)0; } else { } d = d + 1; cidx = cidx + 1U; if (cidx == q->size) { cidx = 0U; d = q->sdesc; } else { } ldv_59153: tmp = n; n = n - 1U; if (tmp != 0U) { goto ldv_59152; } else { } q->cidx = cidx; return; } } __inline static int reclaimable(struct sge_txq const *q ) { int hw_cidx ; __u16 tmp ; { tmp = __fswab16((int )(q->stat)->cidx); hw_cidx = (int )tmp; hw_cidx = (int )((unsigned int )hw_cidx - (unsigned int )q->cidx); return (hw_cidx < 0 ? (int )((unsigned int )q->size + (unsigned int )hw_cidx) : hw_cidx); } } __inline static void reclaim_completed_tx(struct adapter *adap , struct sge_txq *q , bool unmap ) { int avail ; int tmp ; { tmp = reclaimable((struct sge_txq const *)q); avail = tmp; if (avail != 0) { if (avail > 16) { avail = 16; } else { } free_tx_desc(adap, q, (unsigned int )avail, (int )unmap); q->in_use = q->in_use - (unsigned int )avail; } else { } return; } } __inline static int get_buf_size(struct adapter *adapter , struct rx_sw_desc const *d ) { struct sge *s ; unsigned int rx_buf_size_idx ; int buf_size ; unsigned int tmp ; unsigned int tmp___0 ; long tmp___1 ; { s = & adapter->sge; rx_buf_size_idx = (unsigned int )d->dma_addr & 15U; switch (rx_buf_size_idx) { case 0U: buf_size = 4096; goto ldv_59173; case 1U: buf_size = (int )(4096UL << (int )s->fl_pg_order); goto ldv_59173; case 2U: tmp = fl_mtu_bufsize(adapter, 1500U); buf_size = (int )tmp; goto ldv_59173; case 3U: tmp___0 = fl_mtu_bufsize(adapter, 9000U); buf_size = (int )tmp___0; goto ldv_59173; default: tmp___1 = ldv__builtin_expect(1L, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c"), "i" (467), "i" (12UL)); ldv_59178: ; goto ldv_59178; } else { } } ldv_59173: ; return (buf_size); } } static void free_rx_bufs(struct adapter *adap , struct sge_fl *q , int n ) { struct rx_sw_desc *d ; int tmp ; dma_addr_t tmp___0 ; bool tmp___1 ; int tmp___2 ; { goto ldv_59186; ldv_59185: d = q->sdesc + (unsigned long )q->cidx; tmp___1 = is_buf_mapped((struct rx_sw_desc const *)d); if ((int )tmp___1) { tmp = get_buf_size(adap, (struct rx_sw_desc const *)d); tmp___0 = get_buf_addr((struct rx_sw_desc const *)d); dma_unmap_page(adap->pdev_dev, tmp___0, (size_t )tmp, 2); } else { } put_page(d->page); d->page = (struct page *)0; q->cidx = q->cidx + 1U; if (q->cidx == q->size) { q->cidx = 0U; } else { } q->avail = q->avail - 1U; ldv_59186: tmp___2 = n; n = n - 1; if (tmp___2 != 0) { goto ldv_59185; } else { } return; } } static void unmap_rx_buf(struct adapter *adap , struct sge_fl *q ) { struct rx_sw_desc *d ; int tmp ; dma_addr_t tmp___0 ; bool tmp___1 ; { d = q->sdesc + (unsigned long )q->cidx; tmp___1 = is_buf_mapped((struct rx_sw_desc const *)d); if ((int )tmp___1) { tmp = get_buf_size(adap, (struct rx_sw_desc const *)d); tmp___0 = get_buf_addr((struct rx_sw_desc const *)d); dma_unmap_page(adap->pdev_dev, tmp___0, (size_t )tmp, 2); } else { } d->page = (struct page *)0; q->cidx = q->cidx + 1U; if (q->cidx == q->size) { q->cidx = 0U; } else { } q->avail = q->avail - 1U; return; } } __inline static void ring_fl_db(struct adapter *adap , struct sge_fl *q ) { u32 val ; int tmp ; long tmp___0 ; { if (q->pend_cred > 7U) { val = adap->params.arch.sge_fl_db; tmp = is_t4(adap->params.chip); if (tmp != 0) { val = q->pend_cred / 8U | val; } else { val = q->pend_cred / 8U | val; } __asm__ volatile ("sfence": : : "memory"); tmp___0 = ldv__builtin_expect((unsigned long )q->bar2_addr == (unsigned long )((void *)0), 0L); if (tmp___0 != 0L) { t4_write_reg(adap, 110592U, (q->cntxt_id << 15) | val); } else { writel((q->bar2_qid << 15) | val, (void volatile *)q->bar2_addr + 8U); __asm__ volatile ("sfence": : : "memory"); } q->pend_cred = q->pend_cred & 7U; } else { } return; } } __inline static void set_rx_sw_desc(struct rx_sw_desc *sd , struct page *pg , dma_addr_t mapping ) { { sd->page = pg; sd->dma_addr = mapping; return; } } static unsigned int refill_fl(struct adapter *adap , struct sge_fl *q , int n , gfp_t gfp ) { struct sge *s ; struct page *pg ; dma_addr_t mapping ; unsigned int cred ; __be64 *d ; struct rx_sw_desc *sd ; int node ; int tmp ; long tmp___0 ; int tmp___1 ; long tmp___2 ; __be64 *tmp___3 ; __u64 tmp___4 ; long tmp___5 ; int tmp___6 ; long tmp___7 ; __be64 *tmp___8 ; __u64 tmp___9 ; int tmp___10 ; bool tmp___11 ; long tmp___12 ; { s = & adap->sge; cred = q->avail; d = q->desc + (unsigned long )q->pidx; sd = q->sdesc + (unsigned long )q->pidx; tmp = variable_test_bit((long )(q->cntxt_id - adap->sge.egr_start), (unsigned long const volatile *)adap->sge.blocked_fl); if (tmp != 0) { goto out; } else { } gfp = gfp | 512U; node = dev_to_node(adap->pdev_dev); if (s->fl_pg_order == 0U) { goto alloc_small_pages; } else { } goto ldv_59220; ldv_59219: pg = alloc_pages_node(node, gfp | 16384U, s->fl_pg_order); tmp___0 = ldv__builtin_expect((unsigned long )pg == (unsigned long )((struct page *)0), 0L); if (tmp___0 != 0L) { q->large_alloc_failed = q->large_alloc_failed + 1UL; goto ldv_59218; } else { } mapping = dma_map_page(adap->pdev_dev, pg, 0UL, 4096UL << (int )s->fl_pg_order, 2); tmp___1 = dma_mapping_error(adap->pdev_dev, mapping); tmp___2 = ldv__builtin_expect(tmp___1 != 0, 0L); if (tmp___2 != 0L) { __free_pages(pg, s->fl_pg_order); goto out; } else { } mapping = mapping | 1ULL; tmp___3 = d; d = d + 1; tmp___4 = __fswab64(mapping); *tmp___3 = tmp___4; set_rx_sw_desc(sd, pg, mapping); sd = sd + 1; q->avail = q->avail + 1U; q->pidx = q->pidx + 1U; if (q->pidx == q->size) { q->pidx = 0U; sd = q->sdesc; d = q->desc; } else { } n = n - 1; ldv_59220: ; if (n != 0) { goto ldv_59219; } else { } ldv_59218: ; alloc_small_pages: ; goto ldv_59223; ldv_59222: pg = alloc_pages_node(node, gfp, 0U); tmp___5 = ldv__builtin_expect((unsigned long )pg == (unsigned long )((struct page *)0), 0L); if (tmp___5 != 0L) { q->alloc_failed = q->alloc_failed + 1UL; goto ldv_59221; } else { } mapping = dma_map_page(adap->pdev_dev, pg, 0UL, 4096UL, 2); tmp___6 = dma_mapping_error(adap->pdev_dev, mapping); tmp___7 = ldv__builtin_expect(tmp___6 != 0, 0L); if (tmp___7 != 0L) { put_page(pg); goto out; } else { } tmp___8 = d; d = d + 1; tmp___9 = __fswab64(mapping); *tmp___8 = tmp___9; set_rx_sw_desc(sd, pg, mapping); sd = sd + 1; q->avail = q->avail + 1U; q->pidx = q->pidx + 1U; if (q->pidx == q->size) { q->pidx = 0U; sd = q->sdesc; d = q->desc; } else { } ldv_59223: tmp___10 = n; n = n - 1; if (tmp___10 != 0) { goto ldv_59222; } else { } ldv_59221: ; out: cred = q->avail - cred; q->pend_cred = q->pend_cred + cred; ring_fl_db(adap, q); tmp___11 = fl_starving((struct adapter const *)adap, (struct sge_fl const *)q); tmp___12 = ldv__builtin_expect((long )tmp___11, 0L); if (tmp___12 != 0L) { __asm__ volatile ("": : : "memory"); set_bit((long )(q->cntxt_id - adap->sge.egr_start), (unsigned long volatile *)adap->sge.starving_fl); } else { } return (cred); } } __inline static void __refill_fl(struct adapter *adap , struct sge_fl *fl ) { unsigned int _min1 ; unsigned int _min2 ; unsigned int tmp ; { _min1 = 16U; tmp = fl_cap((struct sge_fl const *)fl); _min2 = tmp - fl->avail; refill_fl(adap, fl, (int )(_min1 < _min2 ? _min1 : _min2), 32U); return; } } static void *alloc_ring(struct device *dev , size_t nelem , size_t elem_size , size_t sw_size , dma_addr_t *phys , void *metadata , size_t stat_size , int node ) { size_t len ; void *s ; void *p ; void *tmp ; { len = nelem * elem_size + stat_size; s = (void *)0; tmp = dma_alloc_attrs(dev, len, phys, 208U, (struct dma_attrs *)0); p = tmp; if ((unsigned long )p == (unsigned long )((void *)0)) { return ((void *)0); } else { } if (sw_size != 0UL) { s = kzalloc_node(nelem * sw_size, 208U, node); if ((unsigned long )s == (unsigned long )((void *)0)) { dma_free_attrs(dev, len, p, *phys, (struct dma_attrs *)0); return ((void *)0); } else { } } else { } if ((unsigned long )metadata != (unsigned long )((void *)0)) { *((void **)metadata) = s; } else { } memset(p, 0, len); return (p); } } __inline static unsigned int sgl_len(unsigned int n ) { { n = n - 1U; return (((n * 3U) / 2U + (n & 1U)) + 2U); } } __inline static unsigned int flits_to_desc(unsigned int n ) { long tmp ; { tmp = ldv__builtin_expect(n > 64U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c"), "i" (760), "i" (12UL)); ldv_59250: ; goto ldv_59250; } else { } return ((n + 7U) / 8U); } } __inline static int is_eth_imm(struct sk_buff const *skb ) { int hdrlen ; unsigned char *tmp ; { tmp = skb_end_pointer(skb); hdrlen = (unsigned int )((struct skb_shared_info *)tmp)->gso_size != 0U ? 16 : 0; hdrlen = (int )((unsigned int )hdrlen + 32U); if ((unsigned int )skb->len <= (unsigned int )(256 - hdrlen)) { return (hdrlen); } else { } return (0); } } __inline static unsigned int calc_tx_flits(struct sk_buff const *skb ) { unsigned int flits ; int hdrlen ; int tmp ; unsigned char *tmp___0 ; unsigned int tmp___1 ; unsigned char *tmp___2 ; { tmp = is_eth_imm(skb); hdrlen = tmp; if (hdrlen != 0) { return ((unsigned int )(((unsigned long )((unsigned int )skb->len + (unsigned int )hdrlen) + 7UL) / 8UL)); } else { } tmp___0 = skb_end_pointer(skb); tmp___1 = sgl_len((unsigned int )((int )((struct skb_shared_info *)tmp___0)->nr_frags + 1)); flits = tmp___1 + 4U; tmp___2 = skb_end_pointer(skb); if ((unsigned int )((struct skb_shared_info *)tmp___2)->gso_size != 0U) { flits = flits + 6U; } else { flits = flits + 4U; } return (flits); } } static void write_sgl(struct sk_buff const *skb , struct sge_txq *q , struct ulptx_sgl *sgl , u64 *end , unsigned int start , dma_addr_t const *addr ) { unsigned int i ; unsigned int len ; struct ulptx_sge_pair *to ; struct skb_shared_info const *si ; unsigned char *tmp ; unsigned int nfrags ; struct ulptx_sge_pair buf[9U] ; unsigned int tmp___0 ; __u32 tmp___1 ; __u64 tmp___2 ; unsigned int tmp___3 ; __u32 tmp___4 ; __u64 tmp___5 ; long tmp___6 ; __u32 tmp___7 ; long tmp___8 ; unsigned int tmp___9 ; __u32 tmp___10 ; unsigned int tmp___11 ; __u32 tmp___12 ; __u64 tmp___13 ; __u64 tmp___14 ; unsigned int tmp___15 ; __u32 tmp___16 ; __u64 tmp___17 ; unsigned int part0 ; unsigned int part1 ; long tmp___18 ; long tmp___19 ; { tmp = skb_end_pointer(skb); si = (struct skb_shared_info const *)tmp; nfrags = (unsigned int )si->nr_frags; tmp___0 = skb_headlen(skb); len = tmp___0 - start; tmp___6 = ldv__builtin_expect(len != 0U, 1L); if (tmp___6 != 0L) { tmp___1 = __fswab32(len); sgl->len0 = tmp___1; tmp___2 = __fswab64((unsigned long long )*addr + (unsigned long long )start); sgl->addr0 = tmp___2; nfrags = nfrags + 1U; } else { tmp___3 = skb_frag_size((skb_frag_t const *)(& si->frags)); tmp___4 = __fswab32(tmp___3); sgl->len0 = tmp___4; tmp___5 = __fswab64(*(addr + 1UL)); sgl->addr0 = tmp___5; } tmp___7 = __fswab32(nfrags | 2181038080U); sgl->cmd_nsge = tmp___7; nfrags = nfrags - 1U; tmp___8 = ldv__builtin_expect(nfrags == 0U, 1L); if (tmp___8 != 0L) { return; } else { } to = (unsigned long )((u8 *)q->stat) < (unsigned long )((u8 *)end) ? (struct ulptx_sge_pair *)(& buf) : (struct ulptx_sge_pair *)(& sgl->sge); i = (unsigned int )si->nr_frags != nfrags; goto ldv_59278; ldv_59277: tmp___9 = skb_frag_size((skb_frag_t const *)(& si->frags) + (unsigned long )i); tmp___10 = __fswab32(tmp___9); to->len[0] = tmp___10; i = i + 1U; tmp___11 = skb_frag_size((skb_frag_t const *)(& si->frags) + (unsigned long )i); tmp___12 = __fswab32(tmp___11); to->len[1] = tmp___12; tmp___13 = __fswab64(*(addr + (unsigned long )i)); to->addr[0] = tmp___13; i = i + 1U; tmp___14 = __fswab64(*(addr + (unsigned long )i)); to->addr[1] = tmp___14; nfrags = nfrags - 2U; to = to + 1; ldv_59278: ; if (nfrags > 1U) { goto ldv_59277; } else { } if (nfrags != 0U) { tmp___15 = skb_frag_size((skb_frag_t const *)(& si->frags) + (unsigned long )i); tmp___16 = __fswab32(tmp___15); to->len[0] = tmp___16; to->len[1] = 0U; tmp___17 = __fswab64(*(addr + (unsigned long )(i + 1U))); to->addr[0] = tmp___17; } else { } tmp___19 = ldv__builtin_expect((unsigned long )((u8 *)q->stat) < (unsigned long )((u8 *)end), 0L); if (tmp___19 != 0L) { part0 = (unsigned int )((long )q->stat) - (unsigned int )((long )(& sgl->sge)); tmp___18 = ldv__builtin_expect(part0 != 0U, 1L); if (tmp___18 != 0L) { memcpy((void *)(& sgl->sge), (void const *)(& buf), (size_t )part0); } else { } part1 = (unsigned int )((long )end) - (unsigned int )((long )q->stat); memcpy((void *)q->desc, (void const *)(& buf) + (unsigned long )part0, (size_t )part1); end = (u64 *)q->desc + (unsigned long )part1; } else { } if (((unsigned long )end & 8UL) != 0UL) { *end = 0ULL; } else { } return; } } static void cxgb_pio_copy(u64 *dst , u64 *src ) { int count ; { count = 8; goto ldv_59288; ldv_59287: writeq((unsigned long )*src, (void volatile *)dst); src = src + 1; dst = dst + 1; count = count - 1; ldv_59288: ; if (count != 0) { goto ldv_59287; } else { } return; } } __inline static void ring_tx_db(struct adapter *adap , struct sge_txq *q , int n ) { u32 val ; unsigned long flags ; raw_spinlock_t *tmp ; u32 val___0 ; int __ret_warn_on ; long tmp___0 ; int index ; u64 *wr ; long tmp___1 ; { __asm__ volatile ("sfence": : : "memory"); tmp___1 = ldv__builtin_expect((unsigned long )q->bar2_addr == (unsigned long )((void *)0), 0L); if (tmp___1 != 0L) { val = (u32 )n; tmp = spinlock_check(& q->db_lock); flags = _raw_spin_lock_irqsave(tmp); if (q->db_disabled == 0) { t4_write_reg(adap, 110592U, (q->cntxt_id << 15) | val); } else { q->db_pidx_inc = (int )q->db_pidx_inc + (int )((unsigned short )n); } q->db_pidx = (unsigned short )q->pidx; spin_unlock_irqrestore(& q->db_lock, flags); } else { val___0 = (u32 )n; __ret_warn_on = (val___0 & 16384U) != 0U; tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___0 != 0L) { warn_slowpath_null("/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c", 963); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); if (n == 1 && q->bar2_qid == 0U) { index = (int )(q->pidx != 0U ? q->pidx - 1U : q->size - 1U); wr = (u64 *)q->desc + (unsigned long )index; cxgb_pio_copy((u64 *)q->bar2_addr + 64U, wr); } else { writel((q->bar2_qid << 15) | val___0, (void volatile *)q->bar2_addr + 8U); } __asm__ volatile ("sfence": : : "memory"); } return; } } static void inline_tx_skb(struct sk_buff const *skb , struct sge_txq const *q , void *pos ) { u64 *p ; int left ; long tmp ; long tmp___0 ; { left = (int )((unsigned int )((long )q->stat) - (unsigned int )((long )pos)); tmp___0 = ldv__builtin_expect((unsigned int )skb->len <= (unsigned int )left, 1L); if (tmp___0 != 0L) { tmp = ldv__builtin_expect((unsigned int )skb->data_len == 0U, 1L); if (tmp != 0L) { skb_copy_from_linear_data(skb, pos, skb->len); } else { skb_copy_bits(skb, 0, pos, (int )skb->len); } pos = pos + (unsigned long )skb->len; } else { skb_copy_bits(skb, 0, pos, left); skb_copy_bits(skb, left, (void *)q->desc, (int )((unsigned int )skb->len - (unsigned int )left)); pos = (void *)q->desc + (unsigned long )((unsigned int )skb->len - (unsigned int )left); } p = (u64 *)(((unsigned long )pos + 7UL) & 0xfffffffffffffff8UL); if (((unsigned long )p & 8UL) != 0UL) { *p = 0ULL; } else { } return; } } static u64 hwcsum(enum chip_type chip , struct sk_buff const *skb ) { int csum_type ; struct iphdr const *iph ; struct iphdr *tmp ; struct ipv6hdr const *ip6h ; u64 hdr_len ; u32 tmp___0 ; int eth_hdr_len ; int tmp___1 ; int start ; int tmp___2 ; long tmp___3 ; { tmp = ip_hdr(skb); iph = (struct iphdr const *)tmp; if ((unsigned int )*((unsigned char *)iph + 0UL) == 64U) { if ((unsigned int )((unsigned char )iph->protocol) == 6U) { csum_type = 8; } else if ((unsigned int )((unsigned char )iph->protocol) == 17U) { csum_type = 9; } else { nocsum: ; return (0x8000000000000000ULL); } } else { ip6h = (struct ipv6hdr const *)iph; if ((unsigned int )((unsigned char )ip6h->nexthdr) == 6U) { csum_type = 10; } else if ((unsigned int )((unsigned char )ip6h->nexthdr) == 17U) { csum_type = 11; } else { goto nocsum; } } tmp___3 = ldv__builtin_expect(csum_type > 7, 1L); if (tmp___3 != 0L) { tmp___0 = skb_network_header_len(skb); hdr_len = (unsigned long long )tmp___0 << 20; tmp___1 = skb_network_offset(skb); eth_hdr_len = tmp___1 + -14; if ((((unsigned int )chip >> 4) & 15U) <= 5U) { hdr_len = ((unsigned long long )eth_hdr_len << 34) | hdr_len; } else { hdr_len = ((unsigned long long )eth_hdr_len << 32) | hdr_len; } return (((unsigned long long )csum_type << 40) | hdr_len); } else { tmp___2 = skb_transport_offset(skb); start = tmp___2; return ((((unsigned long long )csum_type << 40) | (unsigned long long )(start << 20)) | ((unsigned long long )((int )skb->__annonCompField81.__annonCompField80.csum_offset + start) << 30)); } } } static void eth_txq_stop(struct sge_eth_txq *q ) { { netif_tx_stop_queue(q->txq); q->q.stops = q->q.stops + 1UL; return; } } __inline static void txq_advance(struct sge_txq *q , unsigned int n ) { { q->in_use = q->in_use + n; q->pidx = q->pidx + n; if (q->pidx >= q->size) { q->pidx = q->pidx - q->size; } else { } return; } } __inline static int cxgb_fcoe_offload(struct sk_buff *skb , struct adapter *adap , struct port_info const *pi , u64 *cntrl ) { struct cxgb_fcoe const *fcoe ; bool tmp ; int tmp___0 ; { fcoe = & pi->fcoe; if (((int )fcoe->flags & 1) == 0) { return (0); } else { } if ((unsigned int )skb->protocol != 1673U) { return (0); } else { } skb_reset_mac_header(skb); skb->mac_len = 14U; skb_set_network_header(skb, (int const )skb->mac_len); skb_set_transport_header(skb, (int const )((unsigned int )skb->mac_len + 14U)); tmp = cxgb_fcoe_sof_eof_supported(adap, skb); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-524); } else { } *cntrl = 0xc000070201c08000ULL; return (0); } } netdev_tx_t t4_eth_xmit(struct sk_buff *skb , struct net_device *dev ) { u32 wr_mid ; u64 cntrl ; u64 *end ; int qidx ; int credits ; unsigned int flits ; unsigned int ndesc ; struct adapter *adap ; struct sge_eth_txq *q ; struct port_info const *pi ; struct fw_eth_tx_pkt_wr *wr ; struct cpl_tx_pkt_core *cpl ; struct skb_shared_info const *ssi ; dma_addr_t addr[18U] ; bool immediate ; int len ; int max_pkt_len ; int err ; long tmp ; unsigned char *tmp___0 ; long tmp___1 ; void *tmp___2 ; u16 tmp___3 ; long tmp___4 ; unsigned int tmp___5 ; long tmp___6 ; int tmp___7 ; int tmp___8 ; long tmp___9 ; long tmp___10 ; __u32 tmp___11 ; unsigned char *tmp___12 ; struct cpl_tx_pkt_lso *lso ; bool v6 ; int l3hdr_len ; u32 tmp___13 ; int eth_xtra_len ; int tmp___14 ; __u32 tmp___15 ; struct tcphdr *tmp___16 ; __u32 tmp___17 ; __u16 tmp___18 ; __u32 tmp___19 ; __u32 tmp___20 ; int tmp___21 ; __u32 tmp___22 ; u64 tmp___23 ; __u32 tmp___24 ; __u16 tmp___25 ; __u64 tmp___26 ; int last_desc ; { immediate = 0; tmp = ldv__builtin_expect(skb->len <= 13U, 0L); if (tmp != 0L) { out_free: dev_kfree_skb_any(skb); return (0); } else { } max_pkt_len = (int )(dev->mtu + 14U); if (((int )skb->vlan_tci & 4096) != 0) { max_pkt_len = max_pkt_len + 4; } else { } tmp___0 = skb_end_pointer((struct sk_buff const *)skb); if ((unsigned int )((struct skb_shared_info *)tmp___0)->gso_size == 0U) { tmp___1 = ldv__builtin_expect(skb->len > (unsigned int )max_pkt_len, 0L); if (tmp___1 != 0L) { goto out_free; } else { } } else { } tmp___2 = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp___2; adap = pi->adapter; tmp___3 = skb_get_queue_mapping((struct sk_buff const *)skb); qidx = (int )tmp___3; q = (struct sge_eth_txq *)(& adap->sge.ethtxq) + (unsigned long )((int )pi->first_qset + qidx); reclaim_completed_tx(adap, & q->q, 1); cntrl = 0xc000000000000000ULL; err = cxgb_fcoe_offload(skb, adap, pi, & cntrl); tmp___4 = ldv__builtin_expect(err == -524, 0L); if (tmp___4 != 0L) { goto out_free; } else { } flits = calc_tx_flits((struct sk_buff const *)skb); ndesc = flits_to_desc(flits); tmp___5 = txq_avail((struct sge_txq const *)(& q->q)); credits = (int )(tmp___5 - ndesc); tmp___6 = ldv__builtin_expect(credits < 0, 0L); if (tmp___6 != 0L) { eth_txq_stop(q); dev_err((struct device const *)adap->pdev_dev, "%s: Tx ring %u full while queue awake!\n", (char *)(& dev->name), qidx); return (16); } else { } tmp___7 = is_eth_imm((struct sk_buff const *)skb); if (tmp___7 != 0) { immediate = 1; } else { } if (! immediate) { tmp___8 = map_skb(adap->pdev_dev, (struct sk_buff const *)skb, (dma_addr_t *)(& addr)); tmp___9 = ldv__builtin_expect(tmp___8 < 0, 0L); if (tmp___9 != 0L) { q->mapping_err = q->mapping_err + 1UL; goto out_free; } else { } } else { } wr_mid = (flits + 1U) / 2U; tmp___10 = ldv__builtin_expect((unsigned int )credits <= 4U, 0L); if (tmp___10 != 0L) { eth_txq_stop(q); wr_mid = wr_mid | 3221225472U; } else { } wr = (struct fw_eth_tx_pkt_wr *)q->q.desc + (unsigned long )q->q.pidx; tmp___11 = __fswab32(wr_mid); wr->equiq_to_len16 = tmp___11; wr->r3 = 0ULL; end = (u64 *)wr + (unsigned long )flits; len = (int )immediate ? (int )skb->len : 0; tmp___12 = skb_end_pointer((struct sk_buff const *)skb); ssi = (struct skb_shared_info const *)tmp___12; if ((unsigned int )((unsigned short )ssi->gso_size) != 0U) { lso = (struct cpl_tx_pkt_lso *)wr; v6 = ((int )ssi->gso_type & 16) != 0; tmp___13 = skb_network_header_len((struct sk_buff const *)skb); l3hdr_len = (int )tmp___13; tmp___14 = skb_network_offset((struct sk_buff const *)skb); eth_xtra_len = tmp___14 + -14; len = (int )((unsigned int )len + 32U); tmp___15 = __fswab32((__u32 )(len | 134217728)); wr->op_immdlen = tmp___15; tmp___16 = tcp_hdr((struct sk_buff const *)skb); tmp___17 = __fswab32(((((unsigned int )((int )v6 << 20) | (unsigned int )(eth_xtra_len / 4 << 16)) | (unsigned int )(l3hdr_len / 4 << 4)) | (unsigned int )tmp___16->doff) | 3988783104U); lso->c.lso_ctrl = tmp___17; lso->c.ipid_ofst = 0U; tmp___18 = __fswab16((int )ssi->gso_size); lso->c.mss = tmp___18; lso->c.seqno_offset = 0U; tmp___21 = is_t4(adap->params.chip); if (tmp___21 != 0) { tmp___19 = __fswab32(skb->len); lso->c.len = tmp___19; } else { tmp___20 = __fswab32(skb->len); lso->c.len = tmp___20; } cpl = (struct cpl_tx_pkt_core *)lso + 1U; if ((((unsigned int )adap->params.chip >> 4) & 15U) <= 5U) { cntrl = (unsigned long long )eth_xtra_len << 34; } else { cntrl = (unsigned long long )eth_xtra_len << 32; } cntrl = (((int )v6 ? 10995116277760ULL : 8796093022208ULL) | ((unsigned long long )l3hdr_len << 20)) | cntrl; q->tso = q->tso + 1UL; q->tx_cso = q->tx_cso + (unsigned long )ssi->gso_segs; } else { len = (int )((unsigned int )len + 16U); tmp___22 = __fswab32((__u32 )(len | 134217728)); wr->op_immdlen = tmp___22; cpl = (struct cpl_tx_pkt_core *)wr + 1U; if ((unsigned int )*((unsigned char *)skb + 145UL) == 6U) { tmp___23 = hwcsum(adap->params.chip, (struct sk_buff const *)skb); cntrl = tmp___23 | 4611686018427387904ULL; q->tx_cso = q->tx_cso + 1UL; } else { } } if (((int )skb->vlan_tci & 4096) != 0) { q->vlan_ins = q->vlan_ins + 1UL; cntrl = (((unsigned long long )((int )skb->vlan_tci & -4097) << 44) | cntrl) | 1152921504606846976ULL; if ((unsigned int )skb->protocol == 1673U) { cntrl = (((unsigned long long )(skb->priority << 13) & 65535ULL) << 44) | cntrl; } else { } } else { } tmp___24 = __fswab32(((unsigned int )((int )pi->tx_chan << 16) | (adap->pf << 8)) | 3992977408U); cpl->ctrl0 = tmp___24; cpl->pack = 0U; tmp___25 = __fswab16((int )((__u16 )skb->len)); cpl->len = tmp___25; tmp___26 = __fswab64(cntrl); cpl->ctrl1 = tmp___26; if ((int )immediate) { inline_tx_skb((struct sk_buff const *)skb, (struct sge_txq const *)(& q->q), (void *)cpl + 1U); dev_consume_skb_any(skb); } else { write_sgl((struct sk_buff const *)skb, & q->q, (struct ulptx_sgl *)cpl + 1U, end, 0U, (dma_addr_t const *)(& addr)); skb_orphan(skb); last_desc = (int )((q->q.pidx + ndesc) - 1U); if ((unsigned int )last_desc >= q->q.size) { last_desc = (int )((unsigned int )last_desc - q->q.size); } else { } (q->q.sdesc + (unsigned long )last_desc)->skb = skb; (q->q.sdesc + (unsigned long )last_desc)->sgl = (struct ulptx_sgl *)cpl + 1U; } txq_advance(& q->q, ndesc); ring_tx_db(adap, & q->q, (int )ndesc); return (0); } } __inline static void reclaim_completed_tx_imm(struct sge_txq *q ) { int hw_cidx ; __u16 tmp ; int reclaim ; { tmp = __fswab16((int )(q->stat)->cidx); hw_cidx = (int )tmp; reclaim = (int )((unsigned int )hw_cidx - q->cidx); if (reclaim < 0) { reclaim = (int )(q->size + (unsigned int )reclaim); } else { } q->in_use = q->in_use - (unsigned int )reclaim; q->cidx = (unsigned int )hw_cidx; return; } } __inline static int is_imm(struct sk_buff const *skb ) { { return ((unsigned int )skb->len <= 512U); } } static void ctrlq_check_stop(struct sge_ctrl_txq *q , struct fw_wr_hdr *wr ) { unsigned int tmp ; long tmp___0 ; { reclaim_completed_tx_imm(& q->q); tmp = txq_avail((struct sge_txq const *)(& q->q)); tmp___0 = ldv__builtin_expect(tmp <= 7U, 0L); if (tmp___0 != 0L) { wr->lo = wr->lo | 192U; q->q.stops = q->q.stops + 1UL; q->full = 1U; } else { } return; } } static int ctrl_xmit(struct sge_ctrl_txq *q , struct sk_buff *skb ) { unsigned int ndesc ; struct fw_wr_hdr *wr ; int __ret_warn_on ; long tmp ; int tmp___0 ; long tmp___1 ; long tmp___2 ; unsigned int tmp___3 ; long tmp___4 ; { tmp___0 = is_imm((struct sk_buff const *)skb); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 0L); if (tmp___1 != 0L) { __ret_warn_on = 1; tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp != 0L) { warn_slowpath_null("/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c", 1372); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); consume_skb(skb); return (1); } else { } ndesc = (unsigned int )(((unsigned long )skb->len + 63UL) / 64UL); spin_lock(& q->sendq.lock); tmp___2 = ldv__builtin_expect((unsigned int )q->full != 0U, 0L); if (tmp___2 != 0L) { skb->priority = ndesc; __skb_queue_tail(& q->sendq, skb); spin_unlock(& q->sendq.lock); return (2); } else { } wr = (struct fw_wr_hdr *)q->q.desc + (unsigned long )q->q.pidx; inline_tx_skb((struct sk_buff const *)skb, (struct sge_txq const *)(& q->q), (void *)wr); txq_advance(& q->q, ndesc); tmp___3 = txq_avail((struct sge_txq const *)(& q->q)); tmp___4 = ldv__builtin_expect(tmp___3 <= 7U, 0L); if (tmp___4 != 0L) { ctrlq_check_stop(q, wr); } else { } ring_tx_db(q->adap, & q->q, (int )ndesc); spin_unlock(& q->sendq.lock); kfree_skb(skb); return (0); } } static void restart_ctrlq(unsigned long data ) { struct sk_buff *skb ; unsigned int written ; struct sge_ctrl_txq *q ; unsigned int tmp ; long tmp___0 ; struct fw_wr_hdr *wr ; unsigned int ndesc ; unsigned long old ; unsigned int tmp___1 ; long tmp___2 ; { written = 0U; q = (struct sge_ctrl_txq *)data; spin_lock(& q->sendq.lock); reclaim_completed_tx_imm(& q->q); tmp = txq_avail((struct sge_txq const *)(& q->q)); tmp___0 = ldv__builtin_expect(tmp <= 7U, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c"), "i" (1415), "i" (12UL)); ldv_59391: ; goto ldv_59391; } else { } goto ldv_59397; ldv_59396: ndesc = skb->priority; spin_unlock(& q->sendq.lock); wr = (struct fw_wr_hdr *)q->q.desc + (unsigned long )q->q.pidx; inline_tx_skb((struct sk_buff const *)skb, (struct sge_txq const *)(& q->q), (void *)wr); kfree_skb(skb); written = written + ndesc; txq_advance(& q->q, ndesc); tmp___1 = txq_avail((struct sge_txq const *)(& q->q)); tmp___2 = ldv__builtin_expect(tmp___1 <= 7U, 0L); if (tmp___2 != 0L) { old = q->q.stops; ctrlq_check_stop(q, wr); if (q->q.stops != old) { spin_lock(& q->sendq.lock); goto ringdb; } else { } } else { } if (written > 16U) { ring_tx_db(q->adap, & q->q, (int )written); written = 0U; } else { } spin_lock(& q->sendq.lock); ldv_59397: skb = __skb_dequeue(& q->sendq); if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { goto ldv_59396; } else { } q->full = 0U; ringdb: ; if (written != 0U) { ring_tx_db(q->adap, & q->q, (int )written); } else { } spin_unlock(& q->sendq.lock); return; } } int t4_mgmt_tx(struct adapter *adap , struct sk_buff *skb ) { int ret ; { local_bh_disable(); ret = ctrl_xmit((struct sge_ctrl_txq *)(& adap->sge.ctrlq), skb); local_bh_enable(); return (ret); } } __inline static int is_ofld_imm(struct sk_buff const *skb ) { { return ((unsigned int )skb->len <= 256U); } } __inline static unsigned int calc_tx_flits_ofld(struct sk_buff const *skb ) { unsigned int flits ; unsigned int cnt ; int tmp ; int tmp___0 ; unsigned char *tmp___1 ; unsigned char *tmp___2 ; unsigned char *tmp___3 ; unsigned int tmp___4 ; { tmp = is_ofld_imm(skb); if (tmp != 0) { return (((unsigned int )skb->len + 7U) / 8U); } else { } tmp___0 = skb_transport_offset(skb); flits = (unsigned int )tmp___0 / 8U; tmp___1 = skb_end_pointer(skb); cnt = (unsigned int )((struct skb_shared_info *)tmp___1)->nr_frags; tmp___2 = skb_tail_pointer(skb); tmp___3 = skb_transport_header(skb); if ((unsigned long )tmp___2 != (unsigned long )tmp___3) { cnt = cnt + 1U; } else { } tmp___4 = sgl_len(cnt); return (tmp___4 + flits); } } static void txq_stop_maperr(struct sge_ofld_txq *q ) { { q->mapping_err = q->mapping_err + 1UL; q->q.stops = q->q.stops + 1UL; set_bit((long )(q->q.cntxt_id - (q->adap)->sge.egr_start), (unsigned long volatile *)(q->adap)->sge.txq_maperr); return; } } static void ofldtxq_stop(struct sge_ofld_txq *q , struct sk_buff *skb ) { struct fw_wr_hdr *wr ; { wr = (struct fw_wr_hdr *)skb->data; wr->lo = wr->lo | 192U; q->q.stops = q->q.stops + 1UL; q->full = 1U; return; } } static void service_ofldq(struct sge_ofld_txq *q ) { u64 *pos ; int credits ; struct sk_buff *skb ; unsigned int written ; unsigned int flits ; unsigned int ndesc ; unsigned int tmp ; long tmp___0 ; long tmp___1 ; int last_desc ; int hdr_len ; int tmp___2 ; int tmp___3 ; int tmp___4 ; long tmp___5 ; int tmp___6 ; long tmp___7 ; { written = 0U; goto ldv_59434; ldv_59433: spin_unlock(& q->sendq.lock); reclaim_completed_tx(q->adap, & q->q, 0); flits = skb->priority; ndesc = flits_to_desc(flits); tmp = txq_avail((struct sge_txq const *)(& q->q)); credits = (int )(tmp - ndesc); tmp___0 = ldv__builtin_expect(credits < 0, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/sge.c"), "i" (1566), "i" (12UL)); ldv_59429: ; goto ldv_59429; } else { } tmp___1 = ldv__builtin_expect((unsigned int )credits <= 7U, 0L); if (tmp___1 != 0L) { ofldtxq_stop(q, skb); } else { } pos = (u64 *)q->q.desc + (unsigned long )q->q.pidx; tmp___4 = is_ofld_imm((struct sk_buff const *)skb); if (tmp___4 != 0) { inline_tx_skb((struct sk_buff const *)skb, (struct sge_txq const *)(& q->q), (void *)pos); } else { tmp___3 = map_skb((q->adap)->pdev_dev, (struct sk_buff const *)skb, (dma_addr_t *)skb->head); if (tmp___3 != 0) { txq_stop_maperr(q); spin_lock(& q->sendq.lock); goto ldv_59430; } else { tmp___2 = skb_transport_offset((struct sk_buff const *)skb); hdr_len = tmp___2; memcpy((void *)pos, (void const *)skb->data, (size_t )hdr_len); write_sgl((struct sk_buff const *)skb, & q->q, (struct ulptx_sgl *)pos + (unsigned long )hdr_len, pos + (unsigned long )flits, (unsigned int )hdr_len, (dma_addr_t const *)skb->head); skb->dev = (q->adap)->port[0]; skb->destructor = & deferred_unmap_destructor; last_desc = (int )((q->q.pidx + ndesc) - 1U); if ((unsigned int )last_desc >= q->q.size) { last_desc = (int )((unsigned int )last_desc - q->q.size); } else { } (q->q.sdesc + (unsigned long )last_desc)->skb = skb; } } txq_advance(& q->q, ndesc); written = written + ndesc; tmp___5 = ldv__builtin_expect(written > 32U, 0L); if (tmp___5 != 0L) { ring_tx_db(q->adap, & q->q, (int )written); written = 0U; } else { } spin_lock(& q->sendq.lock); __skb_unlink(skb, & q->sendq); tmp___6 = is_ofld_imm((struct sk_buff const *)skb); if (tmp___6 != 0) { kfree_skb(skb); } else { } ldv_59434: skb = skb_peek((struct sk_buff_head const *)(& q->sendq)); if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0) && (unsigned int )q->full == 0U) { goto ldv_59433; } else { } ldv_59430: tmp___7 = ldv__builtin_expect(written != 0U, 1L); if (tmp___7 != 0L) { ring_tx_db(q->adap, & q->q, (int )written); } else { } return; } } static int ofld_xmit(struct sge_ofld_txq *q , struct sk_buff *skb ) { { skb->priority = calc_tx_flits_ofld((struct sk_buff const *)skb); spin_lock(& q->sendq.lock); __skb_queue_tail(& q->sendq, skb); if (q->sendq.qlen == 1U) { service_ofldq(q); } else { } spin_unlock(& q->sendq.lock); return (0); } } static void restart_ofldq(unsigned long data ) { struct sge_ofld_txq *q ; { q = (struct sge_ofld_txq *)data; spin_lock(& q->sendq.lock); q->full = 0U; service_ofldq(q); spin_unlock(& q->sendq.lock); return; } } __inline static unsigned int skb_txq(struct sk_buff const *skb ) { { return ((unsigned int )((int )((unsigned short )skb->queue_mapping) >> 1)); } } __inline static unsigned int is_ctrl_pkt(struct sk_buff const *skb ) { { return ((unsigned int )skb->queue_mapping & 1U); } } __inline static int ofld_send(struct adapter *adap , struct sk_buff *skb ) { unsigned int idx ; unsigned int tmp ; int tmp___0 ; unsigned int tmp___1 ; long tmp___2 ; int tmp___3 ; { tmp = skb_txq((struct sk_buff const *)skb); idx = tmp; tmp___1 = is_ctrl_pkt((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect(tmp___1 != 0U, 0L); if (tmp___2 != 0L) { if (adap->tids.nsftids != 0U) { idx = 0U; } else { } tmp___0 = ctrl_xmit((struct sge_ctrl_txq *)(& adap->sge.ctrlq) + (unsigned long )idx, skb); return (tmp___0); } else { } tmp___3 = ofld_xmit((struct sge_ofld_txq *)(& adap->sge.ofldtxq) + (unsigned long )idx, skb); return (tmp___3); } } int t4_ofld_send(struct adapter *adap , struct sk_buff *skb ) { int ret ; { local_bh_disable(); ret = ofld_send(adap, skb); local_bh_enable(); return (ret); } } int cxgb4_ofld_send(struct net_device *dev , struct sk_buff *skb ) { struct adapter *tmp ; int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); tmp___0 = t4_ofld_send(tmp, skb); return (tmp___0); } } static char const __kstrtab_cxgb4_ofld_send[16U] = { 'c', 'x', 'g', 'b', '4', '_', 'o', 'f', 'l', 'd', '_', 's', 'e', 'n', 'd', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_ofld_send ; struct kernel_symbol const __ksymtab_cxgb4_ofld_send = {(unsigned long )(& cxgb4_ofld_send), (char const *)(& __kstrtab_cxgb4_ofld_send)}; __inline static void copy_frags(struct sk_buff *skb , struct pkt_gl const *gl , unsigned int offset ) { int i ; unsigned char *tmp ; { __skb_fill_page_desc(skb, 0, gl->frags[0].page, (int )((unsigned int )gl->frags[0].offset + offset), (int )((unsigned int )gl->frags[0].size - offset)); tmp = skb_end_pointer((struct sk_buff const *)skb); ((struct skb_shared_info *)tmp)->nr_frags = (unsigned char )gl->nfrags; i = 1; goto ldv_59478; ldv_59477: __skb_fill_page_desc(skb, i, gl->frags[i].page, (int )gl->frags[i].offset, (int )gl->frags[i].size); i = i + 1; ldv_59478: ; if ((unsigned int )i < (unsigned int )gl->nfrags) { goto ldv_59477; } else { } get_page(gl->frags[(unsigned int )gl->nfrags - 1U].page); return; } } struct sk_buff *cxgb4_pktgl_to_skb(struct pkt_gl const *gl , unsigned int skb_len , unsigned int pull_len ) { struct sk_buff *skb ; long tmp ; long tmp___0 ; { if ((unsigned int )gl->tot_len <= 256U) { skb = dev_alloc_skb(gl->tot_len); tmp = ldv__builtin_expect((unsigned long )skb == (unsigned long )((struct sk_buff *)0), 0L); if (tmp != 0L) { goto out; } else { } __skb_put___1(skb, gl->tot_len); skb_copy_to_linear_data(skb, (void const *)gl->va, gl->tot_len); } else { skb = dev_alloc_skb(skb_len); tmp___0 = ldv__builtin_expect((unsigned long )skb == (unsigned long )((struct sk_buff *)0), 0L); if (tmp___0 != 0L) { goto out; } else { } __skb_put___1(skb, pull_len); skb_copy_to_linear_data(skb, (void const *)gl->va, pull_len); copy_frags(skb, gl, pull_len); skb->len = gl->tot_len; skb->data_len = skb->len - pull_len; skb->truesize = skb->truesize + skb->data_len; } out: ; return (skb); } } static char const __kstrtab_cxgb4_pktgl_to_skb[19U] = { 'c', 'x', 'g', 'b', '4', '_', 'p', 'k', 't', 'g', 'l', '_', 't', 'o', '_', 's', 'k', 'b', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_pktgl_to_skb ; struct kernel_symbol const __ksymtab_cxgb4_pktgl_to_skb = {(unsigned long )(& cxgb4_pktgl_to_skb), (char const *)(& __kstrtab_cxgb4_pktgl_to_skb)}; static void t4_pktgl_free(struct pkt_gl const *gl ) { int n ; struct page_frag const *p ; int tmp ; { p = (struct page_frag const *)(& gl->frags); n = (int )((unsigned int )gl->nfrags - 1U); goto ldv_59502; ldv_59501: put_page(p->page); p = p + 1; ldv_59502: tmp = n; n = n - 1; if (tmp != 0) { goto ldv_59501; } else { } return; } } static int handle_trace_pkt(struct adapter *adap , struct pkt_gl const *gl ) { struct sk_buff *skb ; long tmp ; int tmp___0 ; { skb = cxgb4_pktgl_to_skb(gl, 128U, 128U); tmp = ldv__builtin_expect((unsigned long )skb == (unsigned long )((struct sk_buff *)0), 0L); if (tmp != 0L) { t4_pktgl_free(gl); return (0); } else { } tmp___0 = is_t4(adap->params.chip); if (tmp___0 != 0) { __skb_pull(skb, 16U); } else { __skb_pull(skb, 24U); } skb_reset_mac_header(skb); skb->protocol = 65535U; skb->dev = adap->port[0]; netif_receive_skb(skb); return (0); } } static void do_gro(struct sge_eth_rxq *rxq , struct pkt_gl const *gl , struct cpl_rx_pkt const *pkt ) { struct adapter *adapter ; struct sge *s ; int ret ; struct sk_buff *skb ; long tmp ; __u16 tmp___0 ; long tmp___1 ; gro_result_t tmp___2 ; { adapter = rxq->rspq.adap; s = & adapter->sge; skb = napi_get_frags(& rxq->rspq.napi); tmp = ldv__builtin_expect((unsigned long )skb == (unsigned long )((struct sk_buff *)0), 0L); if (tmp != 0L) { t4_pktgl_free(gl); rxq->stats.rx_drops = rxq->stats.rx_drops + 1UL; return; } else { } copy_frags(skb, gl, s->pktshift); skb->len = (unsigned int )gl->tot_len - s->pktshift; skb->data_len = skb->len; skb->truesize = skb->truesize + skb->data_len; skb->ip_summed = 1U; skb_record_rx_queue(skb, (int )rxq->rspq.idx); skb_mark_napi_id(skb, & rxq->rspq.napi); if (((rxq->rspq.netdev)->features & 8589934592ULL) != 0ULL) { skb_set_hash(skb, pkt->rsshdr.hash_val, 2); } else { } tmp___1 = ldv__builtin_expect((unsigned int )*((unsigned char *)pkt + 9UL) != 0U, 0L); if (tmp___1 != 0L) { tmp___0 = __fswab16((int )pkt->vlan); __vlan_hwaccel_put_tag(skb, 129, (int )tmp___0); rxq->stats.vlan_ex = rxq->stats.vlan_ex + 1UL; } else { } tmp___2 = napi_gro_frags(& rxq->rspq.napi); ret = (int )tmp___2; if (ret == 2) { rxq->stats.lro_pkts = rxq->stats.lro_pkts + 1UL; } else if (ret == 0 || ret == 1) { rxq->stats.lro_merged = rxq->stats.lro_merged + 1UL; } else { } rxq->stats.pkts = rxq->stats.pkts + 1UL; rxq->stats.rx_cso = rxq->stats.rx_cso + 1UL; return; } } int t4_ethrx_handler(struct sge_rspq *q , __be64 const *rsp , struct pkt_gl const *si ) { bool csum_ok ; struct sk_buff *skb ; struct cpl_rx_pkt const *pkt ; struct sge_eth_rxq *rxq ; struct sge_rspq const *__mptr ; struct sge *s ; int cpl_trace_pkt ; int tmp ; struct port_info *pi ; int tmp___0 ; long tmp___1 ; bool tmp___2 ; int tmp___3 ; long tmp___4 ; __sum16 c ; void *tmp___5 ; __u16 tmp___6 ; long tmp___7 ; { __mptr = (struct sge_rspq const *)q; rxq = (struct sge_eth_rxq *)__mptr; s = & (q->adap)->sge; tmp = is_t4((q->adap)->params.chip); cpl_trace_pkt = tmp != 0 ? 176 : 72; tmp___1 = ldv__builtin_expect((int )*((u8 *)rsp) == cpl_trace_pkt, 0L); if (tmp___1 != 0L) { tmp___0 = handle_trace_pkt(q->adap, si); return (tmp___0); } else { } pkt = (struct cpl_rx_pkt const *)rsp; csum_ok = (bool )(((unsigned int )*((unsigned char *)pkt + 9UL) != 0U && (unsigned int )((unsigned short )pkt->err_vec) == 0U) && ((q->netdev)->features & 17179869184ULL) != 0ULL); if (((unsigned int )pkt->l2info & 32768U) != 0U) { tmp___2 = cxgb_poll_busy_polling(q); if (tmp___2) { tmp___3 = 0; } else { tmp___3 = 1; } if (tmp___3) { if (((q->netdev)->features & 16384ULL) != 0ULL) { if ((int )csum_ok) { if ((unsigned int )*((unsigned char *)pkt + 9UL) == 0U) { do_gro(rxq, si, pkt); return (0); } else { } } else { } } else { } } else { } } else { } skb = cxgb4_pktgl_to_skb(si, 512U, 128U); tmp___4 = ldv__builtin_expect((unsigned long )skb == (unsigned long )((struct sk_buff *)0), 0L); if (tmp___4 != 0L) { t4_pktgl_free(si); rxq->stats.rx_drops = rxq->stats.rx_drops + 1UL; return (0); } else { } __skb_pull(skb, s->pktshift); skb->protocol = eth_type_trans(skb, q->netdev); skb_record_rx_queue(skb, (int )q->idx); if (((skb->dev)->features & 8589934592ULL) != 0ULL) { skb_set_hash(skb, pkt->rsshdr.hash_val, 2); } else { } rxq->stats.pkts = rxq->stats.pkts + 1UL; if ((int )csum_ok && ((unsigned int )pkt->l2info & 49152U) != 0U) { if ((unsigned int )*((unsigned char *)pkt + 9UL) == 0U) { skb->ip_summed = 1U; rxq->stats.rx_cso = rxq->stats.rx_cso + 1UL; } else if ((int )pkt->l2info & 1) { c = pkt->csum; skb->__annonCompField81.csum = csum_unfold((int )c); skb->ip_summed = 2U; rxq->stats.rx_cso = rxq->stats.rx_cso + 1UL; } else { } } else { skb_checksum_none_assert((struct sk_buff const *)skb); tmp___5 = netdev_priv((struct net_device const *)skb->dev); pi = (struct port_info *)tmp___5; if (((unsigned int )pkt->l2info & 61451U) == 0U) { if (((unsigned int )pkt->l2info & 4U) != 0U && (int )pi->fcoe.flags & 1) { if (((int )pkt->err_vec & 32) == 0) { skb->ip_summed = 1U; } else { } } else { } } else { } } tmp___7 = ldv__builtin_expect((unsigned int )*((unsigned char *)pkt + 9UL) != 0U, 0L); if (tmp___7 != 0L) { tmp___6 = __fswab16((int )pkt->vlan); __vlan_hwaccel_put_tag(skb, 129, (int )tmp___6); rxq->stats.vlan_ex = rxq->stats.vlan_ex + 1UL; } else { } skb_mark_napi_id(skb, & q->napi); netif_receive_skb(skb); return (0); } } static void restore_rx_bufs(struct pkt_gl const *si , struct sge_fl *q , int frags ) { struct rx_sw_desc *d ; int tmp ; { goto ldv_59540; ldv_59539: ; if (q->cidx == 0U) { q->cidx = q->size - 1U; } else { q->cidx = q->cidx - 1U; } d = q->sdesc + (unsigned long )q->cidx; d->page = si->frags[frags].page; d->dma_addr = d->dma_addr | 16ULL; q->avail = q->avail + 1U; ldv_59540: tmp = frags; frags = frags - 1; if (tmp != 0) { goto ldv_59539; } else { } return; } } __inline static bool is_new_response(struct rsp_ctrl const *r , struct sge_rspq const *q ) { { return ((int )((unsigned char )r->__annonCompField116.type_gen) >> 7 == (int )((unsigned char )q->gen)); } } __inline static void rspq_next(struct sge_rspq *q ) { long tmp ; { q->cur_desc = q->cur_desc + (unsigned long )q->iqe_len; q->cidx = q->cidx + 1U; tmp = ldv__builtin_expect(q->cidx == q->size, 0L); if (tmp != 0L) { q->cidx = 0U; q->gen = (u8 )((unsigned int )q->gen ^ 1U); q->cur_desc = (__be64 const *)q->desc; } else { } return; } } static int process_responses(struct sge_rspq *q , int budget ) { int ret ; int rsp_type ; int budget_left ; struct rsp_ctrl const *rc ; struct sge_eth_rxq *rxq ; struct sge_rspq const *__mptr ; struct adapter *adapter ; struct sge *s ; bool tmp ; int tmp___0 ; struct page_frag *fp ; struct pkt_gl si ; struct rx_sw_desc const *rsd ; u32 len ; __u32 tmp___1 ; u32 bufsz ; u32 frags ; long tmp___2 ; int tmp___3 ; u32 _min1 ; u32 _min2 ; dma_addr_t tmp___4 ; void *tmp___5 ; long tmp___6 ; long tmp___7 ; long tmp___8 ; long tmp___9 ; long tmp___10 ; { budget_left = budget; __mptr = (struct sge_rspq const *)q; rxq = (struct sge_eth_rxq *)__mptr; adapter = q->adap; s = & adapter->sge; goto ldv_59575; ldv_59574: rc = (struct rsp_ctrl const *)q->cur_desc + ((unsigned long )q->iqe_len + 0xfffffffffffffff0UL); tmp = is_new_response(rc, (struct sge_rspq const *)q); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { goto ldv_59562; } else { } __asm__ volatile ("": : : "memory"); rsp_type = ((int )((unsigned char )rc->__annonCompField116.type_gen) >> 4) & 3; tmp___8 = ldv__builtin_expect(rsp_type == 0, 1L); if (tmp___8 != 0L) { tmp___1 = __fswab32(rc->pldbuflen_qid); len = tmp___1; if ((int )len < 0) { tmp___2 = ldv__builtin_expect(q->offset > 0, 1L); if (tmp___2 != 0L) { free_rx_bufs(q->adap, & rxq->fl, 1); q->offset = 0; } else { } len = len & 2147483647U; } else { } si.tot_len = len; frags = 0U; fp = (struct page_frag *)(& si.frags); ldv_59573: rsd = (struct rx_sw_desc const *)rxq->fl.sdesc + (unsigned long )rxq->fl.cidx; tmp___3 = get_buf_size(adapter, rsd); bufsz = (u32 )tmp___3; fp->page = rsd->page; fp->offset = (__u32 )q->offset; _min1 = bufsz; _min2 = len; fp->size = _min1 < _min2 ? _min1 : _min2; len = len - fp->size; if (len == 0U) { goto ldv_59572; } else { } unmap_rx_buf(q->adap, & rxq->fl); frags = frags + 1U; fp = fp + 1; goto ldv_59573; ldv_59572: tmp___4 = get_buf_addr(rsd); dma_sync_single_for_cpu((q->adap)->pdev_dev, tmp___4, (size_t )fp->size, 2); tmp___5 = lowmem_page_address((struct page const *)si.frags[0].page); si.va = tmp___5 + (unsigned long )si.frags[0].offset; __builtin_prefetch((void const *)si.va); si.nfrags = frags + 1U; ret = (*(q->handler))(q, q->cur_desc, (struct pkt_gl const *)(& si)); tmp___6 = ldv__builtin_expect(ret == 0, 1L); if (tmp___6 != 0L) { q->offset = (int )((__u32 )q->offset + (((fp->size + s->fl_align) - 1U) & - s->fl_align)); } else { restore_rx_bufs((struct pkt_gl const *)(& si), & rxq->fl, (int )frags); } } else { tmp___7 = ldv__builtin_expect(rsp_type == 1, 1L); if (tmp___7 != 0L) { ret = (*(q->handler))(q, q->cur_desc, (struct pkt_gl const *)0); } else { ret = (*(q->handler))(q, (__be64 const *)rc, (struct pkt_gl const *)1); } } tmp___9 = ldv__builtin_expect(ret != 0, 0L); if (tmp___9 != 0L) { q->next_intr_params = 10U; goto ldv_59562; } else { } rspq_next(q); budget_left = budget_left - 1; ldv_59575: tmp___10 = ldv__builtin_expect(budget_left != 0, 1L); if (tmp___10 != 0L) { goto ldv_59574; } else { } ldv_59562: ; if (q->offset >= 0 && rxq->fl.size - rxq->fl.avail > 15U) { __refill_fl(q->adap, & rxq->fl); } else { } return (budget - budget_left); } } int cxgb_busy_poll(struct napi_struct *napi ) { struct sge_rspq *q ; struct napi_struct const *__mptr ; unsigned int params ; unsigned int work_done ; u32 val ; bool tmp ; int tmp___0 ; int tmp___1 ; long tmp___2 ; { __mptr = (struct napi_struct const *)napi; q = (struct sge_rspq *)__mptr; tmp = cxgb_poll_lock_poll(q); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-2); } else { } tmp___1 = process_responses(q, 4); work_done = (unsigned int )tmp___1; params = 1U; q->next_intr_params = (u8 )params; val = (params << 12) | work_done; tmp___2 = ldv__builtin_expect((unsigned long )q->bar2_addr == (unsigned long )((void *)0), 0L); if (tmp___2 != 0L) { t4_write_reg(q->adap, 110596U, ((unsigned int )q->cntxt_id << 16) | val); } else { writel((q->bar2_qid << 16) | val, (void volatile *)q->bar2_addr + 20U); __asm__ volatile ("sfence": : : "memory"); } cxgb_poll_unlock_poll(q); return ((int )work_done); } } static int napi_rx_handler(struct napi_struct *napi , int budget ) { unsigned int params ; struct sge_rspq *q ; struct napi_struct const *__mptr ; int work_done ; u32 val ; bool tmp ; int tmp___0 ; int timer_index ; int _max1 ; int _max2 ; int _min1 ; int _max1___0 ; int _max2___0 ; int _min2 ; long tmp___1 ; long tmp___2 ; { __mptr = (struct napi_struct const *)napi; q = (struct sge_rspq *)__mptr; tmp = cxgb_poll_lock_napi(q); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (budget); } else { } work_done = process_responses(q, budget); tmp___1 = ldv__builtin_expect(work_done < budget, 1L); if (tmp___1 != 0L) { napi_complete(napi); timer_index = ((int )q->next_intr_params >> 1) & 7; if ((unsigned int )q->adaptive_rx != 0U) { _max1 = timer_pkt_quota[timer_index]; _max2 = 1; if ((_max1 > _max2 ? _max1 : _max2) < work_done) { timer_index = timer_index + 1; } else { timer_index = timer_index + -1; } _max1___0 = timer_index; _max2___0 = 0; _min1 = _max1___0 > _max2___0 ? _max1___0 : _max2___0; _min2 = 5; timer_index = _min1 < _min2 ? _min1 : _min2; q->next_intr_params = (int )((u8 )timer_index) << 1U; params = (unsigned int )q->next_intr_params; } else { params = (unsigned int )q->next_intr_params; q->next_intr_params = q->intr_params; } } else { params = 14U; } val = (params << 12) | (unsigned int )work_done; tmp___2 = ldv__builtin_expect((unsigned long )q->bar2_addr == (unsigned long )((void *)0), 0L); if (tmp___2 != 0L) { t4_write_reg(q->adap, 110596U, ((unsigned int )q->cntxt_id << 16) | val); } else { writel((q->bar2_qid << 16) | val, (void volatile *)q->bar2_addr + 20U); __asm__ volatile ("sfence": : : "memory"); } cxgb_poll_unlock_napi(q); return (work_done); } } irqreturn_t t4_sge_intr_msix(int irq , void *cookie ) { struct sge_rspq *q ; { q = (struct sge_rspq *)cookie; napi_schedule(& q->napi); return (1); } } static unsigned int process_intrq(struct adapter *adap ) { unsigned int credits ; struct rsp_ctrl const *rc ; struct sge_rspq *q ; u32 val ; bool tmp ; int tmp___0 ; unsigned int qid ; __u32 tmp___1 ; long tmp___2 ; { q = & adap->sge.intrq; spin_lock(& adap->sge.intrq_lock); credits = 0U; ldv_59622: rc = (struct rsp_ctrl const *)q->cur_desc + ((unsigned long )q->iqe_len + 0xfffffffffffffff0UL); tmp = is_new_response(rc, (struct sge_rspq const *)q); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { goto ldv_59620; } else { } __asm__ volatile ("": : : "memory"); if ((((int )((unsigned char )rc->__annonCompField116.type_gen) >> 4) & 3) == 2) { tmp___1 = __fswab32(rc->pldbuflen_qid); qid = tmp___1; qid = qid - adap->sge.ingr_start; napi_schedule(& (*(adap->sge.ingr_map + (unsigned long )qid))->napi); } else { } rspq_next(q); credits = credits + 1U; goto ldv_59622; ldv_59620: val = (unsigned int )((int )q->intr_params << 12) | credits; tmp___2 = ldv__builtin_expect((unsigned long )q->bar2_addr == (unsigned long )((void *)0), 0L); if (tmp___2 != 0L) { t4_write_reg(adap, 110596U, (u32 )((int )q->cntxt_id << 16) | val); } else { writel((q->bar2_qid << 16) | val, (void volatile *)q->bar2_addr + 20U); __asm__ volatile ("sfence": : : "memory"); } spin_unlock(& adap->sge.intrq_lock); return (credits); } } static irqreturn_t t4_intr_msi(int irq , void *cookie ) { struct adapter *adap ; { adap = (struct adapter *)cookie; if ((adap->flags & 128U) != 0U) { t4_slow_intr_handler(adap); } else { } process_intrq(adap); return (1); } } static irqreturn_t t4_intr_intx(int irq , void *cookie ) { struct adapter *adap ; int tmp ; int tmp___0 ; unsigned int tmp___1 ; { adap = (struct adapter *)cookie; t4_write_reg(adap, 110660U, 0U); if ((adap->flags & 128U) != 0U) { tmp = t4_slow_intr_handler(adap); if (tmp != 0) { tmp___0 = 1; } else { tmp___0 = 0; } } else { tmp___0 = 0; } tmp___1 = process_intrq(adap); if (((unsigned int )tmp___0 | tmp___1) != 0U) { return (1); } else { } return (0); } } irq_handler_t t4_intr_handler(struct adapter *adap ) { { if ((adap->flags & 8U) != 0U) { return (& t4_sge_intr_msix); } else { } if ((adap->flags & 4U) != 0U) { return (& t4_intr_msi); } else { } return (& t4_intr_intx); } } static void sge_rx_timer_cb(unsigned long data ) { unsigned long m ; unsigned int i ; struct adapter *adap ; struct sge *s ; struct sge_eth_rxq *rxq ; unsigned int id ; unsigned long tmp ; struct sge_fl *fl ; struct sge_fl const *__mptr ; bool tmp___0 ; bool tmp___1 ; { adap = (struct adapter *)data; s = & adap->sge; i = 0U; goto ldv_59652; ldv_59651: m = *(s->starving_fl + (unsigned long )i); goto ldv_59649; ldv_59648: tmp = __ffs(m); id = (unsigned int )tmp + i * 64U; fl = (struct sge_fl *)*(s->egr_map + (unsigned long )id); clear_bit((long )id, (unsigned long volatile *)s->starving_fl); __asm__ volatile ("": : : "memory"); tmp___1 = fl_starving((struct adapter const *)adap, (struct sge_fl const *)fl); if ((int )tmp___1) { __mptr = (struct sge_fl const *)fl; rxq = (struct sge_eth_rxq *)__mptr + 0xfffffffffffffe38UL; tmp___0 = napi_reschedule(& rxq->rspq.napi); if ((int )tmp___0) { fl->starving = fl->starving + 1UL; } else { set_bit((long )id, (unsigned long volatile *)s->starving_fl); } } else { } m = (m - 1UL) & m; ldv_59649: ; if (m != 0UL) { goto ldv_59648; } else { } i = i + 1U; ldv_59652: ; if ((unsigned long )i < ((unsigned long )s->egr_sz + 63UL) / 64UL) { goto ldv_59651; } else { } if ((adap->flags & 128U) == 0U) { goto done; } else { } t4_idma_monitor(adap, & s->idma_monitor, 250, 125); done: ldv_mod_timer_116(& s->rx_timer, (unsigned long )jiffies + 125UL); return; } } static void sge_tx_timer_cb(unsigned long data ) { unsigned long m ; unsigned int i ; unsigned int budget ; struct adapter *adap ; struct sge *s ; unsigned long id ; unsigned long tmp ; struct sge_ofld_txq *txq ; struct sge_eth_txq *q ; int avail ; int tmp___0 ; bool tmp___1 ; { adap = (struct adapter *)data; s = & adap->sge; i = 0U; goto ldv_59669; ldv_59668: m = *(s->txq_maperr + (unsigned long )i); goto ldv_59666; ldv_59665: tmp = __ffs(m); id = tmp + (unsigned long )(i * 64U); txq = (struct sge_ofld_txq *)*(s->egr_map + id); clear_bit((long )id, (unsigned long volatile *)s->txq_maperr); tasklet_schedule(& txq->qresume_tsk); m = (m - 1UL) & m; ldv_59666: ; if (m != 0UL) { goto ldv_59665; } else { } i = i + 1U; ldv_59669: ; if ((unsigned long )i < ((unsigned long )s->egr_sz + 63UL) / 64UL) { goto ldv_59668; } else { } budget = 100U; i = (unsigned int )s->ethtxq_rover; ldv_59679: q = (struct sge_eth_txq *)(& s->ethtxq) + (unsigned long )i; if (q->q.in_use != 0U && (long )(((unsigned long )jiffies - (q->txq)->trans_start) - 2UL) >= 0L) { tmp___1 = __netif_tx_trylock(q->txq); if ((int )tmp___1) { tmp___0 = reclaimable((struct sge_txq const *)(& q->q)); avail = tmp___0; if (avail != 0) { if ((unsigned int )avail > budget) { avail = (int )budget; } else { } free_tx_desc(adap, & q->q, (unsigned int )avail, 1); q->q.in_use = q->q.in_use - (unsigned int )avail; budget = budget - (unsigned int )avail; } else { } __netif_tx_unlock(q->txq); } else { } } else { } i = i + 1U; if (i >= (unsigned int )s->ethqsets) { i = 0U; } else { } if (budget != 0U && (unsigned int )s->ethtxq_rover != i) { goto ldv_59679; } else { } s->ethtxq_rover = (u16 )i; ldv_mod_timer_117(& s->tx_timer, (budget != 0U ? 125UL : 2UL) + (unsigned long )jiffies); return; } } static void *bar2_address(struct adapter *adapter , unsigned int qid , enum t4_bar2_qtype qtype , unsigned int *pbar2_qid ) { u64 bar2_qoffset ; int ret ; { ret = t4_bar2_sge_qregs(adapter, qid, qtype, 0, & bar2_qoffset, pbar2_qid); if (ret != 0) { return ((void *)0); } else { } return (adapter->bar2 + bar2_qoffset); } } int t4_sge_alloc_rxq(struct adapter *adap , struct sge_rspq *iq , bool fwevtq , struct net_device *dev , int intr_idx , struct sge_fl *fl , int (*hnd)(struct sge_rspq * , __be64 const * , struct pkt_gl const * ) , int cong ) { int ret ; int flsz ; struct fw_iq_cmd c ; struct sge *s ; struct port_info *pi ; void *tmp ; int __y ; void *tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; int tmp___3 ; __u16 tmp___4 ; __u16 tmp___5 ; __u64 tmp___6 ; enum chip_type chip ; int __y___0 ; void *tmp___7 ; __u32 tmp___8 ; __u16 tmp___9 ; __u16 tmp___10 ; __u64 tmp___11 ; __u16 tmp___12 ; __u16 tmp___13 ; __u16 tmp___14 ; unsigned int tmp___15 ; unsigned int tmp___16 ; unsigned long tmp___17 ; unsigned long tmp___18 ; unsigned int tmp___19 ; u32 param ; u32 val ; int i ; int tmp___20 ; { flsz = 0; s = & adap->sge; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; __y = 16; iq->size = (((iq->size + (unsigned int )__y) + 4294967295U) / (unsigned int )__y) * (unsigned int )__y; tmp___0 = alloc_ring(adap->pdev_dev, (size_t )iq->size, (size_t )iq->iqe_len, 0UL, & iq->phys_addr, (void *)0, 0UL, -1); iq->desc = (__be64 *)tmp___0; if ((unsigned long )iq->desc == (unsigned long )((__be64 *)0ULL)) { return (-12); } else { } memset((void *)(& c), 0, 64UL); tmp___1 = __fswab32((adap->pf << 8) | 279969792U); c.op_to_vfn = tmp___1; c.alloc_to_len16 = 67109008U; tmp___2 = __fswab32((__u32 )((((((int )fwevtq << 28) | ((int )pi->viid << 16)) | (intr_idx < 0 ? 32768 : 0)) | 4096) | (intr_idx < 0 ? ~ intr_idx : intr_idx))); c.type_to_iqandstindex = tmp___2; tmp___3 = __ilog2_u32(iq->iqe_len); tmp___4 = __fswab16((int )(((unsigned int )(((int )((__u16 )pi->tx_chan) << 12U) | ((int )((__u16 )iq->pktcnt_idx) << 4U)) | ((unsigned int )((__u16 )tmp___3) + 65532U)) | 16384U)); c.iqdroprss_to_iqesize = tmp___4; tmp___5 = __fswab16((int )((__u16 )iq->size)); c.iqsize = tmp___5; tmp___6 = __fswab64(iq->phys_addr); c.iqaddr = tmp___6; if (cong >= 0) { c.iqns_to_fl0congen = 8U; } else { } if ((unsigned long )fl != (unsigned long )((struct sge_fl *)0)) { chip = ((unsigned int )adap->params.chip >> 4) & 15U; if (fl->size < s->fl_starve_thres + 15U) { fl->size = s->fl_starve_thres + 15U; } else { } __y___0 = 8; fl->size = (((fl->size + (unsigned int )__y___0) + 4294967295U) / (unsigned int )__y___0) * (unsigned int )__y___0; tmp___7 = alloc_ring(adap->pdev_dev, (size_t )fl->size, 8UL, 16UL, & fl->addr, (void *)(& fl->sdesc), (size_t )s->stat_len, -1); fl->desc = (__be64 *)tmp___7; if ((unsigned long )fl->desc == (unsigned long )((__be64 *)0ULL)) { goto fl_nomem; } else { } flsz = (int )(fl->size / 8U + s->stat_len / 64U); c.iqns_to_fl0congen = c.iqns_to_fl0congen | 1175453696U; if (cong >= 0) { tmp___8 = __fswab32((unsigned int )(cong << 20) | 2049U); c.iqns_to_fl0congen = c.iqns_to_fl0congen | tmp___8; } else { } tmp___9 = __fswab16((unsigned int )chip <= 5U ? 304 : 288); c.fl0dcaen_to_fl0cidxfthresh = tmp___9; tmp___10 = __fswab16((int )((__u16 )flsz)); c.fl0size = tmp___10; tmp___11 = __fswab64(fl->addr); c.fl0addr = tmp___11; } else { } ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 64, (void *)(& c)); if (ret != 0) { goto err; } else { } netif_napi_add(dev, & iq->napi, & napi_rx_handler, 64); napi_hash_add(& iq->napi); iq->cur_desc = (__be64 const *)iq->desc; iq->cidx = 0U; iq->gen = 1U; iq->next_intr_params = iq->intr_params; tmp___12 = __fswab16((int )c.iqid); iq->cntxt_id = tmp___12; tmp___13 = __fswab16((int )c.physiqid); iq->abs_id = tmp___13; iq->bar2_addr = bar2_address(adap, (unsigned int )iq->cntxt_id, 1, & iq->bar2_qid); iq->size = iq->size - 1U; iq->netdev = dev; iq->handler = hnd; iq->offset = (unsigned long )fl != (unsigned long )((struct sge_fl *)0) ? 0 : -1; *(adap->sge.ingr_map + (unsigned long )((unsigned int )iq->cntxt_id - adap->sge.ingr_start)) = iq; if ((unsigned long )fl != (unsigned long )((struct sge_fl *)0)) { tmp___14 = __fswab16((int )c.fl0id); fl->cntxt_id = (unsigned int )tmp___14; tmp___15 = 0U; fl->pend_cred = tmp___15; fl->avail = tmp___15; tmp___16 = 0U; fl->cidx = tmp___16; fl->pidx = tmp___16; tmp___18 = 0UL; fl->starving = tmp___18; tmp___17 = tmp___18; fl->large_alloc_failed = tmp___17; fl->alloc_failed = tmp___17; *(adap->sge.egr_map + (unsigned long )(fl->cntxt_id - adap->sge.egr_start)) = (void *)fl; fl->bar2_addr = bar2_address(adap, fl->cntxt_id, 0, & fl->bar2_qid); tmp___19 = fl_cap((struct sge_fl const *)fl); refill_fl(adap, fl, (int )tmp___19, 208U); } else { } tmp___20 = is_t4(adap->params.chip); if (tmp___20 == 0 && cong >= 0) { param = (u32 )((int )iq->cntxt_id | 69206016); if (cong == 0) { val = 524288U; } else { val = 1048576U; i = 0; goto ldv_59715; ldv_59714: ; if ((cong >> i) & 1) { val = (u32 )(1 << (i << 2)) | val; } else { } i = i + 1; ldv_59715: ; if (i <= 3) { goto ldv_59714; } else { } } ret = t4_set_params(adap, adap->mbox, adap->pf, 0U, 1U, (u32 const *)(& param), (u32 const *)(& val)); if (ret != 0) { dev_warn((struct device const *)adap->pdev_dev, "Failed to set Congestion Manager Context for Ingress Queue %d: %d\n", (int )iq->cntxt_id, - ret); } else { } } else { } return (0); fl_nomem: ret = -12; err: ; if ((unsigned long )iq->desc != (unsigned long )((__be64 *)0ULL)) { dma_free_attrs(adap->pdev_dev, (size_t )(iq->size * iq->iqe_len), (void *)iq->desc, iq->phys_addr, (struct dma_attrs *)0); iq->desc = (__be64 *)0ULL; } else { } if ((unsigned long )fl != (unsigned long )((struct sge_fl *)0) && (unsigned long )fl->desc != (unsigned long )((__be64 *)0ULL)) { kfree((void const *)fl->sdesc); fl->sdesc = (struct rx_sw_desc *)0; dma_free_attrs(adap->pdev_dev, (unsigned long )flsz * 64UL, (void *)fl->desc, fl->addr, (struct dma_attrs *)0); fl->desc = (__be64 *)0ULL; } else { } return (ret); } } static void init_txq(struct adapter *adap , struct sge_txq *q , unsigned int id ) { unsigned int tmp ; unsigned long tmp___0 ; struct lock_class_key __key ; { q->cntxt_id = id; q->bar2_addr = bar2_address(adap, q->cntxt_id, 0, & q->bar2_qid); q->in_use = 0U; tmp = 0U; q->pidx = tmp; q->cidx = tmp; tmp___0 = 0UL; q->restarts = tmp___0; q->stops = tmp___0; q->stat = (struct sge_qstat *)q->desc + (unsigned long )q->size; spinlock_check(& q->db_lock); __raw_spin_lock_init(& q->db_lock.__annonCompField18.rlock, "&(&q->db_lock)->rlock", & __key); *(adap->sge.egr_map + (unsigned long )(id - adap->sge.egr_start)) = (void *)q; return; } } int t4_sge_alloc_eth_txq(struct adapter *adap , struct sge_eth_txq *txq , struct net_device *dev , struct netdev_queue *netdevq , unsigned int iqid ) { int ret ; int nentries ; struct fw_eq_eth_cmd c ; struct sge *s ; struct port_info *pi ; void *tmp ; int tmp___0 ; void *tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; __u64 tmp___6 ; __u32 tmp___7 ; unsigned long tmp___8 ; unsigned long tmp___9 ; { s = & adap->sge; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; nentries = (int )(txq->q.size + s->stat_len / 64U); tmp___0 = netdev_queue_numa_node_read((struct netdev_queue const *)netdevq); tmp___1 = alloc_ring(adap->pdev_dev, (size_t )txq->q.size, 64UL, 16UL, & txq->q.phys_addr, (void *)(& txq->q.sdesc), (size_t )s->stat_len, tmp___0); txq->q.desc = (struct tx_desc *)tmp___1; if ((unsigned long )txq->q.desc == (unsigned long )((struct tx_desc *)0)) { return (-12); } else { } memset((void *)(& c), 0, 48UL); tmp___2 = __fswab32((adap->pf << 8) | 313524224U); c.op_to_vfn = tmp___2; c.alloc_to_len16 = 50331792U; tmp___3 = __fswab32((unsigned int )((int )pi->viid << 16) | 1073741824U); c.viid_pkd = tmp___3; tmp___4 = __fswab32(((unsigned int )((int )pi->tx_chan << 16) | iqid) | 6291456U); c.fetchszm_to_iqid = tmp___4; tmp___5 = __fswab32((__u32 )(nentries | 20250624)); c.dcaen_to_eqsize = tmp___5; tmp___6 = __fswab64(txq->q.phys_addr); c.eqaddr = tmp___6; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 48, (void *)(& c)); if (ret != 0) { kfree((void const *)txq->q.sdesc); txq->q.sdesc = (struct tx_sw_desc *)0; dma_free_attrs(adap->pdev_dev, (unsigned long )nentries * 64UL, (void *)txq->q.desc, txq->q.phys_addr, (struct dma_attrs *)0); txq->q.desc = (struct tx_desc *)0; return (ret); } else { } tmp___7 = __fswab32(c.eqid_pkd); init_txq(adap, & txq->q, tmp___7 & 1048575U); txq->txq = netdevq; tmp___9 = 0UL; txq->vlan_ins = tmp___9; tmp___8 = tmp___9; txq->tx_cso = tmp___8; txq->tso = tmp___8; txq->mapping_err = 0UL; return (0); } } int t4_sge_alloc_ctrl_txq(struct adapter *adap , struct sge_ctrl_txq *txq , struct net_device *dev , unsigned int iqid , unsigned int cmplqid ) { int ret ; int nentries ; struct fw_eq_ctrl_cmd c ; struct sge *s ; struct port_info *pi ; void *tmp ; int tmp___0 ; void *tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; __u64 tmp___6 ; __u32 tmp___7 ; { s = & adap->sge; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; nentries = (int )(txq->q.size + s->stat_len / 64U); tmp___0 = dev_to_node(adap->pdev_dev); tmp___1 = alloc_ring(adap->pdev_dev, (size_t )nentries, 64UL, 0UL, & txq->q.phys_addr, (void *)0, 0UL, tmp___0); txq->q.desc = (struct tx_desc *)tmp___1; if ((unsigned long )txq->q.desc == (unsigned long )((struct tx_desc *)0)) { return (-12); } else { } tmp___2 = __fswab32((adap->pf << 8) | 330301440U); c.op_to_vfn = tmp___2; c.alloc_to_len16 = 33554576U; tmp___3 = __fswab32(cmplqid << 20); c.cmpliqid_eqid = tmp___3; c.physeqid_pkd = 0U; tmp___4 = __fswab32(((unsigned int )((int )pi->tx_chan << 16) | iqid) | 6291456U); c.fetchszm_to_iqid = tmp___4; tmp___5 = __fswab32((__u32 )(nentries | 20250624)); c.dcaen_to_eqsize = tmp___5; tmp___6 = __fswab64(txq->q.phys_addr); c.eqaddr = tmp___6; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 32, (void *)(& c)); if (ret != 0) { dma_free_attrs(adap->pdev_dev, (unsigned long )nentries * 64UL, (void *)txq->q.desc, txq->q.phys_addr, (struct dma_attrs *)0); txq->q.desc = (struct tx_desc *)0; return (ret); } else { } tmp___7 = __fswab32(c.cmpliqid_eqid); init_txq(adap, & txq->q, tmp___7 & 1048575U); txq->adap = adap; skb_queue_head_init(& txq->sendq); tasklet_init(& txq->qresume_tsk, & restart_ctrlq, (unsigned long )txq); txq->full = 0U; return (0); } } int t4_sge_alloc_ofld_txq(struct adapter *adap , struct sge_ofld_txq *txq , struct net_device *dev , unsigned int iqid ) { int ret ; int nentries ; struct fw_eq_ofld_cmd c ; struct sge *s ; struct port_info *pi ; void *tmp ; void *tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u64 tmp___4 ; __u32 tmp___5 ; { s = & adap->sge; tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; nentries = (int )(txq->q.size + s->stat_len / 64U); tmp___0 = alloc_ring(adap->pdev_dev, (size_t )txq->q.size, 64UL, 16UL, & txq->q.phys_addr, (void *)(& txq->q.sdesc), (size_t )s->stat_len, -1); txq->q.desc = (struct tx_desc *)tmp___0; if ((unsigned long )txq->q.desc == (unsigned long )((struct tx_desc *)0)) { return (-12); } else { } memset((void *)(& c), 0, 32UL); tmp___1 = __fswab32((adap->pf << 8) | 565182464U); c.op_to_vfn = tmp___1; c.alloc_to_len16 = 33554576U; tmp___2 = __fswab32(((unsigned int )((int )pi->tx_chan << 16) | iqid) | 6291456U); c.fetchszm_to_iqid = tmp___2; tmp___3 = __fswab32((__u32 )(nentries | 20250624)); c.dcaen_to_eqsize = tmp___3; tmp___4 = __fswab64(txq->q.phys_addr); c.eqaddr = tmp___4; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& c), 32, (void *)(& c)); if (ret != 0) { kfree((void const *)txq->q.sdesc); txq->q.sdesc = (struct tx_sw_desc *)0; dma_free_attrs(adap->pdev_dev, (unsigned long )nentries * 64UL, (void *)txq->q.desc, txq->q.phys_addr, (struct dma_attrs *)0); txq->q.desc = (struct tx_desc *)0; return (ret); } else { } tmp___5 = __fswab32(c.eqid_pkd); init_txq(adap, & txq->q, tmp___5 & 1048575U); txq->adap = adap; skb_queue_head_init(& txq->sendq); tasklet_init(& txq->qresume_tsk, & restart_ofldq, (unsigned long )txq); txq->full = 0U; txq->mapping_err = 0UL; return (0); } } static void free_txq(struct adapter *adap , struct sge_txq *q ) { struct sge *s ; { s = & adap->sge; dma_free_attrs(adap->pdev_dev, (unsigned long )q->size * 64UL + (unsigned long )s->stat_len, (void *)q->desc, q->phys_addr, (struct dma_attrs *)0); q->cntxt_id = 0U; q->sdesc = (struct tx_sw_desc *)0; q->desc = (struct tx_desc *)0; return; } } static void free_rspq_fl(struct adapter *adap , struct sge_rspq *rq , struct sge_fl *fl ) { struct sge *s ; unsigned int fl_id ; u16 tmp ; { s = & adap->sge; fl_id = (unsigned long )fl != (unsigned long )((struct sge_fl *)0) ? fl->cntxt_id : 65535U; *(adap->sge.ingr_map + (unsigned long )((unsigned int )rq->cntxt_id - adap->sge.ingr_start)) = (struct sge_rspq *)0; t4_iq_free(adap, adap->mbox, adap->pf, 0U, 0U, (unsigned int )rq->cntxt_id, fl_id, 65535U); dma_free_attrs(adap->pdev_dev, (size_t )((rq->size + 1U) * rq->iqe_len), (void *)rq->desc, rq->phys_addr, (struct dma_attrs *)0); napi_hash_del(& rq->napi); netif_napi_del(& rq->napi); rq->netdev = (struct net_device *)0; tmp = 0U; rq->abs_id = tmp; rq->cntxt_id = tmp; rq->desc = (__be64 *)0ULL; if ((unsigned long )fl != (unsigned long )((struct sge_fl *)0)) { free_rx_bufs(adap, fl, (int )fl->avail); dma_free_attrs(adap->pdev_dev, (size_t )(fl->size * 8U + s->stat_len), (void *)fl->desc, fl->addr, (struct dma_attrs *)0); kfree((void const *)fl->sdesc); fl->sdesc = (struct rx_sw_desc *)0; fl->cntxt_id = 0U; fl->desc = (__be64 *)0ULL; } else { } return; } } void t4_free_ofld_rxqs(struct adapter *adap , int n , struct sge_ofld_rxq *q ) { { goto ldv_59776; ldv_59775: ; if ((unsigned long )q->rspq.desc != (unsigned long )((__be64 *)0ULL)) { free_rspq_fl(adap, & q->rspq, q->fl.size != 0U ? & q->fl : (struct sge_fl *)0); } else { } n = n - 1; q = q + 1; ldv_59776: ; if (n != 0) { goto ldv_59775; } else { } return; } } void t4_free_sge_resources(struct adapter *adap ) { int i ; struct sge_eth_rxq *eq ; struct sge_eth_txq *etq ; struct sge_ofld_txq *q ; struct sge_ctrl_txq *cq ; { eq = (struct sge_eth_rxq *)(& adap->sge.ethrxq); etq = (struct sge_eth_txq *)(& adap->sge.ethtxq); i = 0; goto ldv_59785; ldv_59784: ; if ((unsigned long )eq->rspq.desc != (unsigned long )((__be64 *)0ULL)) { free_rspq_fl(adap, & eq->rspq, eq->fl.size != 0U ? & eq->fl : (struct sge_fl *)0); } else { } if ((unsigned long )etq->q.desc != (unsigned long )((struct tx_desc *)0)) { t4_eth_eq_free(adap, adap->mbox, adap->pf, 0U, etq->q.cntxt_id); free_tx_desc(adap, & etq->q, etq->q.in_use, 1); kfree((void const *)etq->q.sdesc); free_txq(adap, & etq->q); } else { } i = i + 1; eq = eq + 1; etq = etq + 1; ldv_59785: ; if ((int )adap->sge.ethqsets > i) { goto ldv_59784; } else { } t4_free_ofld_rxqs(adap, (int )adap->sge.ofldqsets, (struct sge_ofld_rxq *)(& adap->sge.ofldrxq)); t4_free_ofld_rxqs(adap, (int )adap->sge.rdmaqs, (struct sge_ofld_rxq *)(& adap->sge.rdmarxq)); t4_free_ofld_rxqs(adap, (int )adap->sge.rdmaciqs, (struct sge_ofld_rxq *)(& adap->sge.rdmaciq)); i = 0; goto ldv_59791; ldv_59790: q = (struct sge_ofld_txq *)(& adap->sge.ofldtxq) + (unsigned long )i; if ((unsigned long )q->q.desc != (unsigned long )((struct tx_desc *)0)) { tasklet_kill(& q->qresume_tsk); t4_ofld_eq_free(adap, adap->mbox, adap->pf, 0U, q->q.cntxt_id); free_tx_desc(adap, & q->q, q->q.in_use, 0); kfree((void const *)q->q.sdesc); __skb_queue_purge(& q->sendq); free_txq(adap, & q->q); } else { } i = i + 1; ldv_59791: ; if ((unsigned int )i <= 15U) { goto ldv_59790; } else { } i = 0; goto ldv_59797; ldv_59796: cq = (struct sge_ctrl_txq *)(& adap->sge.ctrlq) + (unsigned long )i; if ((unsigned long )cq->q.desc != (unsigned long )((struct tx_desc *)0)) { tasklet_kill(& cq->qresume_tsk); t4_ctrl_eq_free(adap, adap->mbox, adap->pf, 0U, cq->q.cntxt_id); __skb_queue_purge(& cq->sendq); free_txq(adap, & cq->q); } else { } i = i + 1; ldv_59797: ; if ((unsigned int )i <= 3U) { goto ldv_59796; } else { } if ((unsigned long )adap->sge.fw_evtq.desc != (unsigned long )((__be64 *)0ULL)) { free_rspq_fl(adap, & adap->sge.fw_evtq, (struct sge_fl *)0); } else { } if ((unsigned long )adap->sge.intrq.desc != (unsigned long )((__be64 *)0ULL)) { free_rspq_fl(adap, & adap->sge.intrq, (struct sge_fl *)0); } else { } memset((void *)adap->sge.egr_map, 0, (unsigned long )adap->sge.egr_sz * 8UL); return; } } void t4_sge_start(struct adapter *adap ) { { adap->sge.ethtxq_rover = 0U; ldv_mod_timer_118(& adap->sge.rx_timer, (unsigned long )jiffies + 125UL); ldv_mod_timer_119(& adap->sge.tx_timer, (unsigned long )jiffies + 125UL); return; } } void t4_sge_stop(struct adapter *adap ) { int i ; struct sge *s ; int tmp ; struct sge_ofld_txq *q ; struct sge_ctrl_txq *cq ; { s = & adap->sge; tmp = preempt_count(); if (((unsigned long )tmp & 2096896UL) != 0UL) { return; } else { } if ((unsigned long )s->rx_timer.function != (unsigned long )((void (*)(unsigned long ))0)) { ldv_del_timer_sync_120(& s->rx_timer); } else { } if ((unsigned long )s->tx_timer.function != (unsigned long )((void (*)(unsigned long ))0)) { ldv_del_timer_sync_121(& s->tx_timer); } else { } i = 0; goto ldv_59811; ldv_59810: q = (struct sge_ofld_txq *)(& s->ofldtxq) + (unsigned long )i; if ((unsigned long )q->q.desc != (unsigned long )((struct tx_desc *)0)) { tasklet_kill(& q->qresume_tsk); } else { } i = i + 1; ldv_59811: ; if ((unsigned int )i <= 15U) { goto ldv_59810; } else { } i = 0; goto ldv_59817; ldv_59816: cq = (struct sge_ctrl_txq *)(& s->ctrlq) + (unsigned long )i; if ((unsigned long )cq->q.desc != (unsigned long )((struct tx_desc *)0)) { tasklet_kill(& cq->qresume_tsk); } else { } i = i + 1; ldv_59817: ; if ((unsigned int )i <= 3U) { goto ldv_59816; } else { } return; } } static int t4_sge_init_soft(struct adapter *adap ) { struct sge *s ; u32 fl_small_pg ; u32 fl_large_pg ; u32 fl_small_mtu ; u32 fl_large_mtu ; u32 timer_value_0_and_1 ; u32 timer_value_2_and_3 ; u32 timer_value_4_and_5 ; u32 ingress_rx_threshold ; u32 tmp ; int tmp___0 ; unsigned int tmp___1 ; unsigned int tmp___2 ; unsigned int tmp___3 ; unsigned int tmp___4 ; unsigned int tmp___5 ; unsigned int tmp___6 ; unsigned int tmp___7 ; unsigned int tmp___8 ; { s = & adap->sge; tmp = t4_read_reg(adap, 4104U); if ((tmp & 262144U) == 0U) { dev_err((struct device const *)adap->pdev_dev, "bad SGE CPL MODE\n"); return (-22); } else { } fl_small_pg = t4_read_reg(adap, 4164U); fl_large_pg = t4_read_reg(adap, 4168U); fl_small_mtu = t4_read_reg(adap, 4172U); fl_large_mtu = t4_read_reg(adap, 4176U); if (fl_large_pg <= fl_small_pg) { fl_large_pg = 0U; } else { } if (fl_small_pg != 4096U || ((fl_large_pg - 1U) & fl_large_pg) != 0U) { dev_err((struct device const *)adap->pdev_dev, "bad SGE FL page buffer sizes [%d, %d]\n", fl_small_pg, fl_large_pg); return (-22); } else { } if (fl_large_pg != 0U) { tmp___0 = __ilog2_u32(fl_large_pg); s->fl_pg_order = (u32 )(tmp___0 + -12); } else { } tmp___1 = fl_mtu_bufsize(adap, 1500U); if (tmp___1 > fl_small_mtu) { dev_err((struct device const *)adap->pdev_dev, "bad SGE FL MTU sizes [%d, %d]\n", fl_small_mtu, fl_large_mtu); return (-22); } else { tmp___2 = fl_mtu_bufsize(adap, 9000U); if (tmp___2 > fl_large_mtu) { dev_err((struct device const *)adap->pdev_dev, "bad SGE FL MTU sizes [%d, %d]\n", fl_small_mtu, fl_large_mtu); return (-22); } else { } } timer_value_0_and_1 = t4_read_reg(adap, 4280U); timer_value_2_and_3 = t4_read_reg(adap, 4284U); timer_value_4_and_5 = t4_read_reg(adap, 4288U); tmp___3 = core_ticks_to_us((struct adapter const *)adap, timer_value_0_and_1 >> 16); s->timer_val[0] = (u16 )tmp___3; tmp___4 = core_ticks_to_us((struct adapter const *)adap, timer_value_0_and_1 & 65535U); s->timer_val[1] = (u16 )tmp___4; tmp___5 = core_ticks_to_us((struct adapter const *)adap, timer_value_2_and_3 >> 16); s->timer_val[2] = (u16 )tmp___5; tmp___6 = core_ticks_to_us((struct adapter const *)adap, timer_value_2_and_3 & 65535U); s->timer_val[3] = (u16 )tmp___6; tmp___7 = core_ticks_to_us((struct adapter const *)adap, timer_value_4_and_5 >> 16); s->timer_val[4] = (u16 )tmp___7; tmp___8 = core_ticks_to_us((struct adapter const *)adap, timer_value_4_and_5 & 65535U); s->timer_val[5] = (u16 )tmp___8; ingress_rx_threshold = t4_read_reg(adap, 4256U); s->counter_val[0] = (unsigned int )((u8 )(ingress_rx_threshold >> 24)) & 63U; s->counter_val[1] = (unsigned int )((u8 )(ingress_rx_threshold >> 16)) & 63U; s->counter_val[2] = (unsigned int )((u8 )(ingress_rx_threshold >> 8)) & 63U; s->counter_val[3] = (unsigned int )((u8 )ingress_rx_threshold) & 63U; return (0); } } int t4_sge_init(struct adapter *adap ) { struct sge *s ; u32 sge_control ; u32 sge_control2 ; u32 sge_conm_ctrl ; unsigned int ingpadboundary ; unsigned int ingpackboundary ; int ret ; int egress_threshold ; unsigned int _max1 ; unsigned int _max2 ; int tmp ; int tmp___0 ; struct lock_class_key __key ; { s = & adap->sge; sge_control = t4_read_reg(adap, 4104U); s->pktshift = (sge_control >> 10) & 7U; s->stat_len = (sge_control & 131072U) != 0U ? 128U : 64U; ingpadboundary = (unsigned int )(1 << (int )(((sge_control >> 4) & 7U) + 5U)); tmp = is_t4(adap->params.chip); if (tmp != 0) { s->fl_align = ingpadboundary; } else { sge_control2 = t4_read_reg(adap, 4388U); ingpackboundary = (sge_control2 >> 16) & 7U; if (ingpackboundary == 0U) { ingpackboundary = 16U; } else { ingpackboundary = (unsigned int )(1 << (int )(ingpackboundary + 5U)); } _max1 = ingpadboundary; _max2 = ingpackboundary; s->fl_align = _max1 > _max2 ? _max1 : _max2; } ret = t4_sge_init_soft(adap); if (ret < 0) { return (ret); } else { } sge_conm_ctrl = t4_read_reg(adap, 4244U); tmp___0 = is_t4(adap->params.chip); if (tmp___0 != 0) { egress_threshold = (int )(sge_conm_ctrl >> 8) & 63; } else { egress_threshold = (int )(sge_conm_ctrl >> 14) & 63; } s->fl_starve_thres = (u32 )(egress_threshold * 2 + 1); t4_idma_monitor_init(adap, & s->idma_monitor); reg_timer_10(& s->rx_timer, & sge_rx_timer_cb, (unsigned long )adap); reg_timer_10(& s->tx_timer, & sge_tx_timer_cb, (unsigned long )adap); spinlock_check(& s->intrq_lock); __raw_spin_lock_init(& s->intrq_lock.__annonCompField18.rlock, "&(&s->intrq_lock)->rlock", & __key); return (0); } } int reg_timer_10(struct timer_list *timer , void (*function)(unsigned long ) , unsigned long data ) { { if ((unsigned long )function == (unsigned long )(& sge_rx_timer_cb)) { activate_suitable_timer_10(timer, data); } else { } return (0); } } void disable_suitable_timer_11(struct timer_list *timer ) { { if (ldv_timer_11_0 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_11_0) { ldv_timer_11_0 = 0; return; } else { } if (ldv_timer_11_1 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_11_1) { ldv_timer_11_1 = 0; return; } else { } if (ldv_timer_11_2 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_11_2) { ldv_timer_11_2 = 0; return; } else { } if (ldv_timer_11_3 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_11_3) { ldv_timer_11_3 = 0; return; } else { } return; } } void ldv_timer_10(int state , struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; sge_rx_timer_cb(timer->data); LDV_IN_INTERRUPT = 1; return; } } void choose_timer_11(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_timer_11_0 == 1) { ldv_timer_11_0 = 2; ldv_timer_11(ldv_timer_11_0, ldv_timer_list_11_0); } else { } goto ldv_59863; case 1: ; if (ldv_timer_11_1 == 1) { ldv_timer_11_1 = 2; ldv_timer_11(ldv_timer_11_1, ldv_timer_list_11_1); } else { } goto ldv_59863; case 2: ; if (ldv_timer_11_2 == 1) { ldv_timer_11_2 = 2; ldv_timer_11(ldv_timer_11_2, ldv_timer_list_11_2); } else { } goto ldv_59863; case 3: ; if (ldv_timer_11_3 == 1) { ldv_timer_11_3 = 2; ldv_timer_11(ldv_timer_11_3, ldv_timer_list_11_3); } else { } goto ldv_59863; default: ldv_stop(); } ldv_59863: ; return; } } void activate_suitable_timer_10(struct timer_list *timer , unsigned long data ) { { if (ldv_timer_10_0 == 0 || ldv_timer_10_0 == 2) { ldv_timer_list_10_0 = timer; ldv_timer_list_10_0->data = data; ldv_timer_10_0 = 1; return; } else { } if (ldv_timer_10_1 == 0 || ldv_timer_10_1 == 2) { ldv_timer_list_10_1 = timer; ldv_timer_list_10_1->data = data; ldv_timer_10_1 = 1; return; } else { } if (ldv_timer_10_2 == 0 || ldv_timer_10_2 == 2) { ldv_timer_list_10_2 = timer; ldv_timer_list_10_2->data = data; ldv_timer_10_2 = 1; return; } else { } if (ldv_timer_10_3 == 0 || ldv_timer_10_3 == 2) { ldv_timer_list_10_3 = timer; ldv_timer_list_10_3->data = data; ldv_timer_10_3 = 1; return; } else { } return; } } void timer_init_11(void) { { ldv_timer_11_0 = 0; ldv_timer_11_1 = 0; ldv_timer_11_2 = 0; ldv_timer_11_3 = 0; return; } } int reg_timer_11(struct timer_list *timer , void (*function)(unsigned long ) , unsigned long data ) { { if ((unsigned long )function == (unsigned long )(& sge_tx_timer_cb)) { activate_suitable_timer_11(timer, data); } else { } return (0); } } void activate_suitable_timer_11(struct timer_list *timer , unsigned long data ) { { if (ldv_timer_11_0 == 0 || ldv_timer_11_0 == 2) { ldv_timer_list_11_0 = timer; ldv_timer_list_11_0->data = data; ldv_timer_11_0 = 1; return; } else { } if (ldv_timer_11_1 == 0 || ldv_timer_11_1 == 2) { ldv_timer_list_11_1 = timer; ldv_timer_list_11_1->data = data; ldv_timer_11_1 = 1; return; } else { } if (ldv_timer_11_2 == 0 || ldv_timer_11_2 == 2) { ldv_timer_list_11_2 = timer; ldv_timer_list_11_2->data = data; ldv_timer_11_2 = 1; return; } else { } if (ldv_timer_11_3 == 0 || ldv_timer_11_3 == 2) { ldv_timer_list_11_3 = timer; ldv_timer_list_11_3->data = data; ldv_timer_11_3 = 1; return; } else { } return; } } void activate_pending_timer_10(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_10_0 == (unsigned long )timer) { if (ldv_timer_10_0 == 2 || pending_flag != 0) { ldv_timer_list_10_0 = timer; ldv_timer_list_10_0->data = data; ldv_timer_10_0 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_10_1 == (unsigned long )timer) { if (ldv_timer_10_1 == 2 || pending_flag != 0) { ldv_timer_list_10_1 = timer; ldv_timer_list_10_1->data = data; ldv_timer_10_1 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_10_2 == (unsigned long )timer) { if (ldv_timer_10_2 == 2 || pending_flag != 0) { ldv_timer_list_10_2 = timer; ldv_timer_list_10_2->data = data; ldv_timer_10_2 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_10_3 == (unsigned long )timer) { if (ldv_timer_10_3 == 2 || pending_flag != 0) { ldv_timer_list_10_3 = timer; ldv_timer_list_10_3->data = data; ldv_timer_10_3 = 1; } else { } return; } else { } activate_suitable_timer_10(timer, data); return; } } void disable_suitable_timer_10(struct timer_list *timer ) { { if (ldv_timer_10_0 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_10_0) { ldv_timer_10_0 = 0; return; } else { } if (ldv_timer_10_1 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_10_1) { ldv_timer_10_1 = 0; return; } else { } if (ldv_timer_10_2 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_10_2) { ldv_timer_10_2 = 0; return; } else { } if (ldv_timer_10_3 != 0 && (unsigned long )timer == (unsigned long )ldv_timer_list_10_3) { ldv_timer_10_3 = 0; return; } else { } return; } } void ldv_timer_11(int state , struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; sge_tx_timer_cb(timer->data); LDV_IN_INTERRUPT = 1; return; } } void timer_init_10(void) { { ldv_timer_10_0 = 0; ldv_timer_10_1 = 0; ldv_timer_10_2 = 0; ldv_timer_10_3 = 0; return; } } void activate_pending_timer_11(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_11_0 == (unsigned long )timer) { if (ldv_timer_11_0 == 2 || pending_flag != 0) { ldv_timer_list_11_0 = timer; ldv_timer_list_11_0->data = data; ldv_timer_11_0 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_11_1 == (unsigned long )timer) { if (ldv_timer_11_1 == 2 || pending_flag != 0) { ldv_timer_list_11_1 = timer; ldv_timer_list_11_1->data = data; ldv_timer_11_1 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_11_2 == (unsigned long )timer) { if (ldv_timer_11_2 == 2 || pending_flag != 0) { ldv_timer_list_11_2 = timer; ldv_timer_list_11_2->data = data; ldv_timer_11_2 = 1; } else { } return; } else { } if ((unsigned long )ldv_timer_list_11_3 == (unsigned long )timer) { if (ldv_timer_11_3 == 2 || pending_flag != 0) { ldv_timer_list_11_3 = timer; ldv_timer_list_11_3->data = data; ldv_timer_11_3 = 1; } else { } return; } else { } activate_suitable_timer_11(timer, data); return; } } void choose_timer_10(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_timer_10_0 == 1) { ldv_timer_10_0 = 2; ldv_timer_10(ldv_timer_10_0, ldv_timer_list_10_0); } else { } goto ldv_59909; case 1: ; if (ldv_timer_10_1 == 1) { ldv_timer_10_1 = 2; ldv_timer_10(ldv_timer_10_1, ldv_timer_list_10_1); } else { } goto ldv_59909; case 2: ; if (ldv_timer_10_2 == 1) { ldv_timer_10_2 = 2; ldv_timer_10(ldv_timer_10_2, ldv_timer_list_10_2); } else { } goto ldv_59909; case 3: ; if (ldv_timer_10_3 == 1) { ldv_timer_10_3 = 2; ldv_timer_10(ldv_timer_10_3, ldv_timer_list_10_3); } else { } goto ldv_59909; default: ldv_stop(); } ldv_59909: ; return; } } bool ldv_queue_work_on_111(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_112(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_113(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_114(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_115(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } int ldv_mod_timer_116(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_10(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_mod_timer_117(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_10(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_mod_timer_118(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___5 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_10(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_mod_timer_119(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___6 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_10(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_del_timer_sync_120(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___7 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_10(ldv_func_arg1); return (ldv_func_res); } } int ldv_del_timer_sync_121(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___8 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_10(ldv_func_arg1); return (ldv_func_res); } } __inline static void __read_once_size(void const volatile *p , void *res , int size ) { { switch (size) { case 1: *((__u8 *)res) = *((__u8 volatile *)p); goto ldv_880; case 2: *((__u16 *)res) = *((__u16 volatile *)p); goto ldv_880; case 4: *((__u32 *)res) = *((__u32 volatile *)p); goto ldv_880; case 8: *((__u64 *)res) = *((__u64 volatile *)p); goto ldv_880; default: __asm__ volatile ("": : : "memory"); __builtin_memcpy(res, (void const *)p, (unsigned long )size); __asm__ volatile ("": : : "memory"); } ldv_880: ; return; } } extern int rcu_read_lock_held(void) ; bool ldv_queue_work_on_137(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_139(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_138(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_141(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_140(struct workqueue_struct *ldv_func_arg1 ) ; extern struct net_device *netdev_master_upper_dev_get_rcu(struct net_device * ) ; __inline static u32 jhash_1word(u32 a , u32 initval ) { u32 tmp ; { tmp = __jhash_nwords(a, 0U, 0U, initval + 3735928563U); return (tmp); } } extern int lockdep_rtnl_is_held(void) ; extern struct net_device *__vlan_find_dev_deep_rcu(struct net_device * , __be16 , u16 ) ; __inline static struct inet6_dev *__in6_dev_get(struct net_device const *dev ) { struct inet6_dev *________p1 ; struct inet6_dev *_________p1 ; union __anonunion___u_377 __u ; bool __warned ; int tmp ; int tmp___0 ; int tmp___1 ; { __read_once_size((void const volatile *)(& dev->ip6_ptr), (void *)(& __u.__c), 8); _________p1 = __u.__val; ________p1 = _________p1; tmp = debug_lockdep_rcu_enabled(); if (tmp != 0 && ! __warned) { tmp___0 = lockdep_rtnl_is_held(); if (tmp___0 == 0) { tmp___1 = rcu_read_lock_held(); if (tmp___1 == 0) { __warned = 1; lockdep_rcu_suspicious("include/net/addrconf.h", 234, "suspicious rcu_dereference_check() usage"); } else { } } else { } } else { } return (________p1); } } int clip_tbl_show(struct seq_file *seq , void *v ) ; __inline static unsigned int ipv4_clip_hash(struct clip_tbl *c , u32 const *key ) { unsigned int clipt_size_half ; u32 tmp ; { clipt_size_half = c->clipt_size / 2U; tmp = jhash_1word(*key, 0U); return (tmp % clipt_size_half); } } __inline static unsigned int ipv6_clip_hash(struct clip_tbl *d , u32 const *key ) { unsigned int clipt_size_half ; u32 xor ; u32 tmp ; { clipt_size_half = d->clipt_size / 2U; xor = (((unsigned int )*key ^ (unsigned int )*(key + 1UL)) ^ (unsigned int )*(key + 2UL)) ^ (unsigned int )*(key + 3UL); tmp = jhash_1word(xor, 0U); return (tmp % clipt_size_half + clipt_size_half); } } static unsigned int clip_addr_hash(struct clip_tbl *ctbl , u32 const *addr , u8 v6 ) { unsigned int tmp ; unsigned int tmp___0 ; unsigned int tmp___1 ; { if ((unsigned int )v6 != 0U) { tmp = ipv6_clip_hash(ctbl, addr); tmp___1 = tmp; } else { tmp___0 = ipv4_clip_hash(ctbl, addr); tmp___1 = tmp___0; } return (tmp___1); } } static int clip6_get_mbox(struct net_device const *dev , struct in6_addr const *lip ) { struct adapter *adap ; struct adapter *tmp ; struct fw_clip_cmd c ; int tmp___0 ; { tmp = netdev2adap(dev); adap = tmp; memset((void *)(& c), 0, 32UL); c.op_to_write = 41000U; c.alloc_to_len16 = 33554560U; c.ip_hi = *((__be64 *)(& lip->in6_u.u6_addr8)); c.ip_lo = *((__be64 *)(& lip->in6_u.u6_addr8) + 8U); tmp___0 = t4_wr_mbox_meat(adap, (int )adap->mbox, (void const *)(& c), 32, (void *)(& c), 0); return (tmp___0); } } static int clip6_release_mbox(struct net_device const *dev , struct in6_addr const *lip ) { struct adapter *adap ; struct adapter *tmp ; struct fw_clip_cmd c ; int tmp___0 ; { tmp = netdev2adap(dev); adap = tmp; memset((void *)(& c), 0, 32UL); c.op_to_write = 49192U; c.alloc_to_len16 = 33554496U; c.ip_hi = *((__be64 *)(& lip->in6_u.u6_addr8)); c.ip_lo = *((__be64 *)(& lip->in6_u.u6_addr8) + 8U); tmp___0 = t4_wr_mbox_meat(adap, (int )adap->mbox, (void const *)(& c), 32, (void *)(& c), 0); return (tmp___0); } } int cxgb4_clip_get(struct net_device const *dev , u32 const *lip , u8 v6 ) { struct adapter *adap ; struct adapter *tmp ; struct clip_tbl *ctbl ; struct clip_entry *ce ; struct clip_entry *cte ; u32 *addr ; int hash ; int ret ; unsigned int tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct lock_class_key __key ; int tmp___1 ; { tmp = netdev2adap(dev); adap = tmp; ctbl = adap->clipt; addr = (u32 *)lip; ret = -1; if ((unsigned long )ctbl == (unsigned long )((struct clip_tbl *)0)) { return (0); } else { } tmp___0 = clip_addr_hash(ctbl, (u32 const *)addr, (int )v6); hash = (int )tmp___0; _raw_read_lock_bh(& ctbl->lock); __mptr = (struct list_head const *)((struct list_head *)(& ctbl->hash_list) + (unsigned long )hash)->next; cte = (struct clip_entry *)__mptr + 0xffffffffffffffb0UL; goto ldv_55803; ldv_55802: ; if ((unsigned int )cte->__annonCompField111.addr6.sin6_family == 10U && (unsigned int )v6 != 0U) { ret = memcmp((void const *)lip, (void const *)(& cte->__annonCompField111.addr6.sin6_addr.in6_u.u6_addr8), 16UL); } else if ((unsigned int )cte->__annonCompField111.addr.sin_family == 2U && (unsigned int )v6 == 0U) { ret = memcmp((void const *)lip, (void const *)(& cte->__annonCompField111.addr.sin_addr), 4UL); } else { } if (ret == 0) { ce = cte; _raw_read_unlock_bh(& ctbl->lock); goto found; } else { } __mptr___0 = (struct list_head const *)cte->list.next; cte = (struct clip_entry *)__mptr___0 + 0xffffffffffffffb0UL; ldv_55803: ; if ((unsigned long )(& cte->list) != (unsigned long )((struct list_head *)(& ctbl->hash_list) + (unsigned long )hash)) { goto ldv_55802; } else { } _raw_read_unlock_bh(& ctbl->lock); _raw_write_lock_bh(& ctbl->lock); tmp___1 = list_empty((struct list_head const *)(& ctbl->ce_free_head)); if (tmp___1 == 0) { __mptr___1 = (struct list_head const *)ctbl->ce_free_head.next; ce = (struct clip_entry *)__mptr___1 + 0xffffffffffffffb0UL; list_del(& ce->list); INIT_LIST_HEAD(& ce->list); spinlock_check(& ce->lock); __raw_spin_lock_init(& ce->lock.__annonCompField18.rlock, "&(&ce->lock)->rlock", & __key); atomic_set(& ce->refcnt, 0); atomic_dec(& ctbl->nfree); list_add_tail(& ce->list, (struct list_head *)(& ctbl->hash_list) + (unsigned long )hash); if ((unsigned int )v6 != 0U) { ce->__annonCompField111.addr6.sin6_family = 10U; memcpy((void *)(& ce->__annonCompField111.addr6.sin6_addr.in6_u.u6_addr8), (void const *)lip, 16UL); ret = clip6_get_mbox(dev, (struct in6_addr const *)lip); if (ret != 0) { _raw_write_unlock_bh(& ctbl->lock); return (ret); } else { } } else { ce->__annonCompField111.addr.sin_family = 2U; memcpy((void *)(& ce->__annonCompField111.addr.sin_addr), (void const *)lip, 4UL); } } else { _raw_write_unlock_bh(& ctbl->lock); return (-12); } _raw_write_unlock_bh(& ctbl->lock); found: atomic_inc(& ce->refcnt); return (0); } } static char const __kstrtab_cxgb4_clip_get[15U] = { 'c', 'x', 'g', 'b', '4', '_', 'c', 'l', 'i', 'p', '_', 'g', 'e', 't', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_clip_get ; struct kernel_symbol const __ksymtab_cxgb4_clip_get = {(unsigned long )(& cxgb4_clip_get), (char const *)(& __kstrtab_cxgb4_clip_get)}; void cxgb4_clip_release(struct net_device const *dev , u32 const *lip , u8 v6 ) { struct adapter *adap ; struct adapter *tmp ; struct clip_tbl *ctbl ; struct clip_entry *ce ; struct clip_entry *cte ; u32 *addr ; int hash ; int ret ; unsigned int tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp___1 ; { tmp = netdev2adap(dev); adap = tmp; ctbl = adap->clipt; addr = (u32 *)lip; ret = -1; tmp___0 = clip_addr_hash(ctbl, (u32 const *)addr, (int )v6); hash = (int )tmp___0; _raw_read_lock_bh(& ctbl->lock); __mptr = (struct list_head const *)((struct list_head *)(& ctbl->hash_list) + (unsigned long )hash)->next; cte = (struct clip_entry *)__mptr + 0xffffffffffffffb0UL; goto ldv_55835; ldv_55834: ; if ((unsigned int )cte->__annonCompField111.addr6.sin6_family == 10U && (unsigned int )v6 != 0U) { ret = memcmp((void const *)lip, (void const *)(& cte->__annonCompField111.addr6.sin6_addr.in6_u.u6_addr8), 16UL); } else if ((unsigned int )cte->__annonCompField111.addr.sin_family == 2U && (unsigned int )v6 == 0U) { ret = memcmp((void const *)lip, (void const *)(& cte->__annonCompField111.addr.sin_addr), 4UL); } else { } if (ret == 0) { ce = cte; _raw_read_unlock_bh(& ctbl->lock); goto found; } else { } __mptr___0 = (struct list_head const *)cte->list.next; cte = (struct clip_entry *)__mptr___0 + 0xffffffffffffffb0UL; ldv_55835: ; if ((unsigned long )(& cte->list) != (unsigned long )((struct list_head *)(& ctbl->hash_list) + (unsigned long )hash)) { goto ldv_55834; } else { } _raw_read_unlock_bh(& ctbl->lock); return; found: _raw_write_lock_bh(& ctbl->lock); spin_lock_bh(& ce->lock); tmp___1 = atomic_dec_and_test(& ce->refcnt); if (tmp___1 != 0) { list_del(& ce->list); INIT_LIST_HEAD(& ce->list); list_add_tail(& ce->list, & ctbl->ce_free_head); atomic_inc(& ctbl->nfree); if ((unsigned int )v6 != 0U) { clip6_release_mbox(dev, (struct in6_addr const *)lip); } else { } } else { } spin_unlock_bh(& ce->lock); _raw_write_unlock_bh(& ctbl->lock); return; } } static char const __kstrtab_cxgb4_clip_release[19U] = { 'c', 'x', 'g', 'b', '4', '_', 'c', 'l', 'i', 'p', '_', 'r', 'e', 'l', 'e', 'a', 's', 'e', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_clip_release ; struct kernel_symbol const __ksymtab_cxgb4_clip_release = {(unsigned long )(& cxgb4_clip_release), (char const *)(& __kstrtab_cxgb4_clip_release)}; static int cxgb4_update_dev_clip(struct net_device *root_dev , struct net_device *dev ) { struct inet6_dev *idev ; struct inet6_ifaddr *ifa ; int ret ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { idev = (struct inet6_dev *)0; ret = 0; idev = __in6_dev_get((struct net_device const *)root_dev); if ((unsigned long )idev == (unsigned long )((struct inet6_dev *)0)) { return (ret); } else { } _raw_read_lock_bh(& idev->lock); __mptr = (struct list_head const *)idev->addr_list.next; ifa = (struct inet6_ifaddr *)__mptr + 0xfffffffffffffe78UL; goto ldv_55859; ldv_55858: ret = cxgb4_clip_get((struct net_device const *)dev, (u32 const *)(& ifa->addr.in6_u.u6_addr8), 1); if (ret < 0) { goto ldv_55857; } else { } __mptr___0 = (struct list_head const *)ifa->if_list.next; ifa = (struct inet6_ifaddr *)__mptr___0 + 0xfffffffffffffe78UL; ldv_55859: ; if ((unsigned long )(& ifa->if_list) != (unsigned long )(& idev->addr_list)) { goto ldv_55858; } else { } ldv_55857: _raw_read_unlock_bh(& idev->lock); return (ret); } } int cxgb4_update_root_dev_clip(struct net_device *dev ) { struct net_device *root_dev ; int i ; int ret ; { root_dev = (struct net_device *)0; ret = 0; ret = cxgb4_update_dev_clip(dev, dev); if (ret != 0) { return (ret); } else { } root_dev = netdev_master_upper_dev_get_rcu(dev); if ((unsigned long )root_dev != (unsigned long )((struct net_device *)0)) { ret = cxgb4_update_dev_clip(root_dev, dev); if (ret != 0) { return (ret); } else { } } else { } i = 0; goto ldv_55869; ldv_55868: root_dev = __vlan_find_dev_deep_rcu(dev, 129, (int )((u16 )i)); if ((unsigned long )root_dev == (unsigned long )((struct net_device *)0)) { goto ldv_55866; } else { } ret = cxgb4_update_dev_clip(root_dev, dev); if (ret != 0) { goto ldv_55867; } else { } ldv_55866: i = i + 1; ldv_55869: ; if (i <= 4095) { goto ldv_55868; } else { } ldv_55867: ; return (ret); } } static char const __kstrtab_cxgb4_update_root_dev_clip[27U] = { 'c', 'x', 'g', 'b', '4', '_', 'u', 'p', 'd', 'a', 't', 'e', '_', 'r', 'o', 'o', 't', '_', 'd', 'e', 'v', '_', 'c', 'l', 'i', 'p', '\000'}; struct kernel_symbol const __ksymtab_cxgb4_update_root_dev_clip ; struct kernel_symbol const __ksymtab_cxgb4_update_root_dev_clip = {(unsigned long )(& cxgb4_update_root_dev_clip), (char const *)(& __kstrtab_cxgb4_update_root_dev_clip)}; int clip_tbl_show(struct seq_file *seq , void *v ) { struct adapter *adapter ; struct clip_tbl *ctbl ; struct clip_entry *ce ; char ip[60U] ; int i ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; int tmp___0 ; { adapter = (struct adapter *)seq->private; ctbl = adapter->clipt; _raw_read_lock_bh(& ctbl->lock); seq_puts(seq, "IP Address Users\n"); i = 0; goto ldv_55894; ldv_55893: __mptr = (struct list_head const *)((struct list_head *)(& ctbl->hash_list) + (unsigned long )i)->next; ce = (struct clip_entry *)__mptr + 0xffffffffffffffb0UL; goto ldv_55891; ldv_55890: ip[0] = 0; sprintf((char *)(& ip), "%pISc", & ce->__annonCompField111.addr); tmp = atomic_read((atomic_t const *)(& ce->refcnt)); seq_printf(seq, "%-25s %u\n", (char *)(& ip), tmp); __mptr___0 = (struct list_head const *)ce->list.next; ce = (struct clip_entry *)__mptr___0 + 0xffffffffffffffb0UL; ldv_55891: ; if ((unsigned long )(& ce->list) != (unsigned long )((struct list_head *)(& ctbl->hash_list) + (unsigned long )i)) { goto ldv_55890; } else { } i = i + 1; ldv_55894: ; if ((unsigned int )i < ctbl->clipt_size) { goto ldv_55893; } else { } tmp___0 = atomic_read((atomic_t const *)(& ctbl->nfree)); seq_printf(seq, "Free clip entries : %d\n", tmp___0); _raw_read_unlock_bh(& ctbl->lock); return (0); } } struct clip_tbl *t4_init_clip_tbl(unsigned int clipt_start , unsigned int clipt_end ) { struct clip_entry *cl_list ; struct clip_tbl *ctbl ; unsigned int clipt_size ; int i ; void *tmp ; struct lock_class_key __key ; void *tmp___0 ; { if (clipt_start >= clipt_end) { return ((struct clip_tbl *)0); } else { } clipt_size = (clipt_end - clipt_start) + 1U; if (clipt_size <= 1U) { return ((struct clip_tbl *)0); } else { } tmp = t4_alloc_mem(((unsigned long )clipt_size + 7UL) * 16UL); ctbl = (struct clip_tbl *)tmp; if ((unsigned long )ctbl == (unsigned long )((struct clip_tbl *)0)) { return ((struct clip_tbl *)0); } else { } ctbl->clipt_start = clipt_start; ctbl->clipt_size = clipt_size; INIT_LIST_HEAD(& ctbl->ce_free_head); atomic_set(& ctbl->nfree, (int )clipt_size); __rwlock_init(& ctbl->lock, "&ctbl->lock", & __key); i = 0; goto ldv_55906; ldv_55905: INIT_LIST_HEAD((struct list_head *)(& ctbl->hash_list) + (unsigned long )i); i = i + 1; ldv_55906: ; if ((unsigned int )i < ctbl->clipt_size) { goto ldv_55905; } else { } tmp___0 = t4_alloc_mem((unsigned long )clipt_size * 128UL); cl_list = (struct clip_entry *)tmp___0; ctbl->cl_list = (void *)cl_list; i = 0; goto ldv_55909; ldv_55908: INIT_LIST_HEAD(& (cl_list + (unsigned long )i)->list); list_add_tail(& (cl_list + (unsigned long )i)->list, & ctbl->ce_free_head); i = i + 1; ldv_55909: ; if ((unsigned int )i < clipt_size) { goto ldv_55908; } else { } return (ctbl); } } void t4_cleanup_clip_tbl(struct adapter *adap ) { struct clip_tbl *ctbl ; { ctbl = adap->clipt; if ((unsigned long )ctbl != (unsigned long )((struct clip_tbl *)0)) { if ((unsigned long )ctbl->cl_list != (unsigned long )((void *)0)) { t4_free_mem(ctbl->cl_list); } else { } t4_free_mem((void *)ctbl); } else { } return; } } static char const __kstrtab_t4_cleanup_clip_tbl[20U] = { 't', '4', '_', 'c', 'l', 'e', 'a', 'n', 'u', 'p', '_', 'c', 'l', 'i', 'p', '_', 't', 'b', 'l', '\000'}; struct kernel_symbol const __ksymtab_t4_cleanup_clip_tbl ; struct kernel_symbol const __ksymtab_t4_cleanup_clip_tbl = {(unsigned long )(& t4_cleanup_clip_tbl), (char const *)(& __kstrtab_t4_cleanup_clip_tbl)}; bool ldv_queue_work_on_137(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_138(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_139(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_140(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_141(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } extern size_t strlcpy(char * , char const * , size_t ) ; bool ldv_queue_work_on_151(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_153(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_152(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_155(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_154(struct workqueue_struct *ldv_func_arg1 ) ; __inline static void ethtool_cmd_speed_set(struct ethtool_cmd *ep , __u32 speed ) { { ep->speed = (unsigned short )speed; ep->speed_hi = (unsigned short )(speed >> 16); return; } } __inline static __u32 ethtool_cmd_speed(struct ethtool_cmd const *ep ) { { return ((__u32 )(((int )ep->speed_hi << 16) | (int )ep->speed)); } } extern u32 ethtool_op_get_link(struct net_device * ) ; __inline static unsigned int mk_adap_vers(struct adapter *ap ) { { return (((((unsigned int )ap->params.chip >> 4) & 15U) | (((unsigned int )ap->params.chip & 15U) << 10)) | 65536U); } } __inline static unsigned int qtimer_val(struct adapter const *adap , struct sge_rspq const *q ) { unsigned int idx ; { idx = (unsigned int )((int )((unsigned char )q->intr_params) >> 1); return (idx <= 5U ? (unsigned int )adap->sge.timer_val[idx] : 0U); } } static u32 get_msglevel(struct net_device *dev ) { struct adapter *tmp ; { tmp = netdev2adap((struct net_device const *)dev); return ((u32 )tmp->msg_enable); } } static void set_msglevel(struct net_device *dev , u32 val ) { struct adapter *tmp ; { tmp = netdev2adap((struct net_device const *)dev); tmp->msg_enable = (int )val; return; } } static char const stats_strings[65U][32U] = { { 'T', 'x', 'O', 'c', 't', 'e', 't', 's', 'O', 'K', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', 'O', 'K', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'B', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', '\000'}, { 'T', 'x', 'M', 'u', 'l', 't', 'i', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', '\000'}, { 'T', 'x', 'U', 'n', 'i', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'E', 'r', 'r', 'o', 'r', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '6', '4', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '6', '5', 'T', 'o', '1', '2', '7', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '2', '8', 'T', 'o', '2', '5', '5', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '2', '5', '6', 'T', 'o', '5', '1', '1', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '5', '1', '2', 'T', 'o', '1', '0', '2', '3', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '0', '2', '4', 'T', 'o', '1', '5', '1', '8', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '5', '1', '9', 'T', 'o', 'M', 'a', 'x', ' ', ' ', '\000'}, { 'T', 'x', 'F', 'r', 'a', 'm', 'e', 's', 'D', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'a', 'u', 's', 'e', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '0', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '1', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '2', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '3', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '4', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '5', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '6', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'P', 'P', 'P', '7', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'O', 'c', 't', 'e', 't', 's', 'O', 'K', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', 'O', 'K', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'B', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', '\000'}, { 'R', 'x', 'M', 'u', 'l', 't', 'i', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', '\000'}, { 'R', 'x', 'U', 'n', 'i', 'c', 'a', 's', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', 'T', 'o', 'o', 'L', 'o', 'n', 'g', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'J', 'a', 'b', 'b', 'e', 'r', 'E', 'r', 'r', 'o', 'r', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'C', 'S', 'E', 'r', 'r', 'o', 'r', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'L', 'e', 'n', 'g', 't', 'h', 'E', 'r', 'r', 'o', 'r', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'S', 'y', 'm', 'b', 'o', 'l', 'E', 'r', 'r', 'o', 'r', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'R', 'u', 'n', 't', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '6', '4', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '6', '5', 'T', 'o', '1', '2', '7', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '2', '8', 'T', 'o', '2', '5', '5', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '2', '5', '6', 'T', 'o', '5', '1', '1', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '5', '1', '2', 'T', 'o', '1', '0', '2', '3', ' ', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '0', '2', '4', 'T', 'o', '1', '5', '1', '8', ' ', '\000'}, { 'R', 'x', 'F', 'r', 'a', 'm', 'e', 's', '1', '5', '1', '9', 'T', 'o', 'M', 'a', 'x', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'a', 'u', 's', 'e', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '0', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '1', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '2', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '3', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '4', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '5', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '6', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'P', 'P', 'P', '7', 'F', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'B', 'G', '0', 'F', 'r', 'a', 'm', 'e', 's', 'D', 'r', 'o', 'p', 'p', 'e', 'd', ' ', '\000'}, { 'R', 'x', 'B', 'G', '1', 'F', 'r', 'a', 'm', 'e', 's', 'D', 'r', 'o', 'p', 'p', 'e', 'd', ' ', '\000'}, { 'R', 'x', 'B', 'G', '2', 'F', 'r', 'a', 'm', 'e', 's', 'D', 'r', 'o', 'p', 'p', 'e', 'd', ' ', '\000'}, { 'R', 'x', 'B', 'G', '3', 'F', 'r', 'a', 'm', 'e', 's', 'D', 'r', 'o', 'p', 'p', 'e', 'd', ' ', '\000'}, { 'R', 'x', 'B', 'G', '0', 'F', 'r', 'a', 'm', 'e', 's', 'T', 'r', 'u', 'n', 'c', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'B', 'G', '1', 'F', 'r', 'a', 'm', 'e', 's', 'T', 'r', 'u', 'n', 'c', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'B', 'G', '2', 'F', 'r', 'a', 'm', 'e', 's', 'T', 'r', 'u', 'n', 'c', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'B', 'G', '3', 'F', 'r', 'a', 'm', 'e', 's', 'T', 'r', 'u', 'n', 'c', ' ', ' ', ' ', '\000'}, { 'T', 'S', 'O', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'T', 'x', 'C', 's', 'u', 'm', 'O', 'f', 'f', 'l', 'o', 'a', 'd', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'R', 'x', 'C', 's', 'u', 'm', 'G', 'o', 'o', 'd', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'V', 'L', 'A', 'N', 'e', 'x', 't', 'r', 'a', 'c', 't', 'i', 'o', 'n', 's', ' ', ' ', ' ', ' ', '\000'}, { 'V', 'L', 'A', 'N', 'i', 'n', 's', 'e', 'r', 't', 'i', 'o', 'n', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'G', 'R', 'O', 'p', 'a', 'c', 'k', 'e', 't', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'G', 'R', 'O', 'm', 'e', 'r', 'g', 'e', 'd', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}}; static char adapter_stats_strings[20U][32U] = { { 'd', 'b', '_', 'd', 'r', 'o', 'p', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'd', 'b', '_', 'f', 'u', 'l', 'l', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'd', 'b', '_', 'e', 'm', 'p', 't', 'y', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '4', '_', 'o', 'u', 't', '_', 'r', 's', 't', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '4', '_', 'i', 'n', '_', 's', 'e', 'g', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '4', '_', 'o', 'u', 't', '_', 's', 'e', 'g', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '4', '_', 'r', 'e', 't', 'r', 'a', 'n', 's', '_', 's', 'e', 'g', 's', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '6', '_', 'o', 'u', 't', '_', 'r', 's', 't', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '6', '_', 'i', 'n', '_', 's', 'e', 'g', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '6', '_', 'o', 'u', 't', '_', 's', 'e', 'g', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'c', 'p', '_', 'i', 'p', 'v', '6', '_', 'r', 'e', 't', 'r', 'a', 'n', 's', '_', 's', 'e', 'g', 's', ' ', ' ', '\000'}, { 'u', 's', 'm', '_', 'd', 'd', 'p', '_', 'f', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'u', 's', 'm', '_', 'd', 'd', 'p', '_', 'o', 'c', 't', 'e', 't', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'u', 's', 'm', '_', 'd', 'd', 'p', '_', 'd', 'r', 'o', 'p', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'r', 'd', 'm', 'a', '_', 'n', 'o', '_', 'r', 'q', 'e', '_', 'm', 'o', 'd', '_', 'd', 'e', 'f', 'e', 'r', ' ', ' ', '\000'}, { 'r', 'd', 'm', 'a', '_', 'n', 'o', '_', 'r', 'q', 'e', '_', 'p', 'k', 't', '_', 'd', 'e', 'f', 'e', 'r', ' ', ' ', '\000'}, { 't', 'p', '_', 'e', 'r', 'r', '_', 'o', 'f', 'l', 'd', '_', 'n', 'o', '_', 'n', 'e', 'i', 'g', 'h', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'e', 'r', 'r', '_', 'o', 'f', 'l', 'd', '_', 'c', 'o', 'n', 'g', '_', 'd', 'e', 'f', 'e', 'r', ' ', '\000'}, { 'w', 'r', 'i', 't', 'e', '_', 'c', 'o', 'a', 'l', '_', 's', 'u', 'c', 'c', 'e', 's', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'w', 'r', 'i', 't', 'e', '_', 'c', 'o', 'a', 'l', '_', 'f', 'a', 'i', 'l', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}}; static char channel_stats_strings[14U][32U] = { { '-', '-', '-', '-', '-', '-', '-', '-', 'C', 'h', 'a', 'n', 'n', 'e', 'l', '-', '-', '-', '-', '-', '-', '-', '-', '-', ' ', '\000'}, { 't', 'p', '_', 'c', 'p', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'c', 'p', 'l', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'm', 'a', 'c', '_', 'i', 'n', '_', 'e', 'r', 'r', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'h', 'd', 'r', '_', 'i', 'n', '_', 'e', 'r', 'r', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 't', 'c', 'p', '_', 'i', 'n', '_', 'e', 'r', 'r', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 't', 'c', 'p', '6', '_', 'i', 'n', '_', 'e', 'r', 'r', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 't', 'n', 'l', '_', 'c', 'o', 'n', 'g', '_', 'd', 'r', 'o', 'p', 's', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 't', 'n', 'l', '_', 't', 'x', '_', 'd', 'r', 'o', 'p', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'o', 'f', 'l', 'd', '_', 'v', 'l', 'a', 'n', '_', 'd', 'r', 'o', 'p', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 't', 'p', '_', 'o', 'f', 'l', 'd', '_', 'c', 'h', 'a', 'n', '_', 'd', 'r', 'o', 'p', 's', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'c', 'o', 'e', '_', 'o', 'c', 't', 'e', 't', 's', '_', 'd', 'd', 'p', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'c', 'o', 'e', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'd', 'p', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'c', 'o', 'e', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}}; static char loopback_stats_strings[23U][32U] = { { '-', '-', '-', '-', '-', '-', '-', 'L', 'o', 'o', 'p', 'b', 'a', 'c', 'k', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', ' ', '\000'}, { 'o', 'c', 't', 'e', 't', 's', '_', 'o', 'k', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', 'o', 'k', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'c', 'a', 's', 't', '_', 'f', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'm', 'c', 'a', 's', 't', '_', 'f', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'u', 'c', 'a', 's', 't', '_', 'f', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'e', 'r', 'r', 'o', 'r', '_', 'f', 'r', 'a', 'm', 'e', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '6', '4', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '6', '5', '_', 't', 'o', '_', '1', '2', '7', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '1', '2', '8', '_', 't', 'o', '_', '2', '5', '5', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '2', '5', '6', '_', 't', 'o', '_', '5', '1', '1', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '5', '1', '2', '_', 't', 'o', '_', '1', '0', '2', '3', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '1', '0', '2', '4', '_', 't', 'o', '_', '1', '5', '1', '8', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', '1', '5', '1', '9', '_', 't', 'o', '_', 'm', 'a', 'x', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '0', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '1', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '2', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '3', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '0', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 't', 'r', 'u', 'n', 'c', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '1', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 't', 'r', 'u', 'n', 'c', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '2', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 't', 'r', 'u', 'n', 'c', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}, { 'b', 'g', '3', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 't', 'r', 'u', 'n', 'c', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\000'}}; static int get_sset_count(struct net_device *dev , int sset ) { { switch (sset) { case 1: ; return (122); default: ; return (-95); } } } static int get_regs_len(struct net_device *dev ) { struct adapter *adap ; struct adapter *tmp ; unsigned int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; tmp___0 = t4_get_regs_len(adap); return ((int )tmp___0); } } static int get_eeprom_len(struct net_device *dev ) { { return (17408); } } static void get_drvinfo(struct net_device *dev , struct ethtool_drvinfo *info ) { struct adapter *adapter ; struct adapter *tmp ; u32 exprom_vers ; char const *tmp___0 ; int tmp___1 ; { tmp = netdev2adap((struct net_device const *)dev); adapter = tmp; strlcpy((char *)(& info->driver), (char const *)(& cxgb4_driver_name), 32UL); strlcpy((char *)(& info->version), (char const *)(& cxgb4_driver_version), 32UL); tmp___0 = pci_name((struct pci_dev const *)adapter->pdev); strlcpy((char *)(& info->bus_info), tmp___0, 32UL); if (adapter->params.fw_vers != 0U) { snprintf((char *)(& info->fw_version), 32UL, "%u.%u.%u.%u, TP %u.%u.%u.%u", adapter->params.fw_vers >> 24, (adapter->params.fw_vers >> 16) & 255U, (adapter->params.fw_vers >> 8) & 255U, adapter->params.fw_vers & 255U, adapter->params.tp_vers >> 24, (adapter->params.tp_vers >> 16) & 255U, (adapter->params.tp_vers >> 8) & 255U, adapter->params.tp_vers & 255U); } else { } tmp___1 = t4_get_exprom_version(adapter, & exprom_vers); if (tmp___1 == 0) { snprintf((char *)(& info->erom_version), 32UL, "%u.%u.%u.%u", exprom_vers >> 24, (exprom_vers >> 16) & 255U, (exprom_vers >> 8) & 255U, exprom_vers & 255U); } else { } return; } } static void get_strings(struct net_device *dev , u32 stringset , u8 *data ) { { if (stringset == 1U) { memcpy((void *)data, (void const *)(& stats_strings), 2080UL); data = data + 2080UL; memcpy((void *)data, (void const *)(& adapter_stats_strings), 640UL); data = data + 640UL; memcpy((void *)data, (void const *)(& channel_stats_strings), 448UL); data = data + 448UL; memcpy((void *)data, (void const *)(& loopback_stats_strings), 736UL); } else { } return; } } static void collect_sge_port_stats(struct adapter const *adap , struct port_info const *p , struct queue_port_stats *s ) { int i ; struct sge_eth_txq const *tx ; struct sge_eth_rxq const *rx ; { tx = (struct sge_eth_txq const *)(& adap->sge.ethtxq) + (unsigned long )p->first_qset; rx = (struct sge_eth_rxq const *)(& adap->sge.ethrxq) + (unsigned long )p->first_qset; memset((void *)s, 0, 56UL); i = 0; goto ldv_49763; ldv_49762: s->tso = s->tso + (unsigned long long )tx->tso; s->tx_csum = s->tx_csum + (unsigned long long )tx->tx_cso; s->rx_csum = s->rx_csum + (unsigned long long )rx->stats.rx_cso; s->vlan_ex = s->vlan_ex + (unsigned long long )rx->stats.vlan_ex; s->vlan_ins = s->vlan_ins + (unsigned long long )tx->vlan_ins; s->gro_pkts = s->gro_pkts + (unsigned long long )rx->stats.lro_pkts; s->gro_merged = s->gro_merged + (unsigned long long )rx->stats.lro_merged; i = i + 1; rx = rx + 1; tx = tx + 1; ldv_49763: ; if ((int )p->nqsets > i) { goto ldv_49762; } else { } return; } } static void collect_adapter_stats(struct adapter *adap , struct adapter_stats *s ) { struct tp_tcp_stats v4 ; struct tp_tcp_stats v6 ; struct tp_rdma_stats rdma_stats ; struct tp_err_stats err_stats ; struct tp_usm_stats usm_stats ; u64 val1 ; u64 val2 ; int tmp ; int v ; u32 tmp___0 ; u32 tmp___1 ; u32 tmp___2 ; int tmp___3 ; { memset((void *)s, 0, 160UL); spin_lock(& adap->stats_lock); t4_tp_get_tcp_stats(adap, & v4, & v6); t4_tp_get_rdma_stats(adap, & rdma_stats); t4_get_usm_stats(adap, & usm_stats); t4_tp_get_err_stats(adap, & err_stats); spin_unlock(& adap->stats_lock); s->db_drop = (u64 )adap->db_stats.db_drop; s->db_full = (u64 )adap->db_stats.db_full; s->db_empty = (u64 )adap->db_stats.db_empty; s->tcp_v4_out_rsts = (u64 )v4.tcp_out_rsts; s->tcp_v4_in_segs = v4.tcp_in_segs; s->tcp_v4_out_segs = v4.tcp_out_segs; s->tcp_v4_retrans_segs = v4.tcp_retrans_segs; s->tcp_v6_out_rsts = (u64 )v6.tcp_out_rsts; s->tcp_v6_in_segs = v6.tcp_in_segs; s->tcp_v6_out_segs = v6.tcp_out_segs; s->tcp_v6_retrans_segs = v6.tcp_retrans_segs; tmp = is_offload((struct adapter const *)adap); if (tmp != 0) { s->frames = (u64 )usm_stats.frames; s->octets = usm_stats.octets; s->drops = (u64 )usm_stats.drops; s->rqe_dfr_mod = (u64 )rdma_stats.rqe_dfr_mod; s->rqe_dfr_pkt = (u64 )rdma_stats.rqe_dfr_pkt; } else { } s->ofld_no_neigh = (u64 )err_stats.ofld_no_neigh; s->ofld_cong_defer = (u64 )err_stats.ofld_cong_defer; tmp___3 = is_t4(adap->params.chip); if (tmp___3 == 0) { tmp___0 = t4_read_reg(adap, 4332U); v = (int )tmp___0; if (((unsigned int )(v >> 9) & 15U) == 7U) { tmp___1 = t4_read_reg(adap, 4328U); val2 = (u64 )tmp___1; tmp___2 = t4_read_reg(adap, 4324U); val1 = (u64 )tmp___2; s->wc_success = val1 - val2; s->wc_fail = val2; } else { } } else { } return; } } static void collect_channel_stats(struct adapter *adap , struct channel_stats *s , u8 i ) { struct tp_cpl_stats cpl_stats ; struct tp_err_stats err_stats ; struct tp_fcoe_stats fcoe_stats ; { memset((void *)s, 0, 104UL); spin_lock(& adap->stats_lock); t4_tp_get_cpl_stats(adap, & cpl_stats); t4_tp_get_err_stats(adap, & err_stats); t4_get_fcoe_stats(adap, (unsigned int )i, & fcoe_stats); spin_unlock(& adap->stats_lock); s->cpl_req = (u64 )cpl_stats.req[(int )i]; s->cpl_rsp = (u64 )cpl_stats.rsp[(int )i]; s->mac_in_errs = (u64 )err_stats.mac_in_errs[(int )i]; s->hdr_in_errs = (u64 )err_stats.hdr_in_errs[(int )i]; s->tcp_in_errs = (u64 )err_stats.tcp_in_errs[(int )i]; s->tcp6_in_errs = (u64 )err_stats.tcp6_in_errs[(int )i]; s->tnl_cong_drops = (u64 )err_stats.tnl_cong_drops[(int )i]; s->tnl_tx_drops = (u64 )err_stats.tnl_tx_drops[(int )i]; s->ofld_vlan_drops = (u64 )err_stats.ofld_vlan_drops[(int )i]; s->ofld_chan_drops = (u64 )err_stats.ofld_chan_drops[(int )i]; s->octets_ddp = fcoe_stats.octets_ddp; s->frames_ddp = (u64 )fcoe_stats.frames_ddp; s->frames_drop = (u64 )fcoe_stats.frames_drop; return; } } static void get_stats(struct net_device *dev , struct ethtool_stats *stats , u64 *data ) { struct port_info *pi ; void *tmp ; struct adapter *adapter ; struct lb_port_stats s ; int i ; u64 *p0 ; u64 *tmp___0 ; u64 *tmp___1 ; u64 *tmp___2 ; u64 *tmp___3 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adapter = pi->adapter; t4_get_port_stats_offset(adapter, (int )pi->tx_chan, (struct port_stats *)data, & pi->stats_base); data = data + 58UL; collect_sge_port_stats((struct adapter const *)adapter, (struct port_info const *)pi, (struct queue_port_stats *)data); data = data + 7UL; collect_adapter_stats(adapter, (struct adapter_stats *)data); data = data + 20UL; tmp___0 = data; data = data + 1; *tmp___0 = (unsigned long long )pi->port_id; collect_channel_stats(adapter, (struct channel_stats *)data, (int )pi->port_id); data = data + 13UL; tmp___1 = data; data = data + 1; *tmp___1 = (unsigned long long )pi->port_id; memset((void *)(& s), 0, 176UL); t4_get_lb_stats(adapter, (int )pi->port_id, & s); p0 = & s.octets; i = 0; goto ldv_49798; ldv_49797: tmp___2 = data; data = data + 1; tmp___3 = p0; p0 = p0 + 1; *tmp___2 = *tmp___3; i = i + 1; ldv_49798: ; if ((unsigned int )i <= 21U) { goto ldv_49797; } else { } return; } } static void get_regs(struct net_device *dev , struct ethtool_regs *regs , void *buf ) { struct adapter *adap ; struct adapter *tmp ; size_t buf_size ; unsigned int tmp___0 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; tmp___0 = t4_get_regs_len(adap); buf_size = (size_t )tmp___0; regs->version = mk_adap_vers(adap); t4_get_regs(adap, buf, buf_size); return; } } static int restart_autoneg(struct net_device *dev ) { struct port_info *p ; void *tmp ; bool tmp___0 ; int tmp___1 ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info *)tmp; tmp___0 = netif_running((struct net_device const *)dev); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { return (-11); } else { } if ((unsigned int )p->link_cfg.autoneg != 1U) { return (-22); } else { } t4_restart_aneg(p->adapter, (p->adapter)->pf, (unsigned int )p->tx_chan); return (0); } } static int identify_port(struct net_device *dev , enum ethtool_phys_id_state state ) { unsigned int val ; struct adapter *adap ; struct adapter *tmp ; struct port_info *tmp___0 ; int tmp___1 ; { tmp = netdev2adap((struct net_device const *)dev); adap = tmp; if ((unsigned int )state == 1U) { val = 65535U; } else if ((unsigned int )state == 0U) { val = 0U; } else { return (-22); } tmp___0 = netdev2pinfo((struct net_device const *)dev); tmp___1 = t4_identify_port(adap, adap->pf, (unsigned int )tmp___0->viid, val); return (tmp___1); } } static unsigned int from_fw_linkcaps(enum fw_port_type type , unsigned int caps ) { unsigned int v ; { v = 0U; if (((unsigned int )type == 2U || (unsigned int )type == 3U) || (unsigned int )type == 4U) { v = v | 128U; if ((int )caps & 1) { v = v | 8U; } else { } if ((caps & 2U) != 0U) { v = v | 32U; } else { } if ((caps & 8U) != 0U) { v = v | 4096U; } else { } } else if ((unsigned int )type == 5U || (unsigned int )type == 7U) { v = v | 65536U; if ((caps & 2U) != 0U) { v = v | 131072U; } else { } if ((caps & 8U) != 0U) { v = v | 262144U; } else { } } else if ((unsigned int )type == 8U) { v = v | 589824U; } else if ((unsigned int )type == 10U) { v = v | 1769472U; } else if ((unsigned int )type == 11U) { v = v | 2031616U; } else if (((((unsigned int )type == 0U || (unsigned int )type == 1U) || (unsigned int )type == 9U) || (unsigned int )type == 12U) || (unsigned int )type == 13U) { v = v | 1024U; if ((caps & 2U) != 0U) { v = v | 32U; } else { } if ((caps & 8U) != 0U) { v = v | 4096U; } else { } } else if ((unsigned int )type == 15U || (unsigned int )type == 14U) { v = v | 33554432U; v = v | 1024U; } else { } if ((caps & 256U) != 0U) { v = v | 64U; } else { } return (v); } } static unsigned int to_fw_linkcaps(unsigned int caps ) { unsigned int v ; { v = 0U; if ((caps & 8U) != 0U) { v = v | 1U; } else { } if ((caps & 32U) != 0U) { v = v | 2U; } else { } if ((caps & 4096U) != 0U) { v = v | 8U; } else { } if ((caps & 33554432U) != 0U) { v = v | 16U; } else { } return (v); } } static int get_settings(struct net_device *dev , struct ethtool_cmd *cmd ) { struct port_info const *p ; void *tmp ; bool tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info const *)tmp; if (((unsigned int )p->port_type == 2U || (unsigned int )p->port_type == 3U) || (unsigned int )p->port_type == 4U) { cmd->port = 0U; } else if ((unsigned int )p->port_type == 0U || (unsigned int )p->port_type == 1U) { cmd->port = 3U; } else if ((((unsigned int )p->port_type == 9U || (unsigned int )p->port_type == 12U) || (unsigned int )p->port_type == 13U) || (unsigned int )p->port_type == 14U) { if ((((unsigned int )((unsigned char )p->mod_type) == 1U || (unsigned int )((unsigned char )p->mod_type) == 2U) || (unsigned int )((unsigned char )p->mod_type) == 3U) || (unsigned int )((unsigned char )p->mod_type) == 6U) { cmd->port = 3U; } else if ((unsigned int )((unsigned char )p->mod_type) == 4U || (unsigned int )((unsigned char )p->mod_type) == 5U) { cmd->port = 5U; } else { cmd->port = 255U; } } else { cmd->port = 255U; } if ((int )((signed char )p->mdio_addr) >= 0) { cmd->phy_address = (__u8 )p->mdio_addr; cmd->transceiver = 1U; cmd->mdio_support = (unsigned int )p->port_type == 2U ? 1U : 2U; } else { cmd->phy_address = 0U; cmd->transceiver = 0U; cmd->mdio_support = 0U; } cmd->supported = from_fw_linkcaps(p->port_type, (unsigned int )p->link_cfg.supported); cmd->advertising = from_fw_linkcaps(p->port_type, (unsigned int )p->link_cfg.advertising); tmp___0 = netif_carrier_ok((struct net_device const *)dev); ethtool_cmd_speed_set(cmd, (int )tmp___0 ? (__u32 )p->link_cfg.speed : 0U); cmd->duplex = 1U; cmd->autoneg = p->link_cfg.autoneg; cmd->maxtxpkt = 0U; cmd->maxrxpkt = 0U; return (0); } } static unsigned int speed_to_caps(int speed ) { { if (speed == 100) { return (1U); } else { } if (speed == 1000) { return (2U); } else { } if (speed == 10000) { return (8U); } else { } if (speed == 40000) { return (16U); } else { } return (0U); } } static int set_settings(struct net_device *dev , struct ethtool_cmd *cmd ) { unsigned int cap ; struct port_info *p ; void *tmp ; struct link_config *lc ; u32 speed ; __u32 tmp___0 ; unsigned int tmp___1 ; int tmp___2 ; bool tmp___3 ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info *)tmp; lc = & p->link_cfg; tmp___0 = ethtool_cmd_speed((struct ethtool_cmd const *)cmd); speed = tmp___0; if ((unsigned int )cmd->duplex != 1U) { return (-22); } else { } if (((int )lc->supported & 256) == 0) { if ((unsigned int )cmd->autoneg == 0U) { tmp___1 = speed_to_caps((int )speed); if (((unsigned int )lc->supported & tmp___1) != 0U) { return (0); } else { } } else { } return (-22); } else { } if ((unsigned int )cmd->autoneg == 0U) { cap = speed_to_caps((int )speed); if (((((unsigned int )lc->supported & cap) == 0U || speed == 1000U) || speed == 10000U) || speed == 40000U) { return (-22); } else { } lc->requested_speed = (unsigned short )cap; lc->advertising = 0U; } else { cap = to_fw_linkcaps(cmd->advertising); if (((unsigned int )lc->supported & cap) == 0U) { return (-22); } else { } lc->requested_speed = 0U; lc->advertising = (unsigned int )((unsigned short )cap) | 256U; } lc->autoneg = cmd->autoneg; tmp___3 = netif_running((struct net_device const *)dev); if ((int )tmp___3) { tmp___2 = t4_link_l1cfg(p->adapter, (p->adapter)->pf, (unsigned int )p->tx_chan, lc); return (tmp___2); } else { } return (0); } } static void get_pauseparam(struct net_device *dev , struct ethtool_pauseparam *epause ) { struct port_info *p ; void *tmp ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info *)tmp; epause->autoneg = ((int )p->link_cfg.requested_fc & 4) != 0; epause->rx_pause = (__u32 )p->link_cfg.fc & 1U; epause->tx_pause = ((int )p->link_cfg.fc & 2) != 0; return; } } static int set_pauseparam(struct net_device *dev , struct ethtool_pauseparam *epause ) { struct port_info *p ; void *tmp ; struct link_config *lc ; int tmp___0 ; bool tmp___1 ; { tmp = netdev_priv((struct net_device const *)dev); p = (struct port_info *)tmp; lc = & p->link_cfg; if (epause->autoneg == 0U) { lc->requested_fc = 0U; } else if (((int )lc->supported & 256) != 0) { lc->requested_fc = 4U; } else { return (-22); } if (epause->rx_pause != 0U) { lc->requested_fc = (unsigned int )lc->requested_fc | 1U; } else { } if (epause->tx_pause != 0U) { lc->requested_fc = (unsigned int )lc->requested_fc | 2U; } else { } tmp___1 = netif_running((struct net_device const *)dev); if ((int )tmp___1) { tmp___0 = t4_link_l1cfg(p->adapter, (p->adapter)->pf, (unsigned int )p->tx_chan, lc); return (tmp___0); } else { } return (0); } } static void get_sge_param(struct net_device *dev , struct ethtool_ringparam *e ) { struct port_info const *pi ; void *tmp ; struct sge const *s ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; s = (struct sge const *)(& (pi->adapter)->sge); e->rx_max_pending = 16384U; e->rx_mini_max_pending = 16384U; e->rx_jumbo_max_pending = 0U; e->tx_max_pending = 16384U; e->rx_pending = (unsigned int )s->ethrxq[(int )pi->first_qset].fl.size - 8U; e->rx_mini_pending = s->ethrxq[(int )pi->first_qset].rspq.size; e->rx_jumbo_pending = 0U; e->tx_pending = s->ethtxq[(int )pi->first_qset].q.size; return; } } static int set_sge_param(struct net_device *dev , struct ethtool_ringparam *e ) { int i ; struct port_info const *pi ; void *tmp ; struct adapter *adapter ; struct sge *s ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; adapter = pi->adapter; s = & adapter->sge; if ((((((e->rx_pending > 16384U || e->rx_jumbo_pending != 0U) || e->tx_pending > 16384U) || e->rx_mini_pending > 16384U) || e->rx_mini_pending <= 127U) || e->rx_pending <= 15U) || e->tx_pending <= 31U) { return (-22); } else { } if ((int )adapter->flags & 1) { return (-16); } else { } i = 0; goto ldv_49868; ldv_49867: s->ethtxq[(int )pi->first_qset + i].q.size = e->tx_pending; s->ethrxq[(int )pi->first_qset + i].fl.size = e->rx_pending + 8U; s->ethrxq[(int )pi->first_qset + i].rspq.size = e->rx_mini_pending; i = i + 1; ldv_49868: ; if ((int )pi->nqsets > i) { goto ldv_49867; } else { } return (0); } } static int set_rx_intr_params(struct net_device *dev , unsigned int us , unsigned int cnt ) { int i ; int err ; struct port_info *pi ; void *tmp ; struct adapter *adap ; struct sge_eth_rxq *q ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adap = pi->adapter; q = (struct sge_eth_rxq *)(& adap->sge.ethrxq) + (unsigned long )pi->first_qset; i = 0; goto ldv_49881; ldv_49880: err = cxgb4_set_rspq_intr_params(& q->rspq, us, cnt); if (err != 0) { return (err); } else { } i = i + 1; q = q + 1; ldv_49881: ; if ((int )pi->nqsets > i) { goto ldv_49880; } else { } return (0); } } static int set_adaptive_rx_setting(struct net_device *dev , int adaptive_rx ) { int i ; struct port_info *pi ; void *tmp ; struct adapter *adap ; struct sge_eth_rxq *q ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adap = pi->adapter; q = (struct sge_eth_rxq *)(& adap->sge.ethrxq) + (unsigned long )pi->first_qset; i = 0; goto ldv_49892; ldv_49891: q->rspq.adaptive_rx = (u8 )adaptive_rx; i = i + 1; q = q + 1; ldv_49892: ; if ((int )pi->nqsets > i) { goto ldv_49891; } else { } return (0); } } static int get_adaptive_rx_setting(struct net_device *dev ) { struct port_info *pi ; void *tmp ; struct adapter *adap ; struct sge_eth_rxq *q ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; adap = pi->adapter; q = (struct sge_eth_rxq *)(& adap->sge.ethrxq) + (unsigned long )pi->first_qset; return ((int )q->rspq.adaptive_rx); } } static int set_coalesce(struct net_device *dev , struct ethtool_coalesce *c ) { int tmp ; { set_adaptive_rx_setting(dev, (int )c->use_adaptive_rx_coalesce); tmp = set_rx_intr_params(dev, c->rx_coalesce_usecs, c->rx_max_coalesced_frames); return (tmp); } } static int get_coalesce(struct net_device *dev , struct ethtool_coalesce *c ) { struct port_info const *pi ; void *tmp ; struct adapter const *adap ; struct sge_rspq const *rq ; int tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; adap = (struct adapter const *)pi->adapter; rq = & adap->sge.ethrxq[(int )pi->first_qset].rspq; c->rx_coalesce_usecs = qtimer_val(adap, rq); c->rx_max_coalesced_frames = (int )rq->intr_params & 1 ? (__u32 )adap->sge.counter_val[(int )rq->pktcnt_idx] : 0U; tmp___0 = get_adaptive_rx_setting(dev); c->use_adaptive_rx_coalesce = (__u32 )tmp___0; return (0); } } static int eeprom_ptov(unsigned int phys_addr , unsigned int fn , unsigned int sz ) { { fn = fn * sz; if (phys_addr <= 1023U) { return ((int )(phys_addr + 31744U)); } else { } if (fn + 1024U > phys_addr) { return ((int )((phys_addr - fn) + 30720U)); } else { } if (phys_addr <= 17407U) { return ((int )((phys_addr - fn) - 1024U)); } else { } return (-22); } } static int eeprom_rd_phys(struct adapter *adap , unsigned int phys_addr , u32 *v ) { int vaddr ; int tmp ; ssize_t tmp___0 ; { tmp = eeprom_ptov(phys_addr, adap->pf, 1024U); vaddr = tmp; if (vaddr >= 0) { tmp___0 = pci_read_vpd(adap->pdev, (loff_t )vaddr, 4UL, (void *)v); vaddr = (int )tmp___0; } else { } return (0 < vaddr ? 0 : vaddr); } } static int eeprom_wr_phys(struct adapter *adap , unsigned int phys_addr , u32 v ) { int vaddr ; int tmp ; ssize_t tmp___0 ; { tmp = eeprom_ptov(phys_addr, adap->pf, 1024U); vaddr = tmp; if (vaddr >= 0) { tmp___0 = pci_write_vpd(adap->pdev, (loff_t )vaddr, 4UL, (void const *)(& v)); vaddr = (int )tmp___0; } else { } return (0 < vaddr ? 0 : vaddr); } } static int get_eeprom(struct net_device *dev , struct ethtool_eeprom *e , u8 *data ) { int i ; int err ; struct adapter *adapter ; struct adapter *tmp ; u8 *buf ; void *tmp___0 ; { err = 0; tmp = netdev2adap((struct net_device const *)dev); adapter = tmp; tmp___0 = kmalloc(17408UL, 208U); buf = (u8 *)tmp___0; if ((unsigned long )buf == (unsigned long )((u8 *)0U)) { return (-12); } else { } e->magic = 954396940U; i = (int )e->offset & -4; goto ldv_49938; ldv_49937: err = eeprom_rd_phys(adapter, (unsigned int )i, (u32 *)buf + (unsigned long )i); i = i + 4; ldv_49938: ; if (err == 0 && (__u32 )i < e->offset + e->len) { goto ldv_49937; } else { } if (err == 0) { memcpy((void *)data, (void const *)buf + (unsigned long )e->offset, (size_t )e->len); } else { } kfree((void const *)buf); return (err); } } static int set_eeprom(struct net_device *dev , struct ethtool_eeprom *eeprom , u8 *data ) { u8 *buf ; int err ; u32 aligned_offset ; u32 aligned_len ; u32 *p ; struct adapter *adapter ; struct adapter *tmp ; u32 start ; void *tmp___0 ; { err = 0; tmp = netdev2adap((struct net_device const *)dev); adapter = tmp; if (eeprom->magic != 954396940U) { return (-22); } else { } aligned_offset = eeprom->offset & 4294967292U; aligned_len = ((eeprom->len + (eeprom->offset & 3U)) + 3U) & 4294967292U; if (adapter->pf != 0U) { start = (adapter->pf + 1U) * 1024U; if (aligned_offset < start || aligned_offset + aligned_len > start + 1024U) { return (-1); } else { } } else { } if (eeprom->offset != aligned_offset || eeprom->len != aligned_len) { tmp___0 = kmalloc((size_t )aligned_len, 208U); buf = (u8 *)tmp___0; if ((unsigned long )buf == (unsigned long )((u8 *)0U)) { return (-12); } else { } err = eeprom_rd_phys(adapter, aligned_offset, (u32 *)buf); if (err == 0 && aligned_len > 4U) { err = eeprom_rd_phys(adapter, (aligned_offset + aligned_len) - 4U, (u32 *)buf + (unsigned long )(aligned_len - 4U)); } else { } if (err != 0) { goto out; } else { } memcpy((void *)(buf + ((unsigned long )eeprom->offset & 3UL)), (void const *)data, (size_t )eeprom->len); } else { buf = data; } err = t4_seeprom_wp(adapter, 0); if (err != 0) { goto out; } else { } p = (u32 *)buf; goto ldv_49954; ldv_49953: err = eeprom_wr_phys(adapter, aligned_offset, *p); aligned_offset = aligned_offset + 4U; aligned_len = aligned_len - 4U; p = p + 1; ldv_49954: ; if (err == 0 && aligned_len != 0U) { goto ldv_49953; } else { } if (err == 0) { err = t4_seeprom_wp(adapter, 1); } else { } out: ; if ((unsigned long )buf != (unsigned long )data) { kfree((void const *)buf); } else { } return (err); } } static int set_flash(struct net_device *netdev , struct ethtool_flash *ef ) { int ret ; struct firmware const *fw ; struct adapter *adap ; struct adapter *tmp ; unsigned int mbox ; { tmp = netdev2adap((struct net_device const *)netdev); adap = tmp; mbox = 8U; ef->data[127UL] = 0; ret = request_firmware(& fw, (char const *)(& ef->data), adap->pdev_dev); if (ret < 0) { return (ret); } else { } if ((int )adap->flags & 1) { mbox = adap->mbox; } else { } ret = t4_fw_upgrade(adap, mbox, fw->data, (unsigned int )fw->size, 1); release_firmware(fw); if (ret == 0) { _dev_info((struct device const *)adap->pdev_dev, "loaded firmware %s, reload cxgb4 driver\n", (char *)(& ef->data)); } else { } return (ret); } } static u32 get_rss_table_size(struct net_device *dev ) { struct port_info const *pi ; void *tmp ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; return ((u32 )pi->rss_size); } } static int get_rss_table(struct net_device *dev , u32 *p , u8 *key , u8 *hfunc ) { struct port_info const *pi ; void *tmp ; unsigned int n ; unsigned int tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; n = (unsigned int )pi->rss_size; if ((unsigned long )hfunc != (unsigned long )((u8 *)0U)) { *hfunc = 1U; } else { } if ((unsigned long )p == (unsigned long )((u32 *)0U)) { return (0); } else { } goto ldv_49977; ldv_49976: *(p + (unsigned long )n) = (u32 )*(pi->rss + (unsigned long )n); ldv_49977: tmp___0 = n; n = n - 1U; if (tmp___0 != 0U) { goto ldv_49976; } else { } return (0); } } static int set_rss_table(struct net_device *dev , u32 const *p , u8 const *key , u8 const hfunc ) { unsigned int i ; struct port_info *pi ; void *tmp ; int tmp___0 ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp; if ((unsigned long )key != (unsigned long )((u8 const *)0U) || ((unsigned int )((unsigned char )hfunc) != 0U && (unsigned int )((unsigned char )hfunc) != 1U)) { return (-95); } else { } if ((unsigned long )p == (unsigned long )((u32 const *)0U)) { return (0); } else { } i = 0U; goto ldv_49988; ldv_49987: *(pi->rss + (unsigned long )i) = (u16 )*(p + (unsigned long )i); i = i + 1U; ldv_49988: ; if ((unsigned int )pi->rss_size > i) { goto ldv_49987; } else { } if ((int )(pi->adapter)->flags & 1) { tmp___0 = cxgb4_write_rss((struct port_info const *)pi, (u16 const *)pi->rss); return (tmp___0); } else { } return (0); } } static int get_rxnfc(struct net_device *dev , struct ethtool_rxnfc *info , u32 *rules ) { struct port_info const *pi ; void *tmp ; unsigned int v ; { tmp = netdev_priv((struct net_device const *)dev); pi = (struct port_info const *)tmp; switch (info->cmd) { case 41U: v = (unsigned int )pi->rss_mode; info->data = 0ULL; switch (info->flow_type) { case 1U: ; if ((v & 4U) != 0U) { info->data = 240ULL; } else if ((v & 2U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; case 2U: ; if ((v & 4U) != 0U && (int )v & 1) { info->data = 240ULL; } else if ((v & 2U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; case 3U: ; case 4U: ; case 16U: ; if ((v & 2U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; case 5U: ; if ((v & 16U) != 0U) { info->data = 240ULL; } else if ((v & 8U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; case 6U: ; if ((v & 16U) != 0U && (int )v & 1) { info->data = 240ULL; } else if ((v & 8U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; case 7U: ; case 8U: ; case 17U: ; if ((v & 8U) != 0U) { info->data = 48ULL; } else { } goto ldv_49999; } ldv_49999: ; return (0); case 45U: info->data = (__u64 )pi->nqsets; return (0); } return (-95); } } static struct ethtool_ops const cxgb_ethtool_ops = {& get_settings, & set_settings, & get_drvinfo, & get_regs_len, & get_regs, 0, 0, & get_msglevel, & set_msglevel, & restart_autoneg, & ethtool_op_get_link, & get_eeprom_len, & get_eeprom, & set_eeprom, & get_coalesce, & set_coalesce, & get_sge_param, & set_sge_param, & get_pauseparam, & set_pauseparam, 0, & get_strings, & identify_port, & get_stats, 0, 0, 0, 0, & get_sset_count, & get_rxnfc, 0, & set_flash, 0, 0, & get_rss_table_size, & get_rss_table, & set_rss_table, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void cxgb4_set_ethtool_ops(struct net_device *netdev ) { { netdev->ethtool_ops = & cxgb_ethtool_ops; return; } } void ldv_initialize_ethtool_ops_43(void) { void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; { tmp = ldv_init_zalloc(92UL); cxgb_ethtool_ops_group4 = (struct ethtool_coalesce *)tmp; tmp___0 = ldv_init_zalloc(36UL); cxgb_ethtool_ops_group0 = (struct ethtool_ringparam *)tmp___0; tmp___1 = ldv_init_zalloc(3008UL); cxgb_ethtool_ops_group5 = (struct net_device *)tmp___1; tmp___2 = ldv_init_zalloc(16UL); cxgb_ethtool_ops_group2 = (struct ethtool_eeprom *)tmp___2; tmp___3 = ldv_init_zalloc(44UL); cxgb_ethtool_ops_group1 = (struct ethtool_cmd *)tmp___3; tmp___4 = ldv_init_zalloc(16UL); cxgb_ethtool_ops_group3 = (struct ethtool_pauseparam *)tmp___4; return; } } void ldv_main_exported_43(void) { u8 *ldvarg206 ; void *tmp ; struct ethtool_stats *ldvarg222 ; void *tmp___0 ; u8 *ldvarg205 ; void *tmp___1 ; int ldvarg211 ; struct ethtool_regs *ldvarg220 ; void *tmp___2 ; u64 *ldvarg221 ; void *tmp___3 ; u32 *ldvarg214 ; void *tmp___4 ; u8 *ldvarg217 ; void *tmp___5 ; u8 *ldvarg208 ; void *tmp___6 ; struct ethtool_flash *ldvarg210 ; void *tmp___7 ; u8 ldvarg216 ; u32 *ldvarg223 ; void *tmp___8 ; struct ethtool_rxnfc *ldvarg224 ; void *tmp___9 ; u32 *ldvarg218 ; void *tmp___10 ; u32 ldvarg209 ; enum ethtool_phys_id_state ldvarg215 ; void *ldvarg219 ; void *tmp___11 ; u8 *ldvarg212 ; void *tmp___12 ; u32 ldvarg207 ; struct ethtool_drvinfo *ldvarg225 ; void *tmp___13 ; u8 *ldvarg213 ; void *tmp___14 ; int tmp___15 ; { tmp = ldv_init_zalloc(1UL); ldvarg206 = (u8 *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg222 = (struct ethtool_stats *)tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg205 = (u8 *)tmp___1; tmp___2 = ldv_init_zalloc(12UL); ldvarg220 = (struct ethtool_regs *)tmp___2; tmp___3 = ldv_init_zalloc(8UL); ldvarg221 = (u64 *)tmp___3; tmp___4 = ldv_init_zalloc(4UL); ldvarg214 = (u32 *)tmp___4; tmp___5 = ldv_init_zalloc(1UL); ldvarg217 = (u8 *)tmp___5; tmp___6 = ldv_init_zalloc(1UL); ldvarg208 = (u8 *)tmp___6; tmp___7 = ldv_init_zalloc(136UL); ldvarg210 = (struct ethtool_flash *)tmp___7; tmp___8 = ldv_init_zalloc(4UL); ldvarg223 = (u32 *)tmp___8; tmp___9 = ldv_init_zalloc(192UL); ldvarg224 = (struct ethtool_rxnfc *)tmp___9; tmp___10 = ldv_init_zalloc(4UL); ldvarg218 = (u32 *)tmp___10; tmp___11 = ldv_init_zalloc(1UL); ldvarg219 = tmp___11; tmp___12 = ldv_init_zalloc(1UL); ldvarg212 = (u8 *)tmp___12; tmp___13 = ldv_init_zalloc(196UL); ldvarg225 = (struct ethtool_drvinfo *)tmp___13; tmp___14 = ldv_init_zalloc(1UL); ldvarg213 = (u8 *)tmp___14; ldv_memset((void *)(& ldvarg211), 0, 4UL); ldv_memset((void *)(& ldvarg216), 0, 1UL); ldv_memset((void *)(& ldvarg209), 0, 4UL); ldv_memset((void *)(& ldvarg215), 0, 4UL); ldv_memset((void *)(& ldvarg207), 0, 4UL); tmp___15 = __VERIFIER_nondet_int(); switch (tmp___15) { case 0: ; if (ldv_state_variable_43 == 1) { get_drvinfo(cxgb_ethtool_ops_group5, ldvarg225); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 1: ; if (ldv_state_variable_43 == 1) { set_pauseparam(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group3); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 2: ; if (ldv_state_variable_43 == 1) { get_rxnfc(cxgb_ethtool_ops_group5, ldvarg224, ldvarg223); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 3: ; if (ldv_state_variable_43 == 1) { get_stats(cxgb_ethtool_ops_group5, ldvarg222, ldvarg221); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 4: ; if (ldv_state_variable_43 == 1) { get_coalesce(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group4); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 5: ; if (ldv_state_variable_43 == 1) { get_sge_param(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group0); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 6: ; if (ldv_state_variable_43 == 1) { get_regs(cxgb_ethtool_ops_group5, ldvarg220, ldvarg219); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 7: ; if (ldv_state_variable_43 == 1) { set_rss_table(cxgb_ethtool_ops_group5, (u32 const *)ldvarg218, (u8 const *)ldvarg217, (int )ldvarg216); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 8: ; if (ldv_state_variable_43 == 1) { identify_port(cxgb_ethtool_ops_group5, ldvarg215); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 9: ; if (ldv_state_variable_43 == 1) { get_pauseparam(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group3); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 10: ; if (ldv_state_variable_43 == 1) { get_rss_table(cxgb_ethtool_ops_group5, ldvarg214, ldvarg213, ldvarg212); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 11: ; if (ldv_state_variable_43 == 1) { get_sset_count(cxgb_ethtool_ops_group5, ldvarg211); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 12: ; if (ldv_state_variable_43 == 1) { get_settings(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group1); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 13: ; if (ldv_state_variable_43 == 1) { get_rss_table_size(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 14: ; if (ldv_state_variable_43 == 1) { set_coalesce(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group4); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 15: ; if (ldv_state_variable_43 == 1) { set_flash(cxgb_ethtool_ops_group5, ldvarg210); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 16: ; if (ldv_state_variable_43 == 1) { set_msglevel(cxgb_ethtool_ops_group5, ldvarg209); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 17: ; if (ldv_state_variable_43 == 1) { get_eeprom_len(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 18: ; if (ldv_state_variable_43 == 1) { set_settings(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group1); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 19: ; if (ldv_state_variable_43 == 1) { get_eeprom(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group2, ldvarg208); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 20: ; if (ldv_state_variable_43 == 1) { get_strings(cxgb_ethtool_ops_group5, ldvarg207, ldvarg206); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 21: ; if (ldv_state_variable_43 == 1) { restart_autoneg(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 22: ; if (ldv_state_variable_43 == 1) { set_eeprom(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group2, ldvarg205); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 23: ; if (ldv_state_variable_43 == 1) { get_msglevel(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 24: ; if (ldv_state_variable_43 == 1) { get_regs_len(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 25: ; if (ldv_state_variable_43 == 1) { set_sge_param(cxgb_ethtool_ops_group5, cxgb_ethtool_ops_group0); ldv_state_variable_43 = 1; } else { } goto ldv_50042; case 26: ; if (ldv_state_variable_43 == 1) { ethtool_op_get_link(cxgb_ethtool_ops_group5); ldv_state_variable_43 = 1; } else { } goto ldv_50042; default: ldv_stop(); } ldv_50042: ; return; } } bool ldv_queue_work_on_151(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_152(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_153(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_154(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_155(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static int ffs(int x ) { int r ; { __asm__ ("bsfl %1,%0": "=r" (r): "rm" (x), "0" (-1)); return (r + 1); } } extern void __dynamic_netdev_dbg(struct _ddebug * , struct net_device const * , char const * , ...) ; bool ldv_queue_work_on_165(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_167(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_166(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_169(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_168(struct workqueue_struct *ldv_func_arg1 ) ; extern int dcb_setapp(struct net_device * , struct dcb_app * ) ; extern int dcb_ieee_setapp(struct net_device * , struct dcb_app * ) ; extern int dcb_ieee_delapp(struct net_device * , struct dcb_app * ) ; extern u8 dcb_ieee_getapp_mask(struct net_device * , struct dcb_app * ) ; extern void linkwatch_fire_event(struct net_device * ) ; void cxgb4_dcb_version_init(struct net_device *dev ) ; __inline static __u8 bitswap_1(unsigned char val ) { { return ((__u8 )((((((((int )((signed char )((int )val >> 7)) | (int )((signed char )(((int )val & 64) >> 5))) | (int )((signed char )(((int )val & 32) >> 3))) | (int )((signed char )(((int )val & 16) >> 1))) | (int )((signed char )(((int )val & 8) << 1))) | (int )((signed char )(((int )val & 4) << 3))) | (int )((signed char )(((int )val & 2) << 5))) | (int )((signed char )((int )val << 7)))); } } static char const * const dcb_ver_array[8U] = { "Unknown", "DCBx-CIN", "DCBx-CEE 1.01", "DCBx-IEEE", "", "", "", "Auto Negotiated"}; void cxgb4_dcb_state_init(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; int version_temp ; struct _ddebug descriptor ; long tmp___0 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; version_temp = (int )dcb->dcb_version; memset((void *)dcb, 0, 80UL); dcb->state = 0; if (version_temp != 0) { dcb->dcb_version = (u8 )version_temp; } else { } descriptor.modname = "cxgb4"; descriptor.function = "cxgb4_dcb_state_init"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c"; descriptor.format = "%s: Initializing DCB state for port[%d]\n"; descriptor.lineno = 49U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_netdev_dbg(& descriptor, (struct net_device const *)dev, "%s: Initializing DCB state for port[%d]\n", "cxgb4_dcb_state_init", (int )pi->port_id); } else { } return; } } void cxgb4_dcb_version_init(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; dcb->dcb_version = 7U; return; } } static void cxgb4_dcb_cleanup_apps(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; struct port_dcb_info *dcb ; struct dcb_app app ; int i ; int err ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; dcb = & pi->dcb; app.priority = 0U; i = 0; goto ldv_49595; ldv_49594: ; if ((unsigned int )dcb->app_priority[i].protocolid == 0U) { goto ldv_49593; } else { } app.protocol = dcb->app_priority[i].protocolid; if ((unsigned int )dcb->dcb_version == 3U) { app.priority = dcb->app_priority[i].user_prio_map; app.selector = (unsigned int )dcb->app_priority[i].sel_field + 1U; err = dcb_ieee_delapp(dev, & app); } else { app.selector = (unsigned int )dcb->app_priority[i].sel_field != 0U; err = dcb_setapp(dev, & app); } if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "Failed DCB Clear %s Application Priority: sel=%d, prot=%d, , err=%d\n", dcb_ver_array[(int )dcb->dcb_version], (int )app.selector, (int )app.protocol, - err); goto ldv_49593; } else { } i = i + 1; ldv_49595: ; if (i <= 7) { goto ldv_49594; } else { } ldv_49593: ; return; } } void cxgb4_dcb_state_fsm(struct net_device *dev , enum cxgb4_dcb_state_input transition_to ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; struct adapter *adap ; enum cxgb4_dcb_state current_state ; struct _ddebug descriptor ; long tmp___0 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; adap = pi->adapter; current_state = dcb->state; descriptor.modname = "cxgb4"; descriptor.function = "cxgb4_dcb_state_fsm"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c"; descriptor.format = "%s: State change from %d to %d for %s\n"; descriptor.lineno = 111U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_netdev_dbg(& descriptor, (struct net_device const *)dev, "%s: State change from %d to %d for %s\n", "cxgb4_dcb_state_fsm", (unsigned int )dcb->state, (unsigned int )transition_to, (char *)(& dev->name)); } else { } switch ((unsigned int )current_state) { case 0U: ; switch ((unsigned int )transition_to) { case 0U: dcb->state = 1; dcb->supported = 13U; goto ldv_49608; case 1U: dcb->state = 2; dcb->supported = 2U; if ((unsigned int )dcb->dcb_version == 3U) { dcb->supported = dcb->supported | 8U; } else { dcb->supported = dcb->supported | 4U; } goto ldv_49608; case 2U: ; goto ldv_49608; case 3U: dcb->state = 3; goto ldv_49608; default: ; goto bad_state_input; } ldv_49608: ; goto ldv_49614; case 2U: ; switch ((unsigned int )transition_to) { case 1U: ; goto ldv_49617; case 2U: ; goto ldv_49617; case 3U: dcb->state = 3; dcb->enabled = 1; linkwatch_fire_event(dev); goto ldv_49617; default: ; goto bad_state_input; } ldv_49617: ; goto ldv_49614; case 3U: ; switch ((unsigned int )transition_to) { case 1U: ; goto ldv_49623; case 2U: cxgb4_dcb_cleanup_apps(dev); cxgb4_dcb_state_init(dev); dcb->state = 2; dcb->supported = 14U; linkwatch_fire_event(dev); goto ldv_49623; case 3U: dcb->enabled = 1; linkwatch_fire_event(dev); goto ldv_49623; default: ; goto bad_state_input; } ldv_49623: ; goto ldv_49614; case 1U: ; switch ((unsigned int )transition_to) { case 0U: ; goto ldv_49629; default: ; goto bad_state_input; } ldv_49629: ; goto ldv_49614; default: ; goto bad_state_transition; } ldv_49614: ; return; bad_state_input: dev_err((struct device const *)adap->pdev_dev, "cxgb4_dcb_state_fsm: illegal input symbol %d\n", (unsigned int )transition_to); return; bad_state_transition: dev_err((struct device const *)adap->pdev_dev, "cxgb4_dcb_state_fsm: bad state transition, state = %d, input = %d\n", (unsigned int )current_state, (unsigned int )transition_to); return; } } void cxgb4_dcb_handle_fw_update(struct adapter *adap , struct fw_port_cmd const *pcmd ) { union fw_port_dcb const *fwdcb ; int port ; __u32 tmp ; struct net_device *dev ; struct port_info *pi ; void *tmp___0 ; struct port_dcb_info *dcb ; int dcb_type ; int dcb_running_version ; enum cxgb4_dcb_state_input input ; __u16 tmp___1 ; __u32 tmp___2 ; struct fw_port_app_priority const *fwap ; int idx ; struct app_priority *ap ; struct dcb_app app ; __u16 tmp___3 ; int err ; int tmp___4 ; __u16 tmp___5 ; { fwdcb = & pcmd->u.dcb; tmp = __fswab32(pcmd->op_to_portid); port = (int )tmp & 15; dev = adap->port[port]; tmp___0 = netdev_priv((struct net_device const *)dev); pi = (struct port_info *)tmp___0; dcb = & pi->dcb; dcb_type = (int )pcmd->u.dcb.pgid.type; if (dcb_type == 5) { input = (int )((signed char )pcmd->u.dcb.control.all_syncd_pkd) < 0 ? 3 : 2; if ((unsigned int )dcb->dcb_version != 0U) { tmp___1 = __fswab16((int )pcmd->u.dcb.control.dcb_version_to_app_state); dcb_running_version = ((int )tmp___1 >> 12) & 7; if (dcb_running_version == 2 || dcb_running_version == 3) { dcb->dcb_version = (u8 )dcb_running_version; dev_warn((struct device const *)adap->pdev_dev, "Interface %s is running %s\n", (char *)(& dev->name), dcb_ver_array[(int )dcb->dcb_version]); } else { dev_warn((struct device const *)adap->pdev_dev, "Something screwed up, requested firmware for %s, but firmware returned %s instead\n", dcb_ver_array[(int )dcb->dcb_version], dcb_ver_array[dcb_running_version]); dcb->dcb_version = 0U; } } else { } cxgb4_dcb_state_fsm(dev, input); return; } else { } if ((unsigned int )dcb->state == 0U || (unsigned int )dcb->state == 1U) { dev_err((struct device const *)adap->pdev_dev, "Receiving Firmware DCB messages in State %d\n", (unsigned int )dcb->state); return; } else { } switch (dcb_type) { case 0: tmp___2 = __fswab32(fwdcb->pgid.pgid); dcb->pgid = tmp___2; dcb->msgs = (enum cxgb4_dcb_fw_msgs )((unsigned int )dcb->msgs | 1U); goto ldv_49646; case 1: dcb->pg_num_tcs_supported = fwdcb->pgrate.num_tcs_supported; memcpy((void *)(& dcb->pgrate), (void const *)(& fwdcb->pgrate.pgrate), 8UL); memcpy((void *)(& dcb->tsa), (void const *)(& fwdcb->pgrate.tsa), 8UL); dcb->msgs = (enum cxgb4_dcb_fw_msgs )((unsigned int )dcb->msgs | 2U); if ((int )dcb->msgs & 1) { if ((unsigned int )dcb->dcb_version == 3U) { cxgb4_dcb_state_fsm(dev, 3); } else { } } else { } goto ldv_49646; case 2: memcpy((void *)(& dcb->priorate), (void const *)(& fwdcb->priorate.strict_priorate), 8UL); dcb->msgs = (enum cxgb4_dcb_fw_msgs )((unsigned int )dcb->msgs | 4U); goto ldv_49646; case 3: dcb->pfcen = fwdcb->pfc.pfcen; dcb->pfc_num_tcs_supported = fwdcb->pfc.max_pfc_tcs; dcb->msgs = (enum cxgb4_dcb_fw_msgs )((unsigned int )dcb->msgs | 8U); if ((unsigned int )dcb->dcb_version == 3U) { cxgb4_dcb_state_fsm(dev, 3); } else { } goto ldv_49646; case 4: fwap = & fwdcb->app_priority; idx = (int )fwap->idx; ap = (struct app_priority *)(& dcb->app_priority) + (unsigned long )idx; tmp___3 = __fswab16((int )fwap->protocolid); app.selector = (unsigned char)0; app.priority = (unsigned char)0; app.protocol = tmp___3; if ((unsigned int )dcb->dcb_version == 3U) { app.selector = (unsigned int )((__u8 )fwap->sel_field) + 1U; tmp___4 = ffs((int )fwap->user_prio_map); app.priority = (unsigned int )((__u8 )tmp___4) + 255U; err = dcb_ieee_setapp(dev, & app); if ((unsigned int )dcb->dcb_version == 3U) { cxgb4_dcb_state_fsm(dev, 3); } else { } } else { app.selector = (unsigned int )((unsigned char )fwap->sel_field) != 0U; app.priority = fwap->user_prio_map; err = dcb_setapp(dev, & app); } if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "Failed DCB Set Application Priority: sel=%d, prot=%d, prio=%d, err=%d\n", (int )app.selector, (int )app.protocol, (int )app.priority, - err); } else { } ap->user_prio_map = fwap->user_prio_map; ap->sel_field = fwap->sel_field; tmp___5 = __fswab16((int )fwap->protocolid); ap->protocolid = tmp___5; dcb->msgs = (enum cxgb4_dcb_fw_msgs )((unsigned int )dcb->msgs | 16U); goto ldv_49646; default: dev_err((struct device const *)adap->pdev_dev, "Unknown DCB update type received %x\n", dcb_type); goto ldv_49646; } ldv_49646: ; return; } } static u8 cxgb4_getstate(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; return ((u8 )pi->dcb.enabled); } } static u8 cxgb4_setstate(struct net_device *dev , u8 enabled ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; if ((unsigned int )pi->dcb.state == 1U) { pi->dcb.enabled = (unsigned int )enabled != 0U; return (0U); } else { } if ((int )enabled != ((unsigned int )pi->dcb.state == 3U)) { return (1U); } else { } return (0U); } } static void cxgb4_getpgtccfg_tx(struct net_device *dev , int tc , u8 *prio_type , u8 *pgid , u8 *bw_per , u8 *up_tc_map ) { { return; } } static void cxgb4_getpgtccfg_rx(struct net_device *dev , int tc , u8 *prio_type , u8 *pgid , u8 *bw_per , u8 *up_tc_map ) { { return; } } static void cxgb4_setpgtccfg_tx(struct net_device *dev , int tc , u8 prio_type , u8 pgid , u8 bw_per , u8 up_tc_map ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int fw_tc ; u32 _pgid ; int err ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; fw_tc = 7 - tc; if ((unsigned int )pgid == 255U) { return; } else { } if ((unsigned int )bw_per == 255U) { return; } else { } memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33555968U; pcmd.u.dcb.pgid.type = 0U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGID failed with %d\n", - err); return; } else { } tmp___1 = __fswab32(pcmd.u.dcb.pgid.pgid); _pgid = tmp___1; _pgid = (u32 )(~ (15 << fw_tc * 4)) & _pgid; _pgid = (u32 )((int )pgid << fw_tc * 4) | _pgid; tmp___2 = __fswab32(_pgid); pcmd.u.dcb.pgid.pgid = tmp___2; memset((void *)(& pcmd), 0, 32UL); tmp___3 = __fswab32((unsigned int )pi->port_id | 462422016U); pcmd.op_to_portid = tmp___3; pcmd.action_to_len16 = 33555712U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB write PGID failed with %d\n", - err); return; } else { } memset((void *)(& pcmd), 0, 32UL); memset((void *)(& pcmd), 0, 32UL); tmp___4 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___4; pcmd.action_to_len16 = 33555968U; pcmd.u.dcb.pgrate.type = 1U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGRATE failed with %d\n", - err); return; } else { } pcmd.u.dcb.pgrate.pgrate[(int )pgid] = bw_per; memset((void *)(& pcmd), 0, 32UL); tmp___5 = __fswab32((unsigned int )pi->port_id | 462422016U); pcmd.op_to_portid = tmp___5; pcmd.action_to_len16 = 33555712U; if ((unsigned int )pi->dcb.state == 1U) { pcmd.op_to_portid = pcmd.op_to_portid | 2147483648U; } else { } err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB write PGRATE failed with %d\n", - err); } else { } return; } } static void cxgb4_getpgbwgcfg_tx(struct net_device *dev , int pgid , u8 *bw_per ) { { return; } } static void cxgb4_getpgbwgcfg_rx(struct net_device *dev , int pgid , u8 *bw_per ) { { return; } } static void cxgb4_setpgbwgcfg_tx(struct net_device *dev , int pgid , u8 bw_per ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int err ; __u32 tmp___0 ; __u32 tmp___1 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33555968U; pcmd.u.dcb.pgrate.type = 1U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGRATE failed with %d\n", - err); return; } else { } pcmd.u.dcb.pgrate.pgrate[pgid] = bw_per; memset((void *)(& pcmd), 0, 32UL); tmp___1 = __fswab32((unsigned int )pi->port_id | 462422016U); pcmd.op_to_portid = tmp___1; pcmd.action_to_len16 = 33555712U; if ((unsigned int )pi->dcb.state == 1U) { pcmd.op_to_portid = pcmd.op_to_portid | 2147483648U; } else { } err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB write PGRATE failed with %d\n", - err); } else { } return; } } static void cxgb4_getpfccfg(struct net_device *dev , int priority , u8 *pfccfg ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; if ((unsigned int )dcb->state != 3U || priority > 7) { *pfccfg = 0U; } else { *pfccfg = (unsigned int )((u8 )((int )pi->dcb.pfcen >> (7 - priority))) & 1U; } return; } } static void cxgb4_setpfccfg(struct net_device *dev , int priority , u8 pfccfg ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int err ; __u32 tmp___0 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; if ((unsigned int )pi->dcb.state != 3U || priority > 7) { return; } else { } memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 462422016U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33555712U; if ((unsigned int )pi->dcb.state == 1U) { pcmd.op_to_portid = pcmd.op_to_portid | 2147483648U; } else { } pcmd.u.dcb.pfc.type = 3U; pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen; if ((unsigned int )pfccfg != 0U) { pcmd.u.dcb.pfc.pfcen = (__u8 )((int )((signed char )pcmd.u.dcb.pfc.pfcen) | (int )((signed char )(1 << (7 - priority)))); } else { pcmd.u.dcb.pfc.pfcen = (__u8 )((int )((signed char )pcmd.u.dcb.pfc.pfcen) & ~ ((int )((signed char )(1 << (7 - priority))))); } err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB PFC write failed with %d\n", - err); return; } else { } pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen; return; } } static u8 cxgb4_setall(struct net_device *dev ) { { return (0U); } } static u8 cxgb4_getcap(struct net_device *dev , int cap_id , u8 *caps ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; switch (cap_id) { case 2: ; case 3: *caps = 1U; goto ldv_49765; case 5: *caps = 128U; goto ldv_49765; case 6: *caps = 128U; goto ldv_49765; case 7: *caps = 1U; goto ldv_49765; case 4: ; case 8: *caps = 0U; goto ldv_49765; case 9: *caps = (u8 )pi->dcb.supported; goto ldv_49765; default: *caps = 0U; } ldv_49765: ; return (0U); } } static int cxgb4_getnumtcs(struct net_device *dev , int tcs_id , u8 *num ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; switch (tcs_id) { case 2: ; if (((unsigned int )pi->dcb.msgs & 2U) != 0U) { *num = pi->dcb.pg_num_tcs_supported; } else { *num = 8U; } goto ldv_49780; case 3: *num = 8U; goto ldv_49780; default: ; return (-22); } ldv_49780: ; return (0); } } static int cxgb4_setnumtcs(struct net_device *dev , int tcs_id , u8 num ) { { return (-38); } } static u8 cxgb4_getpfcstate(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; if ((unsigned int )pi->dcb.state != 3U) { return (0U); } else { } return ((unsigned int )pi->dcb.pfcen != 0U); } } static void cxgb4_setpfcstate(struct net_device *dev , u8 state ) { { return; } } static int __cxgb4_getapp(struct net_device *dev , u8 app_idtype , u16 app_id , int peer ) { struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int i ; struct fw_port_cmd pcmd ; int err ; __u32 tmp___0 ; __u32 tmp___1 ; __u16 tmp___2 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; if ((unsigned int )pi->dcb.state != 3U) { return (0); } else { } i = 0; goto ldv_49809; ldv_49808: ; if (peer != 0) { memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33556224U; } else { memset((void *)(& pcmd), 0, 32UL); tmp___1 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___1; pcmd.action_to_len16 = 33555968U; } pcmd.u.dcb.app_priority.type = 4U; pcmd.u.dcb.app_priority.idx = (__u8 )i; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB APP read failed with %d\n", - err); return (err); } else { } tmp___2 = __fswab16((int )pcmd.u.dcb.app_priority.protocolid); if ((int )tmp___2 == (int )app_id) { if ((int )pcmd.u.dcb.app_priority.sel_field == (int )app_idtype) { return ((int )pcmd.u.dcb.app_priority.user_prio_map); } else { } } else { } if ((unsigned int )pcmd.u.dcb.app_priority.protocolid == 0U) { goto ldv_49807; } else { } i = i + 1; ldv_49809: ; if (i <= 7) { goto ldv_49808; } else { } ldv_49807: ; return (-17); } } static int cxgb4_getapp(struct net_device *dev , u8 app_idtype , u16 app_id ) { int tmp ; { tmp = __cxgb4_getapp(dev, (int )app_idtype, (int )app_id, 0); return (tmp); } } static int __cxgb4_setapp(struct net_device *dev , u8 app_idtype , u16 app_id , u8 app_prio ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int i ; int err ; bool tmp___0 ; int tmp___1 ; __u32 tmp___2 ; __u16 tmp___3 ; __u32 tmp___4 ; __u16 tmp___5 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; if ((unsigned int )pi->dcb.state != 3U) { return (-22); } else { } tmp___0 = netif_carrier_ok((struct net_device const *)dev); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { return (-67); } else { } i = 0; goto ldv_49828; ldv_49827: memset((void *)(& pcmd), 0, 32UL); tmp___2 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___2; pcmd.action_to_len16 = 33555968U; pcmd.u.dcb.app_priority.type = 4U; pcmd.u.dcb.app_priority.idx = (__u8 )i; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB app table read failed with %d\n", - err); return (err); } else { } tmp___3 = __fswab16((int )pcmd.u.dcb.app_priority.protocolid); if ((int )tmp___3 == (int )app_id) { pcmd.u.dcb.app_priority.protocolid = 0U; goto ldv_49826; } else { } if ((unsigned int )pcmd.u.dcb.app_priority.protocolid == 0U) { goto ldv_49826; } else { } i = i + 1; ldv_49828: ; if (i <= 7) { goto ldv_49827; } else { } ldv_49826: ; if (i == 8) { dev_err((struct device const *)adap->pdev_dev, "DCB app table full\n"); return (-16); } else { } memset((void *)(& pcmd), 0, 32UL); tmp___4 = __fswab32((unsigned int )pi->port_id | 462422016U); pcmd.op_to_portid = tmp___4; pcmd.action_to_len16 = 33555712U; if ((unsigned int )pi->dcb.state == 1U) { pcmd.op_to_portid = pcmd.op_to_portid | 2147483648U; } else { } pcmd.u.dcb.app_priority.type = 4U; tmp___5 = __fswab16((int )app_id); pcmd.u.dcb.app_priority.protocolid = tmp___5; pcmd.u.dcb.app_priority.sel_field = app_idtype; pcmd.u.dcb.app_priority.user_prio_map = app_prio; pcmd.u.dcb.app_priority.idx = (__u8 )i; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB app table write failed with %d\n", - err); return (err); } else { } return (0); } } static int cxgb4_setapp(struct net_device *dev , u8 app_idtype , u16 app_id , u8 app_prio ) { int ret ; struct dcb_app app ; int tmp ; { app.selector = app_idtype; app.priority = app_prio; app.protocol = app_id; if ((unsigned int )app_idtype != 0U && (unsigned int )app_idtype != 1U) { return (-22); } else { } ret = __cxgb4_setapp(dev, (unsigned int )app_idtype == 0U ? 0 : 3, (int )app_id, (int )app_prio); if (ret != 0) { return (ret); } else { } tmp = dcb_setapp(dev, & app); return (tmp); } } __inline static int cxgb4_ieee_negotiation_complete(struct net_device *dev , enum cxgb4_dcb_fw_msgs dcb_subtype ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; if ((unsigned int )dcb_subtype != 0U && ((unsigned int )dcb->msgs & (unsigned int )dcb_subtype) == 0U) { return (0); } else { } return ((unsigned int )dcb->state == 3U && (dcb->supported & 8U) != 0U); } } static int cxgb4_ieee_read_ets(struct net_device *dev , struct ieee_ets *ets , int local ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; struct adapter *adap ; uint32_t tc_info ; struct fw_port_cmd pcmd ; int i ; int bwg ; int err ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; adap = pi->adapter; if (((unsigned int )dcb->msgs & 3U) == 0U) { return (0); } else { } ets->ets_cap = dcb->pg_num_tcs_supported; if (local != 0) { ets->willing = 1U; memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33555968U; } else { memset((void *)(& pcmd), 0, 32UL); tmp___1 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___1; pcmd.action_to_len16 = 33556224U; } pcmd.u.dcb.pgid.type = 0U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGID failed with %d\n", - err); return (err); } else { } tmp___2 = __fswab32(pcmd.u.dcb.pgid.pgid); tc_info = tmp___2; if (local != 0) { memset((void *)(& pcmd), 0, 32UL); tmp___3 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___3; pcmd.action_to_len16 = 33555968U; } else { memset((void *)(& pcmd), 0, 32UL); tmp___4 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___4; pcmd.action_to_len16 = 33556224U; } pcmd.u.dcb.pgrate.type = 1U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGRATE failed with %d\n", - err); return (err); } else { } i = 0; goto ldv_49857; ldv_49856: bwg = (int )(tc_info >> (7 - i) * 4) & 15; ets->prio_tc[i] = (__u8 )bwg; ets->tc_tx_bw[i] = pcmd.u.dcb.pgrate.pgrate[i]; ets->tc_rx_bw[i] = ets->tc_tx_bw[i]; ets->tc_tsa[i] = pcmd.u.dcb.pgrate.tsa[i]; i = i + 1; ldv_49857: ; if (i <= 7) { goto ldv_49856; } else { } return (0); } } static int cxgb4_ieee_get_ets(struct net_device *dev , struct ieee_ets *ets ) { int tmp ; { tmp = cxgb4_ieee_read_ets(dev, ets, 1); return (tmp); } } static int cxgb4_ieee_get_pfc(struct net_device *dev , struct ieee_pfc *pfc ) { struct port_info *pi ; struct port_info *tmp ; struct port_dcb_info *dcb ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; dcb = & pi->dcb; memset((void *)pfc, 0, 136UL); if (((unsigned int )dcb->msgs & 8U) == 0U) { return (0); } else { } pfc->pfc_cap = dcb->pfc_num_tcs_supported; pfc->pfc_en = bitswap_1((int )dcb->pfcen); return (0); } } static int cxgb4_ieee_peer_ets(struct net_device *dev , struct ieee_ets *ets ) { int tmp ; { tmp = cxgb4_ieee_read_ets(dev, ets, 0); return (tmp); } } static int cxgb4_ieee_getapp(struct net_device *dev , struct dcb_app *app ) { int prio ; int tmp ; u8 tmp___0 ; int tmp___1 ; { tmp = cxgb4_ieee_negotiation_complete(dev, 16); if (tmp == 0) { return (-22); } else { } if ((unsigned int )app->selector == 0U || (unsigned int )app->protocol == 0U) { return (-22); } else { } prio = __cxgb4_getapp(dev, (int )((unsigned int )app->selector + 255U), (int )app->protocol, 0); if (prio < 0) { tmp___0 = dcb_ieee_getapp_mask(dev, app); prio = (int )tmp___0; } else { } tmp___1 = ffs(prio); app->priority = (unsigned int )((__u8 )tmp___1) + 255U; return (0); } } static int cxgb4_ieee_setapp(struct net_device *dev , struct dcb_app *app ) { int ret ; int tmp ; int tmp___0 ; { tmp = cxgb4_ieee_negotiation_complete(dev, 16); if (tmp == 0) { return (-22); } else { } if ((unsigned int )app->selector == 0U || (unsigned int )app->protocol == 0U) { return (-22); } else { } if ((unsigned int )app->selector <= 1U || (unsigned int )app->selector > 3U) { return (-22); } else { } ret = __cxgb4_setapp(dev, (int )((unsigned int )app->selector + 255U), (int )app->protocol, (int )((u8 )(1 << (int )app->priority))); if (ret != 0) { return (ret); } else { } tmp___0 = dcb_ieee_setapp(dev, app); return (tmp___0); } } static u8 cxgb4_getdcbx(struct net_device *dev ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; return ((u8 )pi->dcb.supported); } } static u8 cxgb4_setdcbx(struct net_device *dev , u8 dcb_request ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; if (((int )dcb_request & 15) != (int )dcb_request) { return (1U); } else { } if ((unsigned int )pi->dcb.state != 3U) { return (1U); } else { } if ((unsigned int )dcb_request != pi->dcb.supported) { return (1U); } else { } pi->dcb.supported = (unsigned int )dcb_request; return (0U); } } static int cxgb4_getpeer_app(struct net_device *dev , struct dcb_peer_app_info *info , u16 *app_count ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int i ; int err ; __u32 tmp___0 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; err = 0; if ((unsigned int )pi->dcb.state != 3U) { return (1); } else { } info->willing = 0U; info->error = 0U; *app_count = 0U; i = 0; goto ldv_49904; ldv_49903: memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33556224U; pcmd.u.dcb.app_priority.type = 4U; pcmd.u.dcb.app_priority.idx = (__u8 )*app_count; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB app table read failed with %d\n", - err); return (err); } else { } if ((unsigned int )pcmd.u.dcb.app_priority.protocolid == 0U) { goto ldv_49902; } else { } i = i + 1; ldv_49904: ; if (i <= 7) { goto ldv_49903; } else { } ldv_49902: *app_count = (u16 )i; return (err); } } static int cxgb4_getpeerapp_tbl(struct net_device *dev , struct dcb_app *table ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; int i ; int err ; __u32 tmp___0 ; int tmp___1 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; err = 0; if ((unsigned int )pi->dcb.state != 3U) { return (1); } else { } i = 0; goto ldv_49916; ldv_49915: memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33556224U; pcmd.u.dcb.app_priority.type = 4U; pcmd.u.dcb.app_priority.idx = (__u8 )i; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB app table read failed with %d\n", - err); return (err); } else { } if ((unsigned int )pcmd.u.dcb.app_priority.protocolid == 0U) { goto ldv_49914; } else { } (table + (unsigned long )i)->selector = pcmd.u.dcb.app_priority.sel_field; (table + (unsigned long )i)->protocol = __fswab16((int )pcmd.u.dcb.app_priority.protocolid); tmp___1 = ffs((int )pcmd.u.dcb.app_priority.user_prio_map); (table + (unsigned long )i)->priority = (unsigned int )((__u8 )tmp___1) + 255U; i = i + 1; ldv_49916: ; if (i <= 7) { goto ldv_49915; } else { } ldv_49914: ; return (err); } } static int cxgb4_cee_peer_getpg(struct net_device *dev , struct cee_pg *pg ) { struct fw_port_cmd pcmd ; struct port_info *pi ; struct port_info *tmp ; struct adapter *adap ; u32 pgid ; int i ; int err ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; adap = pi->adapter; pg->willing = 1U; memset((void *)(& pcmd), 0, 32UL); tmp___0 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___0; pcmd.action_to_len16 = 33556224U; pcmd.u.dcb.pgid.type = 0U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGID failed with %d\n", - err); return (err); } else { } tmp___1 = __fswab32(pcmd.u.dcb.pgid.pgid); pgid = tmp___1; i = 0; goto ldv_49928; ldv_49927: pg->prio_pg[7 - i] = (unsigned int )((__u8 )(pgid >> i * 4)) & 15U; i = i + 1; ldv_49928: ; if (i <= 7) { goto ldv_49927; } else { } memset((void *)(& pcmd), 0, 32UL); tmp___2 = __fswab32((unsigned int )pi->port_id | 465567744U); pcmd.op_to_portid = tmp___2; pcmd.action_to_len16 = 33556224U; pcmd.u.dcb.pgrate.type = 1U; err = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& pcmd), 32, (void *)(& pcmd)); if (err != 0) { dev_err((struct device const *)adap->pdev_dev, "DCB read PGRATE failed with %d\n", - err); return (err); } else { } i = 0; goto ldv_49931; ldv_49930: pg->pg_bw[i] = pcmd.u.dcb.pgrate.pgrate[i]; i = i + 1; ldv_49931: ; if (i <= 7) { goto ldv_49930; } else { } return (0); } } static int cxgb4_cee_peer_getpfc(struct net_device *dev , struct cee_pfc *pfc ) { struct port_info *pi ; struct port_info *tmp ; { tmp = netdev2pinfo((struct net_device const *)dev); pi = tmp; cxgb4_getnumtcs(dev, 3, & pfc->tcs_supported); pfc->pfc_en = bitswap_1((int )pi->dcb.pfcen); return (0); } } struct dcbnl_rtnl_ops const cxgb4_dcb_ops = {& cxgb4_ieee_get_ets, 0, 0, 0, 0, 0, 0, & cxgb4_ieee_get_pfc, 0, & cxgb4_ieee_getapp, & cxgb4_ieee_setapp, 0, & cxgb4_ieee_peer_ets, & cxgb4_ieee_get_pfc, & cxgb4_getstate, & cxgb4_setstate, 0, & cxgb4_setpgtccfg_tx, & cxgb4_setpgbwgcfg_tx, 0, 0, & cxgb4_getpgtccfg_tx, & cxgb4_getpgbwgcfg_tx, & cxgb4_getpgtccfg_rx, & cxgb4_getpgbwgcfg_rx, & cxgb4_setpfccfg, & cxgb4_getpfccfg, & cxgb4_setall, & cxgb4_getcap, & cxgb4_getnumtcs, & cxgb4_setnumtcs, & cxgb4_getpfcstate, & cxgb4_setpfcstate, 0, 0, 0, 0, & cxgb4_setapp, & cxgb4_getapp, 0, 0, & cxgb4_getdcbx, & cxgb4_setdcbx, & cxgb4_getpeer_app, & cxgb4_getpeerapp_tbl, & cxgb4_cee_peer_getpg, & cxgb4_cee_peer_getpfc}; void ldv_initialize_dcbnl_rtnl_ops_42(void) { void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; { tmp = ldv_init_zalloc(3008UL); cxgb4_dcb_ops_group0 = (struct net_device *)tmp; tmp___0 = ldv_init_zalloc(4UL); cxgb4_dcb_ops_group1 = (struct dcb_app *)tmp___0; tmp___1 = ldv_init_zalloc(136UL); cxgb4_dcb_ops_group2 = (struct ieee_pfc *)tmp___1; tmp___2 = ldv_init_zalloc(59UL); cxgb4_dcb_ops_group3 = (struct ieee_ets *)tmp___2; return; } } void ldv_main_exported_42(void) { struct cee_pg *ldvarg139 ; void *tmp ; u8 *ldvarg130 ; void *tmp___0 ; u8 *ldvarg117 ; void *tmp___1 ; u8 ldvarg143 ; struct dcb_peer_app_info *ldvarg108 ; void *tmp___2 ; u8 ldvarg133 ; u8 ldvarg124 ; u8 *ldvarg127 ; void *tmp___3 ; int ldvarg116 ; u8 *ldvarg119 ; void *tmp___4 ; int ldvarg120 ; u8 ldvarg113 ; u8 ldvarg135 ; int ldvarg112 ; u8 ldvarg102 ; u8 *ldvarg111 ; void *tmp___5 ; int ldvarg123 ; u8 *ldvarg126 ; void *tmp___6 ; u8 *ldvarg128 ; void *tmp___7 ; u8 *ldvarg122 ; void *tmp___8 ; u8 *ldvarg137 ; void *tmp___9 ; int ldvarg104 ; u8 *ldvarg121 ; void *tmp___10 ; u16 ldvarg142 ; u16 *ldvarg107 ; void *tmp___11 ; int ldvarg129 ; int ldvarg110 ; int ldvarg138 ; u16 ldvarg132 ; u8 ldvarg105 ; u8 ldvarg140 ; u8 ldvarg103 ; int ldvarg114 ; int ldvarg125 ; u8 ldvarg136 ; u8 *ldvarg109 ; void *tmp___12 ; u8 *ldvarg115 ; void *tmp___13 ; u8 *ldvarg118 ; void *tmp___14 ; int ldvarg141 ; u8 ldvarg101 ; struct cee_pfc *ldvarg106 ; void *tmp___15 ; u8 ldvarg134 ; u8 ldvarg131 ; int tmp___16 ; { tmp = ldv_init_zalloc(20UL); ldvarg139 = (struct cee_pg *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg130 = (u8 *)tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg117 = (u8 *)tmp___1; tmp___2 = ldv_init_zalloc(2UL); ldvarg108 = (struct dcb_peer_app_info *)tmp___2; tmp___3 = ldv_init_zalloc(1UL); ldvarg127 = (u8 *)tmp___3; tmp___4 = ldv_init_zalloc(1UL); ldvarg119 = (u8 *)tmp___4; tmp___5 = ldv_init_zalloc(1UL); ldvarg111 = (u8 *)tmp___5; tmp___6 = ldv_init_zalloc(1UL); ldvarg126 = (u8 *)tmp___6; tmp___7 = ldv_init_zalloc(1UL); ldvarg128 = (u8 *)tmp___7; tmp___8 = ldv_init_zalloc(1UL); ldvarg122 = (u8 *)tmp___8; tmp___9 = ldv_init_zalloc(1UL); ldvarg137 = (u8 *)tmp___9; tmp___10 = ldv_init_zalloc(1UL); ldvarg121 = (u8 *)tmp___10; tmp___11 = ldv_init_zalloc(2UL); ldvarg107 = (u16 *)tmp___11; tmp___12 = ldv_init_zalloc(1UL); ldvarg109 = (u8 *)tmp___12; tmp___13 = ldv_init_zalloc(1UL); ldvarg115 = (u8 *)tmp___13; tmp___14 = ldv_init_zalloc(1UL); ldvarg118 = (u8 *)tmp___14; tmp___15 = ldv_init_zalloc(4UL); ldvarg106 = (struct cee_pfc *)tmp___15; ldv_memset((void *)(& ldvarg143), 0, 1UL); ldv_memset((void *)(& ldvarg133), 0, 1UL); ldv_memset((void *)(& ldvarg124), 0, 1UL); ldv_memset((void *)(& ldvarg116), 0, 4UL); ldv_memset((void *)(& ldvarg120), 0, 4UL); ldv_memset((void *)(& ldvarg113), 0, 1UL); ldv_memset((void *)(& ldvarg135), 0, 1UL); ldv_memset((void *)(& ldvarg112), 0, 4UL); ldv_memset((void *)(& ldvarg102), 0, 1UL); ldv_memset((void *)(& ldvarg123), 0, 4UL); ldv_memset((void *)(& ldvarg104), 0, 4UL); ldv_memset((void *)(& ldvarg142), 0, 2UL); ldv_memset((void *)(& ldvarg129), 0, 4UL); ldv_memset((void *)(& ldvarg110), 0, 4UL); ldv_memset((void *)(& ldvarg138), 0, 4UL); ldv_memset((void *)(& ldvarg132), 0, 2UL); ldv_memset((void *)(& ldvarg105), 0, 1UL); ldv_memset((void *)(& ldvarg140), 0, 1UL); ldv_memset((void *)(& ldvarg103), 0, 1UL); ldv_memset((void *)(& ldvarg114), 0, 4UL); ldv_memset((void *)(& ldvarg125), 0, 4UL); ldv_memset((void *)(& ldvarg136), 0, 1UL); ldv_memset((void *)(& ldvarg141), 0, 4UL); ldv_memset((void *)(& ldvarg101), 0, 1UL); ldv_memset((void *)(& ldvarg134), 0, 1UL); ldv_memset((void *)(& ldvarg131), 0, 1UL); tmp___16 = __VERIFIER_nondet_int(); switch (tmp___16) { case 0: ; if (ldv_state_variable_42 == 1) { cxgb4_getapp(cxgb4_dcb_ops_group0, (int )ldvarg143, (int )ldvarg142); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 1: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_get_ets(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group3); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 2: ; if (ldv_state_variable_42 == 1) { cxgb4_setpfccfg(cxgb4_dcb_ops_group0, ldvarg141, (int )ldvarg140); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 3: ; if (ldv_state_variable_42 == 1) { cxgb4_cee_peer_getpg(cxgb4_dcb_ops_group0, ldvarg139); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 4: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_get_pfc(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group2); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 5: ; if (ldv_state_variable_42 == 1) { cxgb4_getcap(cxgb4_dcb_ops_group0, ldvarg138, ldvarg137); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 6: ; if (ldv_state_variable_42 == 1) { cxgb4_setpfcstate(cxgb4_dcb_ops_group0, (int )ldvarg136); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 7: ; if (ldv_state_variable_42 == 1) { cxgb4_setall(cxgb4_dcb_ops_group0); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 8: ; if (ldv_state_variable_42 == 1) { cxgb4_setstate(cxgb4_dcb_ops_group0, (int )ldvarg135); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 9: ; if (ldv_state_variable_42 == 1) { cxgb4_setdcbx(cxgb4_dcb_ops_group0, (int )ldvarg134); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 10: ; if (ldv_state_variable_42 == 1) { cxgb4_setapp(cxgb4_dcb_ops_group0, (int )ldvarg133, (int )ldvarg132, (int )ldvarg131); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 11: ; if (ldv_state_variable_42 == 1) { cxgb4_getpeerapp_tbl(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group1); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 12: ; if (ldv_state_variable_42 == 1) { cxgb4_getpgtccfg_tx(cxgb4_dcb_ops_group0, ldvarg129, ldvarg128, ldvarg127, ldvarg130, ldvarg126); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 13: ; if (ldv_state_variable_42 == 1) { cxgb4_setpgbwgcfg_tx(cxgb4_dcb_ops_group0, ldvarg125, (int )ldvarg124); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 14: ; if (ldv_state_variable_42 == 1) { cxgb4_getpfcstate(cxgb4_dcb_ops_group0); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 15: ; if (ldv_state_variable_42 == 1) { cxgb4_getpfccfg(cxgb4_dcb_ops_group0, ldvarg123, ldvarg122); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 16: ; if (ldv_state_variable_42 == 1) { cxgb4_getpgtccfg_rx(cxgb4_dcb_ops_group0, ldvarg120, ldvarg119, ldvarg118, ldvarg121, ldvarg117); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 17: ; if (ldv_state_variable_42 == 1) { cxgb4_getpgbwgcfg_tx(cxgb4_dcb_ops_group0, ldvarg116, ldvarg115); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 18: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_getapp(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group1); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 19: ; if (ldv_state_variable_42 == 1) { cxgb4_getdcbx(cxgb4_dcb_ops_group0); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 20: ; if (ldv_state_variable_42 == 1) { cxgb4_setnumtcs(cxgb4_dcb_ops_group0, ldvarg114, (int )ldvarg113); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 21: ; if (ldv_state_variable_42 == 1) { cxgb4_getpgbwgcfg_rx(cxgb4_dcb_ops_group0, ldvarg112, ldvarg111); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 22: ; if (ldv_state_variable_42 == 1) { cxgb4_getnumtcs(cxgb4_dcb_ops_group0, ldvarg110, ldvarg109); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 23: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_setapp(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group1); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 24: ; if (ldv_state_variable_42 == 1) { cxgb4_getstate(cxgb4_dcb_ops_group0); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 25: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_get_pfc(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group2); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 26: ; if (ldv_state_variable_42 == 1) { cxgb4_getpeer_app(cxgb4_dcb_ops_group0, ldvarg108, ldvarg107); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 27: ; if (ldv_state_variable_42 == 1) { cxgb4_cee_peer_getpfc(cxgb4_dcb_ops_group0, ldvarg106); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 28: ; if (ldv_state_variable_42 == 1) { cxgb4_setpgtccfg_tx(cxgb4_dcb_ops_group0, ldvarg104, (int )ldvarg103, (int )ldvarg102, (int )ldvarg105, (int )ldvarg101); ldv_state_variable_42 = 1; } else { } goto ldv_49989; case 29: ; if (ldv_state_variable_42 == 1) { cxgb4_ieee_peer_ets(cxgb4_dcb_ops_group0, cxgb4_dcb_ops_group3); ldv_state_variable_42 = 1; } else { } goto ldv_49989; default: ldv_stop(); } ldv_49989: ; return; } } bool ldv_queue_work_on_165(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_166(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_167(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_168(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_169(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_179(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_181(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_180(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_183(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_182(struct workqueue_struct *ldv_func_arg1 ) ; extern void netdev_features_change(struct net_device * ) ; bool cxgb_fcoe_sof_eof_supported(struct adapter *adap , struct sk_buff *skb ) { struct fcoe_hdr *fcoeh ; unsigned char *tmp ; u8 sof ; u8 eof ; { tmp = skb_network_header((struct sk_buff const *)skb); fcoeh = (struct fcoe_hdr *)tmp; sof = fcoeh->fcoe_sof; eof = 0U; if ((unsigned int )sof != 46U && (unsigned int )sof != 54U) { dev_err((struct device const *)adap->pdev_dev, "Unsupported SOF 0x%x\n", (int )sof); return (0); } else { } skb_copy_bits((struct sk_buff const *)skb, (int )(skb->len - 4U), (void *)(& eof), 1); if ((unsigned int )eof != 65U && (unsigned int )eof != 66U) { dev_err((struct device const *)adap->pdev_dev, "Unsupported EOF 0x%x\n", (int )eof); return (0); } else { } return (1); } } int cxgb_fcoe_enable(struct net_device *netdev ) { struct port_info *pi ; void *tmp ; struct adapter *adap ; struct cxgb_fcoe *fcoe ; int tmp___0 ; { tmp = netdev_priv((struct net_device const *)netdev); pi = (struct port_info *)tmp; adap = pi->adapter; fcoe = & pi->fcoe; tmp___0 = is_t4(adap->params.chip); if (tmp___0 != 0) { return (-22); } else { } if ((adap->flags & 1U) == 0U) { return (-22); } else { } _dev_info((struct device const *)adap->pdev_dev, "Enabling FCoE offload features\n"); netdev->features = netdev->features | 536870912ULL; netdev->vlan_features = netdev->vlan_features | 536870912ULL; netdev->features = netdev->features | 2147483648ULL; netdev->vlan_features = netdev->vlan_features | 2147483648ULL; netdev_features_change(netdev); fcoe->flags = (u8 )((unsigned int )fcoe->flags | 1U); return (0); } } int cxgb_fcoe_disable(struct net_device *netdev ) { struct port_info *pi ; void *tmp ; struct adapter *adap ; struct cxgb_fcoe *fcoe ; { tmp = netdev_priv((struct net_device const *)netdev); pi = (struct port_info *)tmp; adap = pi->adapter; fcoe = & pi->fcoe; if (((int )fcoe->flags & 1) == 0) { return (-22); } else { } _dev_info((struct device const *)adap->pdev_dev, "Disabling FCoE offload features\n"); fcoe->flags = (unsigned int )fcoe->flags & 254U; netdev->features = netdev->features & 0xffffffffdfffffffULL; netdev->vlan_features = netdev->vlan_features & 0xffffffffdfffffffULL; netdev->features = netdev->features & 0xffffffff7fffffffULL; netdev->vlan_features = netdev->vlan_features & 0xffffffff7fffffffULL; netdev_features_change(netdev); return (0); } } bool ldv_queue_work_on_179(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_180(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_181(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_182(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_183(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; extern void __might_fault(char const * , int ) ; extern int kstrtoull(char const * , unsigned int , unsigned long long * ) ; __inline static int kstrtoul(char const *s , unsigned int base , unsigned long *res ) { int tmp ; { tmp = kstrtoull(s, base, (unsigned long long *)res); return (tmp); } } extern int scnprintf(char * , size_t , char const * , ...) ; extern int sscanf(char const * , char const * , ...) ; extern int bitmap_parse_user(char const * , unsigned int , unsigned long * , int ) ; __inline static void bitmap_copy(unsigned long *dst , unsigned long const *src , unsigned int nbits ) { unsigned int len ; { len = (unsigned int )(((unsigned long )nbits + 63UL) / 64UL) * 8U; memcpy((void *)dst, (void const *)src, (size_t )len); return; } } bool ldv_queue_work_on_193(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_195(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_194(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_197(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_196(struct workqueue_struct *ldv_func_arg1 ) ; void ldv_seq_operations_24(void) ; void ldv_seq_operations_15(void) ; void ldv_seq_operations_41(void) ; int ldv_seq_open_202(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) ; int ldv_seq_open_204(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) ; int ldv_seq_release_208(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_214(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; extern int seq_putc(struct seq_file * , char ) ; extern int single_open(struct file * , int (*)(struct seq_file * , void * ) , void * ) ; extern int single_release(struct inode * , struct file * ) ; extern void *__seq_open_private(struct file * , struct seq_operations const * , int ) ; extern int seq_release_private(struct inode * , struct file * ) ; int ldv_seq_release_private_198(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_199(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_200(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_201(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_203(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_205(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_206(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_207(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_209(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_210(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_211(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_212(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_213(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_215(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_216(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; int ldv_seq_release_private_217(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) ; __inline static struct inode *file_inode(struct file const *f ) { { return ((struct inode *)f->f_inode); } } extern loff_t default_llseek(struct file * , loff_t , int ) ; extern loff_t generic_file_llseek(struct file * , loff_t , int ) ; extern int simple_open(struct inode * , struct file * ) ; extern ssize_t simple_read_from_buffer(void * , size_t , loff_t * , void const * , size_t ) ; extern struct dentry *debugfs_create_file(char const * , umode_t , struct dentry * , void * , struct file_operations const * ) ; extern struct dentry *debugfs_create_file_size(char const * , umode_t , struct dentry * , void * , struct file_operations const * , loff_t ) ; extern unsigned long _copy_from_user(void * , void const * , unsigned int ) ; extern unsigned long _copy_to_user(void * , void const * , unsigned int ) ; extern void __copy_from_user_overflow(void) ; extern void __copy_to_user_overflow(void) ; __inline static unsigned long copy_from_user(void *to , void const *from , unsigned long n ) { int sz ; unsigned long tmp ; long tmp___0 ; { tmp = __builtin_object_size((void const *)to, 0); sz = (int )tmp; __might_fault("./arch/x86/include/asm/uaccess.h", 697); tmp___0 = ldv__builtin_expect((long )(sz < 0 || (unsigned long )sz >= n), 1L); if (tmp___0 != 0L) { n = _copy_from_user(to, from, (unsigned int )n); } else { __copy_from_user_overflow(); } return (n); } } __inline static unsigned long copy_to_user(void *to , void const *from , unsigned long n ) { int sz ; unsigned long tmp ; long tmp___0 ; { tmp = __builtin_object_size(from, 0); sz = (int )tmp; __might_fault("./arch/x86/include/asm/uaccess.h", 732); tmp___0 = ldv__builtin_expect((long )(sz < 0 || (unsigned long )sz >= n), 1L); if (tmp___0 != 0L) { n = _copy_to_user(to, from, (unsigned int )n); } else { __copy_to_user_overflow(); } return (n); } } struct seq_tab *seq_open_tab(struct file *f , unsigned int rows , unsigned int width , unsigned int have_header , int (*show)(struct seq_file * , void * , int ) ) ; void add_debugfs_files(struct adapter *adap , struct t4_debugfs_entry *files , unsigned int nfiles ) ; int mem_open(struct inode *inode , struct file *file ) ; static void *seq_tab_get_idx(struct seq_tab *tb , loff_t pos ) { { pos = pos - (loff_t )tb->skip_first; return ((loff_t )tb->rows > pos ? (void *)(& tb->data) + (unsigned long )((loff_t )tb->width * pos) : (void *)0); } } static void *seq_tab_start(struct seq_file *seq , loff_t *pos ) { struct seq_tab *tb ; void *tmp ; { tb = (struct seq_tab *)seq->private; if ((unsigned int )tb->skip_first != 0U && *pos == 0LL) { return ((void *)1); } else { } tmp = seq_tab_get_idx(tb, *pos); return (tmp); } } static void *seq_tab_next(struct seq_file *seq , void *v , loff_t *pos ) { { v = seq_tab_get_idx((struct seq_tab *)seq->private, *pos + 1LL); if ((unsigned long )v != (unsigned long )((void *)0)) { *pos = *pos + 1LL; } else { } return (v); } } static void seq_tab_stop(struct seq_file *seq , void *v ) { { return; } } static int seq_tab_show(struct seq_file *seq , void *v ) { struct seq_tab const *tb ; int tmp ; { tb = (struct seq_tab const *)seq->private; tmp = (*(tb->show))(seq, v, (int )(((long )v - (long )(& tb->data)) / (long )tb->width)); return (tmp); } } static struct seq_operations const seq_tab_ops = {& seq_tab_start, & seq_tab_stop, & seq_tab_next, & seq_tab_show}; struct seq_tab *seq_open_tab(struct file *f , unsigned int rows , unsigned int width , unsigned int have_header , int (*show)(struct seq_file * , void * , int ) ) { struct seq_tab *p ; void *tmp ; { tmp = __seq_open_private(f, & seq_tab_ops, (int )(rows * width + 16U)); p = (struct seq_tab *)tmp; if ((unsigned long )p != (unsigned long )((struct seq_tab *)0)) { p->show = show; p->rows = rows; p->width = (unsigned char )width; p->skip_first = have_header != 0U; } else { } return (p); } } static int seq_tab_trim(struct seq_tab *p , unsigned int new_rows ) { { if (p->rows < new_rows) { return (-22); } else { } p->rows = new_rows; return (0); } } static int cim_la_show(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, "Status Data PC LS0Stat LS0Addr LS0Data\n"); } else { p = (u32 const *)v; seq_printf(seq, " %02x %x%07x %x%07x %08x %08x %08x%08x%08x%08x\n", (unsigned int )(*p >> 4) & 255U, (unsigned int )*p & 15U, *(p + 1UL) >> 4, (unsigned int )*(p + 1UL) & 15U, *(p + 2UL) >> 4, (unsigned int )*(p + 2UL) & 15U, *(p + 3UL), *(p + 4UL), *(p + 5UL), *(p + 6UL), *(p + 7UL)); } return (0); } } static int cim_la_show_3in1(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, "Status Data PC\n"); } else { p = (u32 const *)v; seq_printf(seq, " %02x %08x %08x\n", (unsigned int )*(p + 5UL) & 255U, *(p + 6UL), *(p + 7UL)); seq_printf(seq, " %02x %02x%06x %02x%06x\n", (unsigned int )(*(p + 3UL) >> 8) & 255U, (unsigned int )*(p + 3UL) & 255U, *(p + 4UL) >> 8, (unsigned int )*(p + 4UL) & 255U, *(p + 5UL) >> 8); seq_printf(seq, " %02x %x%07x %x%07x\n", (unsigned int )(*p >> 4) & 255U, (unsigned int )*p & 15U, *(p + 1UL) >> 4, (unsigned int )*(p + 1UL) & 15U, *(p + 2UL) >> 4); } return (0); } } static int cim_la_open(struct inode *inode , struct file *file ) { int ret ; unsigned int cfg ; struct seq_tab *p ; struct adapter *adap ; { adap = (struct adapter *)inode->i_private; ret = t4_cim_read(adap, 320U, 1U, & cfg); if (ret != 0) { return (ret); } else { } p = seq_open_tab(file, adap->params.cim_la_size / 8U, 32U, 1U, (cfg & 1073741824U) != 0U ? & cim_la_show_3in1 : & cim_la_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } ret = t4_cim_read_la(adap, (u32 *)(& p->data), (unsigned int *)0U); if (ret != 0) { ldv_seq_release_private_198(inode, file); } else { } return (ret); } } static struct file_operations const cim_la_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_la_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cim_pif_la_show(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { p = (u32 const *)v; if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, "Cntl ID DataBE Addr Data\n"); } else if (idx <= 63) { seq_printf(seq, " %02x %02x %04x %08x %08x%08x%08x%08x\n", (unsigned int )(*(p + 5UL) >> 22) & 255U, (unsigned int )(*(p + 5UL) >> 16) & 63U, (unsigned int )*(p + 5UL) & 65535U, *(p + 4UL), *(p + 3UL), *(p + 2UL), *(p + 1UL), *p); } else { if (idx == 64) { seq_puts(seq, "\nCntl ID Data\n"); } else { } seq_printf(seq, " %02x %02x %08x%08x%08x%08x\n", (unsigned int )(*(p + 4UL) >> 6) & 255U, (unsigned int )*(p + 4UL) & 63U, *(p + 3UL), *(p + 2UL), *(p + 1UL), *p); } return (0); } } static int cim_pif_la_open(struct inode *inode , struct file *file ) { struct seq_tab *p ; struct adapter *adap ; { adap = (struct adapter *)inode->i_private; p = seq_open_tab(file, 128U, 24U, 1U, & cim_pif_la_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } t4_cim_read_pif_la(adap, (u32 *)(& p->data), (u32 *)(& p->data) + 384UL, (unsigned int *)0U, (unsigned int *)0U); return (0); } } static struct file_operations const cim_pif_la_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_pif_la_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cim_ma_la_show(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { p = (u32 const *)v; if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, "\n"); } else if (idx <= 63) { seq_printf(seq, "%02x%08x%08x%08x%08x\n", *(p + 4UL), *(p + 3UL), *(p + 2UL), *(p + 1UL), *p); } else { if (idx == 64) { seq_puts(seq, "\nCnt ID Tag UE Data RDY VLD\n"); } else { } seq_printf(seq, "%3u %2u %x %u %08x%08x %u %u\n", (unsigned int )(*(p + 2UL) >> 10) & 255U, (unsigned int )(*(p + 2UL) >> 7) & 7U, (unsigned int )(*(p + 2UL) >> 3) & 15U, (unsigned int )(*(p + 2UL) >> 2) & 1U, (unsigned int )(*(p + 1UL) >> 2) | ((unsigned int )*(p + 2UL) << 30), (unsigned int )(*p >> 2) | ((unsigned int )*(p + 1UL) << 30), (unsigned int )(*p >> 1) & 1U, (unsigned int )*p & 1U); } return (0); } } static int cim_ma_la_open(struct inode *inode , struct file *file ) { struct seq_tab *p ; struct adapter *adap ; { adap = (struct adapter *)inode->i_private; p = seq_open_tab(file, 128U, 20U, 1U, & cim_ma_la_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } t4_cim_read_ma_la(adap, (u32 *)(& p->data), (u32 *)(& p->data) + 320UL); return (0); } } static struct file_operations const cim_ma_la_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_ma_la_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cim_qcfg_show(struct seq_file *seq , void *v ) { char const *qname[14U] ; int i ; struct adapter *adap ; u16 base[14U] ; u16 size[14U] ; u32 stat[56U] ; u16 thres[6U] ; u32 obq_wr_t4[12U] ; u32 *wr ; u32 obq_wr_t5[16U] ; u32 *p ; int cim_num_obq ; int tmp ; int tmp___0 ; int tmp___1 ; { qname[0] = "TP0"; qname[1] = "TP1"; qname[2] = "ULP"; qname[3] = "SGE0"; qname[4] = "SGE1"; qname[5] = "NC-SI"; qname[6] = "ULP0"; qname[7] = "ULP1"; qname[8] = "ULP2"; qname[9] = "ULP3"; qname[10] = "SGE"; qname[11] = "NC-SI"; qname[12] = "SGE0-RX"; qname[13] = "SGE1-RX"; adap = (struct adapter *)seq->private; p = (u32 *)(& stat); tmp = is_t4(adap->params.chip); cim_num_obq = tmp != 0 ? 6 : 8; tmp___0 = is_t4(adap->params.chip); i = t4_cim_read(adap, tmp___0 != 0 ? 16U : 640U, 56U, (unsigned int *)(& stat)); if (i == 0) { tmp___1 = is_t4(adap->params.chip); if (tmp___1 != 0) { i = t4_cim_read(adap, 260U, 12U, (unsigned int *)(& obq_wr_t4)); wr = (u32 *)(& obq_wr_t4); } else { i = t4_cim_read(adap, 916U, 16U, (unsigned int *)(& obq_wr_t5)); wr = (u32 *)(& obq_wr_t5); } } else { } if (i != 0) { return (i); } else { } t4_read_cimq_cfg(adap, (u16 *)(& base), (u16 *)(& size), (u16 *)(& thres)); seq_printf(seq, " Queue Base Size Thres RdPtr WrPtr SOP EOP Avail\n"); i = 0; goto ldv_50139; ldv_50138: seq_printf(seq, "%7s %5x %5u %5u %6x %4x %4u %4u %5u\n", qname[i], (int )base[i], (int )size[i], (int )thres[i], *p & 8191U, *(p + 1UL) & 8191U, *(p + 3UL) & 4095U, (*(p + 3UL) >> 16) & 4095U, (*(p + 2UL) & 2047U) * 16U); i = i + 1; p = p + 4UL; ldv_50139: ; if (i <= 5) { goto ldv_50138; } else { } goto ldv_50142; ldv_50141: seq_printf(seq, "%7s %5x %5u %12x %4x %4u %4u %5u\n", qname[i], (int )base[i], (int )size[i], *p & 16383U, *wr - (u32 )base[i], *(p + 3UL) & 4095U, (*(p + 3UL) >> 16) & 4095U, (*(p + 2UL) & 2047U) * 16U); i = i + 1; p = p + 4UL; wr = wr + 2UL; ldv_50142: ; if (cim_num_obq + 6 > i) { goto ldv_50141; } else { } return (0); } } static int cim_qcfg_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & cim_qcfg_show, inode->i_private); return (tmp); } } static struct file_operations const cim_qcfg_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_qcfg_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cimq_show(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { p = (u32 const *)v; seq_printf(seq, "%#06x: %08x %08x %08x %08x\n", idx * 16, *p, *(p + 1UL), *(p + 2UL), *(p + 3UL)); return (0); } } static int cim_ibq_open(struct inode *inode , struct file *file ) { int ret ; struct seq_tab *p ; unsigned int qid ; struct adapter *adap ; { qid = (unsigned int )((long )inode->i_private) & 7U; adap = (struct adapter *)(inode->i_private + - ((unsigned long )qid)); p = seq_open_tab(file, 128U, 16U, 0U, & cimq_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } ret = t4_read_cim_ibq(adap, qid, (u32 *)(& p->data), 512UL); if (ret < 0) { ldv_seq_release_private_199(inode, file); } else { ret = 0; } return (ret); } } static struct file_operations const cim_ibq_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_ibq_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cim_obq_open(struct inode *inode , struct file *file ) { int ret ; struct seq_tab *p ; unsigned int qid ; struct adapter *adap ; { qid = (unsigned int )((long )inode->i_private) & 7U; adap = (struct adapter *)(inode->i_private + - ((unsigned long )qid)); p = seq_open_tab(file, 768U, 16U, 0U, & cimq_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } ret = t4_read_cim_obq(adap, qid, (u32 *)(& p->data), 3072UL); if (ret < 0) { ldv_seq_release_private_200(inode, file); } else { seq_tab_trim(p, (unsigned int )(ret / 4)); ret = 0; } return (ret); } } static struct file_operations const cim_obq_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cim_obq_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static void field_desc_show(struct seq_file *seq , u64 v , struct field_desc const *p ) { char buf[32U] ; int line_size ; u64 mask ; int len ; int tmp ; { line_size = 0; goto ldv_50187; ldv_50186: mask = (1ULL << (int )p->width) - 1ULL; tmp = scnprintf((char *)(& buf), 32UL, "%s: %llu", p->name, (v >> (int )p->start) & mask); len = tmp; if (line_size + len > 78) { line_size = 8; seq_puts(seq, "\n "); } else { } seq_printf(seq, "%s ", (char *)(& buf)); line_size = (len + 1) + line_size; p = p + 1; ldv_50187: ; if ((unsigned long )p->name != (unsigned long )((char const */* const */)0)) { goto ldv_50186; } else { } seq_putc(seq, 10); return; } } static struct field_desc tp_la0[34U] = { {"RcfOpCodeOut", 60U, 4U}, {"State", 56U, 4U}, {"WcfState", 52U, 4U}, {"RcfOpcSrcOut", 50U, 2U}, {"CRxError", 49U, 1U}, {"ERxError", 48U, 1U}, {"SanityFailed", 47U, 1U}, {"SpuriousMsg", 46U, 1U}, {"FlushInputMsg", 45U, 1U}, {"FlushInputCpl", 44U, 1U}, {"RssUpBit", 43U, 1U}, {"RssFilterHit", 42U, 1U}, {"Tid", 32U, 10U}, {"InitTcb", 31U, 1U}, {"LineNumber", 24U, 7U}, {"Emsg", 23U, 1U}, {"EdataOut", 22U, 1U}, {"Cmsg", 21U, 1U}, {"CdataOut", 20U, 1U}, {"EreadPdu", 19U, 1U}, {"CreadPdu", 18U, 1U}, {"TunnelPkt", 17U, 1U}, {"RcfPeerFin", 16U, 1U}, {"RcfReasonOut", 12U, 4U}, {"TxCchannel", 10U, 2U}, {"RcfTxChannel", 8U, 2U}, {"RxEchannel", 6U, 2U}, {"RcfRxChannel", 5U, 1U}, {"RcfDataOutSrdy", 4U, 1U}, {"RxDvld", 3U, 1U}, {"RxOoDvld", 2U, 1U}, {"RxCongestion", 1U, 1U}, {"TxCongestion", 0U, 1U}, {(char const *)0, 0U, 0U}}; static int tp_la_show(struct seq_file *seq , void *v , int idx ) { u64 const *p ; { p = (u64 const *)v; field_desc_show(seq, *p, (struct field_desc const *)(& tp_la0)); return (0); } } static int tp_la_show2(struct seq_file *seq , void *v , int idx ) { u64 const *p ; { p = (u64 const *)v; if (idx != 0) { seq_putc(seq, 10); } else { } field_desc_show(seq, *p, (struct field_desc const *)(& tp_la0)); if (idx <= 62 || (unsigned long long )*(p + 1UL) != 0xffffffffffffffffULL) { field_desc_show(seq, *(p + 1UL), (struct field_desc const *)(& tp_la0)); } else { } return (0); } } static int tp_la_show3(struct seq_file *seq , void *v , int idx ) { struct field_desc tp_la1[46U] ; struct field_desc tp_la2[44U] ; u64 const *p ; { tp_la1[0].name = "CplCmdIn"; tp_la1[0].start = 56U; tp_la1[0].width = 8U; tp_la1[1].name = "CplCmdOut"; tp_la1[1].start = 48U; tp_la1[1].width = 8U; tp_la1[2].name = "ESynOut"; tp_la1[2].start = 47U; tp_la1[2].width = 1U; tp_la1[3].name = "EAckOut"; tp_la1[3].start = 46U; tp_la1[3].width = 1U; tp_la1[4].name = "EFinOut"; tp_la1[4].start = 45U; tp_la1[4].width = 1U; tp_la1[5].name = "ERstOut"; tp_la1[5].start = 44U; tp_la1[5].width = 1U; tp_la1[6].name = "SynIn"; tp_la1[6].start = 43U; tp_la1[6].width = 1U; tp_la1[7].name = "AckIn"; tp_la1[7].start = 42U; tp_la1[7].width = 1U; tp_la1[8].name = "FinIn"; tp_la1[8].start = 41U; tp_la1[8].width = 1U; tp_la1[9].name = "RstIn"; tp_la1[9].start = 40U; tp_la1[9].width = 1U; tp_la1[10].name = "DataIn"; tp_la1[10].start = 39U; tp_la1[10].width = 1U; tp_la1[11].name = "DataInVld"; tp_la1[11].start = 38U; tp_la1[11].width = 1U; tp_la1[12].name = "PadIn"; tp_la1[12].start = 37U; tp_la1[12].width = 1U; tp_la1[13].name = "RxBufEmpty"; tp_la1[13].start = 36U; tp_la1[13].width = 1U; tp_la1[14].name = "RxDdp"; tp_la1[14].start = 35U; tp_la1[14].width = 1U; tp_la1[15].name = "RxFbCongestion"; tp_la1[15].start = 34U; tp_la1[15].width = 1U; tp_la1[16].name = "TxFbCongestion"; tp_la1[16].start = 33U; tp_la1[16].width = 1U; tp_la1[17].name = "TxPktSumSrdy"; tp_la1[17].start = 32U; tp_la1[17].width = 1U; tp_la1[18].name = "RcfUlpType"; tp_la1[18].start = 28U; tp_la1[18].width = 4U; tp_la1[19].name = "Eread"; tp_la1[19].start = 27U; tp_la1[19].width = 1U; tp_la1[20].name = "Ebypass"; tp_la1[20].start = 26U; tp_la1[20].width = 1U; tp_la1[21].name = "Esave"; tp_la1[21].start = 25U; tp_la1[21].width = 1U; tp_la1[22].name = "Static0"; tp_la1[22].start = 24U; tp_la1[22].width = 1U; tp_la1[23].name = "Cread"; tp_la1[23].start = 23U; tp_la1[23].width = 1U; tp_la1[24].name = "Cbypass"; tp_la1[24].start = 22U; tp_la1[24].width = 1U; tp_la1[25].name = "Csave"; tp_la1[25].start = 21U; tp_la1[25].width = 1U; tp_la1[26].name = "CPktOut"; tp_la1[26].start = 20U; tp_la1[26].width = 1U; tp_la1[27].name = "RxPagePoolFull"; tp_la1[27].start = 18U; tp_la1[27].width = 2U; tp_la1[28].name = "RxLpbkPkt"; tp_la1[28].start = 17U; tp_la1[28].width = 1U; tp_la1[29].name = "TxLpbkPkt"; tp_la1[29].start = 16U; tp_la1[29].width = 1U; tp_la1[30].name = "RxVfValid"; tp_la1[30].start = 15U; tp_la1[30].width = 1U; tp_la1[31].name = "SynLearned"; tp_la1[31].start = 14U; tp_la1[31].width = 1U; tp_la1[32].name = "SetDelEntry"; tp_la1[32].start = 13U; tp_la1[32].width = 1U; tp_la1[33].name = "SetInvEntry"; tp_la1[33].start = 12U; tp_la1[33].width = 1U; tp_la1[34].name = "CpcmdDvld"; tp_la1[34].start = 11U; tp_la1[34].width = 1U; tp_la1[35].name = "CpcmdSave"; tp_la1[35].start = 10U; tp_la1[35].width = 1U; tp_la1[36].name = "RxPstructsFull"; tp_la1[36].start = 8U; tp_la1[36].width = 2U; tp_la1[37].name = "EpcmdDvld"; tp_la1[37].start = 7U; tp_la1[37].width = 1U; tp_la1[38].name = "EpcmdFlush"; tp_la1[38].start = 6U; tp_la1[38].width = 1U; tp_la1[39].name = "EpcmdTrimPrefix"; tp_la1[39].start = 5U; tp_la1[39].width = 1U; tp_la1[40].name = "EpcmdTrimPostfix"; tp_la1[40].start = 4U; tp_la1[40].width = 1U; tp_la1[41].name = "ERssIp4Pkt"; tp_la1[41].start = 3U; tp_la1[41].width = 1U; tp_la1[42].name = "ERssIp6Pkt"; tp_la1[42].start = 2U; tp_la1[42].width = 1U; tp_la1[43].name = "ERssTcpUdpPkt"; tp_la1[43].start = 1U; tp_la1[43].width = 1U; tp_la1[44].name = "ERssFceFipPkt"; tp_la1[44].start = 0U; tp_la1[44].width = 1U; tp_la1[45].name = (char const *)0; tp_la1[45].start = 0U; tp_la1[45].width = 0U; tp_la2[0].name = "CplCmdIn"; tp_la2[0].start = 56U; tp_la2[0].width = 8U; tp_la2[1].name = "MpsVfVld"; tp_la2[1].start = 55U; tp_la2[1].width = 1U; tp_la2[2].name = "MpsPf"; tp_la2[2].start = 52U; tp_la2[2].width = 3U; tp_la2[3].name = "MpsVf"; tp_la2[3].start = 44U; tp_la2[3].width = 8U; tp_la2[4].name = "SynIn"; tp_la2[4].start = 43U; tp_la2[4].width = 1U; tp_la2[5].name = "AckIn"; tp_la2[5].start = 42U; tp_la2[5].width = 1U; tp_la2[6].name = "FinIn"; tp_la2[6].start = 41U; tp_la2[6].width = 1U; tp_la2[7].name = "RstIn"; tp_la2[7].start = 40U; tp_la2[7].width = 1U; tp_la2[8].name = "DataIn"; tp_la2[8].start = 39U; tp_la2[8].width = 1U; tp_la2[9].name = "DataInVld"; tp_la2[9].start = 38U; tp_la2[9].width = 1U; tp_la2[10].name = "PadIn"; tp_la2[10].start = 37U; tp_la2[10].width = 1U; tp_la2[11].name = "RxBufEmpty"; tp_la2[11].start = 36U; tp_la2[11].width = 1U; tp_la2[12].name = "RxDdp"; tp_la2[12].start = 35U; tp_la2[12].width = 1U; tp_la2[13].name = "RxFbCongestion"; tp_la2[13].start = 34U; tp_la2[13].width = 1U; tp_la2[14].name = "TxFbCongestion"; tp_la2[14].start = 33U; tp_la2[14].width = 1U; tp_la2[15].name = "TxPktSumSrdy"; tp_la2[15].start = 32U; tp_la2[15].width = 1U; tp_la2[16].name = "RcfUlpType"; tp_la2[16].start = 28U; tp_la2[16].width = 4U; tp_la2[17].name = "Eread"; tp_la2[17].start = 27U; tp_la2[17].width = 1U; tp_la2[18].name = "Ebypass"; tp_la2[18].start = 26U; tp_la2[18].width = 1U; tp_la2[19].name = "Esave"; tp_la2[19].start = 25U; tp_la2[19].width = 1U; tp_la2[20].name = "Static0"; tp_la2[20].start = 24U; tp_la2[20].width = 1U; tp_la2[21].name = "Cread"; tp_la2[21].start = 23U; tp_la2[21].width = 1U; tp_la2[22].name = "Cbypass"; tp_la2[22].start = 22U; tp_la2[22].width = 1U; tp_la2[23].name = "Csave"; tp_la2[23].start = 21U; tp_la2[23].width = 1U; tp_la2[24].name = "CPktOut"; tp_la2[24].start = 20U; tp_la2[24].width = 1U; tp_la2[25].name = "RxPagePoolFull"; tp_la2[25].start = 18U; tp_la2[25].width = 2U; tp_la2[26].name = "RxLpbkPkt"; tp_la2[26].start = 17U; tp_la2[26].width = 1U; tp_la2[27].name = "TxLpbkPkt"; tp_la2[27].start = 16U; tp_la2[27].width = 1U; tp_la2[28].name = "RxVfValid"; tp_la2[28].start = 15U; tp_la2[28].width = 1U; tp_la2[29].name = "SynLearned"; tp_la2[29].start = 14U; tp_la2[29].width = 1U; tp_la2[30].name = "SetDelEntry"; tp_la2[30].start = 13U; tp_la2[30].width = 1U; tp_la2[31].name = "SetInvEntry"; tp_la2[31].start = 12U; tp_la2[31].width = 1U; tp_la2[32].name = "CpcmdDvld"; tp_la2[32].start = 11U; tp_la2[32].width = 1U; tp_la2[33].name = "CpcmdSave"; tp_la2[33].start = 10U; tp_la2[33].width = 1U; tp_la2[34].name = "RxPstructsFull"; tp_la2[34].start = 8U; tp_la2[34].width = 2U; tp_la2[35].name = "EpcmdDvld"; tp_la2[35].start = 7U; tp_la2[35].width = 1U; tp_la2[36].name = "EpcmdFlush"; tp_la2[36].start = 6U; tp_la2[36].width = 1U; tp_la2[37].name = "EpcmdTrimPrefix"; tp_la2[37].start = 5U; tp_la2[37].width = 1U; tp_la2[38].name = "EpcmdTrimPostfix"; tp_la2[38].start = 4U; tp_la2[38].width = 1U; tp_la2[39].name = "ERssIp4Pkt"; tp_la2[39].start = 3U; tp_la2[39].width = 1U; tp_la2[40].name = "ERssIp6Pkt"; tp_la2[40].start = 2U; tp_la2[40].width = 1U; tp_la2[41].name = "ERssTcpUdpPkt"; tp_la2[41].start = 1U; tp_la2[41].width = 1U; tp_la2[42].name = "ERssFceFipPkt"; tp_la2[42].start = 0U; tp_la2[42].width = 1U; tp_la2[43].name = (char const *)0; tp_la2[43].start = 0U; tp_la2[43].width = 0U; p = (u64 const *)v; if (idx != 0) { seq_putc(seq, 10); } else { } field_desc_show(seq, *p, (struct field_desc const *)(& tp_la0)); if (idx <= 62 || (unsigned long long )*(p + 1UL) != 0xffffffffffffffffULL) { field_desc_show(seq, *(p + 1UL), ((unsigned long long )*p & 131072ULL) != 0ULL ? (struct field_desc const *)(& tp_la2) : (struct field_desc const *)(& tp_la1)); } else { } return (0); } } static int tp_la_open(struct inode *inode , struct file *file ) { struct seq_tab *p ; struct adapter *adap ; u32 tmp ; { adap = (struct adapter *)inode->i_private; tmp = t4_read_reg(adap, 32468U); switch ((tmp >> 14) & 3U) { case 2U: p = seq_open_tab(file, 64U, 16U, 0U, & tp_la_show2); goto ldv_50217; case 3U: p = seq_open_tab(file, 64U, 16U, 0U, & tp_la_show3); goto ldv_50217; default: p = seq_open_tab(file, 128U, 8U, 0U, & tp_la_show); } ldv_50217: ; if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } t4_tp_read_la(adap, (u64 *)(& p->data), (unsigned int *)0U); return (0); } } static ssize_t tp_la_write(struct file *file , char const *buf , size_t count , loff_t *pos ) { int err ; char s[32U] ; unsigned long val ; size_t size ; unsigned long _min1 ; size_t _min2 ; struct adapter *adap ; struct inode *tmp ; unsigned long tmp___0 ; { _min1 = 31UL; _min2 = count; size = _min1 < _min2 ? _min1 : _min2; tmp = file_inode((struct file const *)file); adap = (struct adapter *)tmp->i_private; tmp___0 = copy_from_user((void *)(& s), (void const *)buf, size); if (tmp___0 != 0UL) { return (-14L); } else { } s[size] = 0; err = kstrtoul((char const *)(& s), 0U, & val); if (err != 0) { return ((ssize_t )err); } else { } if (val > 65535UL) { return (-22L); } else { } adap->params.tp.la_mask = (unsigned int )val << 16U; t4_set_reg_field(adap, 32468U, 4294901760U, adap->params.tp.la_mask); return ((ssize_t )count); } } static struct file_operations const tp_la_fops = {& __this_module, & seq_lseek, & seq_read, & tp_la_write, 0, 0, 0, 0, 0, 0, 0, 0, & tp_la_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int ulprx_la_show(struct seq_file *seq , void *v , int idx ) { u32 const *p ; { p = (u32 const *)v; if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, " Pcmd Type Message Data\n"); } else { seq_printf(seq, "%08x%08x %4x %08x %08x%08x%08x%08x\n", *(p + 1UL), *p, *(p + 2UL), *(p + 3UL), *(p + 7UL), *(p + 6UL), *(p + 5UL), *(p + 4UL)); } return (0); } } static int ulprx_la_open(struct inode *inode , struct file *file ) { struct seq_tab *p ; struct adapter *adap ; { adap = (struct adapter *)inode->i_private; p = seq_open_tab(file, 512U, 32U, 1U, & ulprx_la_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } t4_ulprx_read_la(adap, (u32 *)(& p->data)); return (0); } } static struct file_operations const ulprx_la_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ulprx_la_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int pm_stats_show(struct seq_file *seq , void *v ) { char const *tx_pm_stats[4U] ; char const *rx_pm_stats[4U] ; int i ; u32 tx_cnt[5U] ; u32 rx_cnt[5U] ; u64 tx_cyc[5U] ; u64 rx_cyc[5U] ; struct adapter *adap ; { tx_pm_stats[0] = "Read:"; tx_pm_stats[1] = "Write bypass:"; tx_pm_stats[2] = "Write mem:"; tx_pm_stats[3] = "Bypass + mem:"; rx_pm_stats[0] = "Read:"; rx_pm_stats[1] = "Write bypass:"; rx_pm_stats[2] = "Write mem:"; rx_pm_stats[3] = "Flush:"; adap = (struct adapter *)seq->private; t4_pmtx_get_stats(adap, (u32 *)(& tx_cnt), (u64 *)(& tx_cyc)); t4_pmrx_get_stats(adap, (u32 *)(& rx_cnt), (u64 *)(& rx_cyc)); seq_printf(seq, "%13s %10s %20s\n", (char *)" ", (char *)"Tx pcmds", (char *)"Tx bytes"); i = 0; goto ldv_50261; ldv_50260: seq_printf(seq, "%-13s %10u %20llu\n", tx_pm_stats[i], tx_cnt[i], tx_cyc[i]); i = i + 1; ldv_50261: ; if (i <= 3) { goto ldv_50260; } else { } seq_printf(seq, "%13s %10s %20s\n", (char *)" ", (char *)"Rx pcmds", (char *)"Rx bytes"); i = 0; goto ldv_50264; ldv_50263: seq_printf(seq, "%-13s %10u %20llu\n", rx_pm_stats[i], rx_cnt[i], rx_cyc[i]); i = i + 1; ldv_50264: ; if (i <= 3) { goto ldv_50263; } else { } return (0); } } static int pm_stats_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & pm_stats_show, inode->i_private); return (tmp); } } static ssize_t pm_stats_clear(struct file *file , char const *buf , size_t count , loff_t *pos ) { struct adapter *adap ; struct inode *tmp ; { tmp = file_inode((struct file const *)file); adap = (struct adapter *)tmp->i_private; t4_write_reg(adap, 36808U, 0U); t4_write_reg(adap, 36840U, 0U); return ((ssize_t )count); } } static struct file_operations const pm_stats_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, & pm_stats_clear, 0, 0, 0, 0, 0, 0, 0, 0, & pm_stats_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int tx_rate_show(struct seq_file *seq , void *v ) { u64 nrate[4U] ; u64 orate[4U] ; struct adapter *adap ; { adap = (struct adapter *)seq->private; t4_get_chan_txrate(adap, (u64 *)(& nrate), (u64 *)(& orate)); if ((unsigned int )adap->params.arch.nchan == 4U) { seq_puts(seq, " channel 0 channel 1 channel 2 channel 3\n"); seq_printf(seq, "NIC B/s: %10llu %10llu %10llu %10llu\n", nrate[0], nrate[1], nrate[2], nrate[3]); seq_printf(seq, "Offload B/s: %10llu %10llu %10llu %10llu\n", orate[0], orate[1], orate[2], orate[3]); } else { seq_puts(seq, " channel 0 channel 1\n"); seq_printf(seq, "NIC B/s: %10llu %10llu\n", nrate[0], nrate[1]); seq_printf(seq, "Offload B/s: %10llu %10llu\n", orate[0], orate[1]); } return (0); } } static int tx_rate_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & tx_rate_show, inode->i_private); return (tmp); } } static struct file_operations const tx_rate_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & tx_rate_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int cctrl_tbl_show(struct seq_file *seq , void *v ) { char const *dec_fac[8U] ; int i ; u16 (*incr)[32U] ; struct adapter *adap ; void *tmp ; { dec_fac[0] = "0.5"; dec_fac[1] = "0.5625"; dec_fac[2] = "0.625"; dec_fac[3] = "0.6875"; dec_fac[4] = "0.75"; dec_fac[5] = "0.8125"; dec_fac[6] = "0.875"; dec_fac[7] = "0.9375"; adap = (struct adapter *)seq->private; tmp = kmalloc(1024UL, 208U); incr = (u16 (*)[32])tmp; if ((unsigned long )incr == (unsigned long )((u16 (*)[32])0)) { return (-12); } else { } t4_read_cong_tbl(adap, incr); i = 0; goto ldv_50299; ldv_50298: seq_printf(seq, "%2d: %4u %4u %4u %4u %4u %4u %4u %4u\n", i, (int )(*incr)[i], (int )(*(incr + 1UL))[i], (int )(*(incr + 2UL))[i], (int )(*(incr + 3UL))[i], (int )(*(incr + 4UL))[i], (int )(*(incr + 5UL))[i], (int )(*(incr + 6UL))[i], (int )(*(incr + 7UL))[i]); seq_printf(seq, "%8u %4u %4u %4u %4u %4u %4u %4u %5u %s\n", (int )(*(incr + 8UL))[i], (int )(*(incr + 9UL))[i], (int )(*(incr + 10UL))[i], (int )(*(incr + 11UL))[i], (int )(*(incr + 12UL))[i], (int )(*(incr + 13UL))[i], (int )(*(incr + 14UL))[i], (int )(*(incr + 15UL))[i], (int )adap->params.a_wnd[i], dec_fac[(int )adap->params.b_wnd[i]]); i = i + 1; ldv_50299: ; if (i <= 31) { goto ldv_50298; } else { } kfree((void const *)incr); return (0); } } static int cctrl_tbl_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & cctrl_tbl_show, inode->i_private); return (tmp); } } static struct file_operations const cctrl_tbl_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & cctrl_tbl_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static char *unit_conv(char *buf , size_t len , unsigned int val , unsigned int factor ) { unsigned int rem ; { rem = val % factor; if (rem == 0U) { snprintf(buf, len, "%u", val / factor); } else { goto ldv_50314; ldv_50313: rem = rem / 10U; ldv_50314: ; if (rem % 10U == 0U) { goto ldv_50313; } else { } snprintf(buf, len, "%u.%u", val / factor, rem); } return (buf); } } static int clk_show(struct seq_file *seq , void *v ) { char buf[32U] ; struct adapter *adap ; unsigned int cclk_ps ; u32 res ; u32 tmp ; unsigned int tre ; unsigned int dack_re ; unsigned long long tp_tick_us ; char *tmp___0 ; char *tmp___1 ; char *tmp___2 ; char *tmp___3 ; u32 tmp___4 ; u32 tmp___5 ; u32 tmp___6 ; u32 tmp___7 ; u32 tmp___8 ; u32 tmp___9 ; u32 tmp___10 ; u32 tmp___11 ; u32 tmp___12 ; { adap = (struct adapter *)seq->private; cclk_ps = 1000000000U / adap->params.vpd.cclk; tmp = t4_read_reg(adap, 32144U); res = tmp; tre = (res >> 16) & 255U; dack_re = res & 255U; tp_tick_us = (unsigned long long )((cclk_ps << (int )tre) / 1000000U); tmp___0 = unit_conv((char *)(& buf), 32UL, cclk_ps, 1000U); seq_printf(seq, "Core clock period: %s ns\n", tmp___0); tmp___1 = unit_conv((char *)(& buf), 32UL, cclk_ps << (int )tre, 1000000U); seq_printf(seq, "TP timer tick: %s us\n", tmp___1); tmp___2 = unit_conv((char *)(& buf), 32UL, cclk_ps << ((int )(res >> 8) & 255), 1000000U); seq_printf(seq, "TCP timestamp tick: %s us\n", tmp___2); tmp___3 = unit_conv((char *)(& buf), 32UL, cclk_ps << (int )dack_re, 1000000U); seq_printf(seq, "DACK tick: %s us\n", tmp___3); tmp___4 = t4_read_reg(adap, 32180U); seq_printf(seq, "DACK timer: %u us\n", ((cclk_ps << (int )dack_re) / 1000000U) * tmp___4); tmp___5 = t4_read_reg(adap, 32152U); seq_printf(seq, "Retransmit min: %llu us\n", (unsigned long long )tmp___5 * tp_tick_us); tmp___6 = t4_read_reg(adap, 32156U); seq_printf(seq, "Retransmit max: %llu us\n", (unsigned long long )tmp___6 * tp_tick_us); tmp___7 = t4_read_reg(adap, 32160U); seq_printf(seq, "Persist timer min: %llu us\n", (unsigned long long )tmp___7 * tp_tick_us); tmp___8 = t4_read_reg(adap, 32164U); seq_printf(seq, "Persist timer max: %llu us\n", (unsigned long long )tmp___8 * tp_tick_us); tmp___9 = t4_read_reg(adap, 32168U); seq_printf(seq, "Keepalive idle timer: %llu us\n", (unsigned long long )tmp___9 * tp_tick_us); tmp___10 = t4_read_reg(adap, 32172U); seq_printf(seq, "Keepalive interval: %llu us\n", (unsigned long long )tmp___10 * tp_tick_us); tmp___11 = t4_read_reg(adap, 32176U); seq_printf(seq, "Initial SRTT: %llu us\n", ((unsigned long long )tmp___11 & 65535ULL) * tp_tick_us); tmp___12 = t4_read_reg(adap, 32184U); seq_printf(seq, "FINWAIT2 timer: %llu us\n", (unsigned long long )tmp___12 * tp_tick_us); return (0); } } static int clk_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & clk_show, inode->i_private); return (tmp); } } static struct file_operations const clk_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & clk_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static char const * const devlog_level_strings[6U] = { "EMERG", "CRIT", "ERR", "NOTICE", "INFO", "DEBUG"}; static char const * const devlog_facility_strings[51U] = { "CORE", 0, "SCHED", 0, "TIMER", 0, "RES", 0, "HW", 0, 0, 0, 0, 0, 0, 0, "FLR", 0, "DMAQ", 0, "PHY", 0, "MAC", 0, "PORT", 0, "VI", 0, "FILTER", 0, "ACL", 0, "TM", 0, "QFC", 0, "DCB", 0, "ETH", 0, "OFLD", 0, "RI", 0, "ISCSI", 0, "FCOE", 0, "FOISCSI", 0, "FOFCOE"}; static int devlog_show(struct seq_file *seq , void *v ) { struct devlog_info *dinfo ; int fidx ; unsigned long index ; struct fw_devlog_e *e ; { if ((unsigned long )v == (unsigned long )((void *)1)) { seq_printf(seq, "%10s %15s %8s %8s %s\n", (char *)"Seq#", (char *)"Tstamp", (char *)"Level", (char *)"Facility", (char *)"Message"); } else { dinfo = (struct devlog_info *)seq->private; fidx = (int )((unsigned int )((long )v) - 2U); index = (unsigned long )(dinfo->first + (unsigned int )fidx); if ((unsigned long )dinfo->nentries <= index) { index = index - (unsigned long )dinfo->nentries; } else { } e = (struct fw_devlog_e *)(& dinfo->log) + index; if (e->timestamp == 0ULL) { return (0); } else { } seq_printf(seq, "%10d %15llu %8s %8s ", e->seqno, e->timestamp, (unsigned int )e->level <= 5U ? devlog_level_strings[(int )e->level] : (char const */* const */)"UNKNOWN", (unsigned int )e->facility <= 50U ? devlog_facility_strings[(int )e->facility] : (char const */* const */)"UNKNOWN"); seq_printf(seq, (char const *)(& e->fmt), e->params[0], e->params[1], e->params[2], e->params[3], e->params[4], e->params[5], e->params[6], e->params[7]); } return (0); } } __inline static void *devlog_get_idx(struct devlog_info *dinfo , loff_t pos ) { { if ((loff_t )dinfo->nentries < pos) { return ((void *)0); } else { } return ((void *)(pos + 1LL)); } } static void *devlog_start(struct seq_file *seq , loff_t *pos ) { struct devlog_info *dinfo ; void *tmp ; void *tmp___0 ; { dinfo = (struct devlog_info *)seq->private; if (*pos != 0LL) { tmp = devlog_get_idx(dinfo, *pos); tmp___0 = tmp; } else { tmp___0 = (void *)1; } return (tmp___0); } } static void *devlog_next(struct seq_file *seq , void *v , loff_t *pos ) { struct devlog_info *dinfo ; void *tmp ; { dinfo = (struct devlog_info *)seq->private; *pos = *pos + 1LL; tmp = devlog_get_idx(dinfo, *pos); return (tmp); } } static void devlog_stop(struct seq_file *seq , void *v ) { { return; } } static struct seq_operations const devlog_seq_ops = {& devlog_start, & devlog_stop, & devlog_next, & devlog_show}; static int devlog_open(struct inode *inode , struct file *file ) { struct adapter *adap ; struct devlog_params *dparams ; struct devlog_info *dinfo ; unsigned int index ; u32 fseqno ; int ret ; void *tmp ; struct fw_devlog_e *e ; int i ; __u32 seqno ; __u64 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; { adap = (struct adapter *)inode->i_private; dparams = & adap->params.devlog; if (dparams->start == 0U) { return (-6); } else { } tmp = __seq_open_private(file, & devlog_seq_ops, (int )(dparams->size + 8U)); dinfo = (struct devlog_info *)tmp; if ((unsigned long )dinfo == (unsigned long )((struct devlog_info *)0)) { return (-12); } else { } dinfo->nentries = dparams->size / 256U; dinfo->first = 0U; spin_lock(& adap->win0_lock); ret = t4_memory_rw(adap, (int )adap->params.drv_memwin, (int )dparams->memtype, dparams->start, dparams->size, (void *)(& dinfo->log), 1); spin_unlock(& adap->win0_lock); if (ret != 0) { ldv_seq_release_private_201(inode, file); return (ret); } else { } fseqno = 4294967295U; index = 0U; goto ldv_50388; ldv_50387: e = (struct fw_devlog_e *)(& dinfo->log) + (unsigned long )index; if (e->timestamp == 0ULL) { goto ldv_50383; } else { } tmp___0 = __fswab64(e->timestamp); e->timestamp = tmp___0; tmp___1 = __fswab32(e->seqno); seqno = tmp___1; i = 0; goto ldv_50385; ldv_50384: tmp___2 = __fswab32(e->params[i]); e->params[i] = tmp___2; i = i + 1; ldv_50385: ; if (i <= 7) { goto ldv_50384; } else { } if (seqno < fseqno) { fseqno = seqno; dinfo->first = index; } else { } ldv_50383: index = index + 1U; ldv_50388: ; if (dinfo->nentries > index) { goto ldv_50387; } else { } return (0); } } static struct file_operations const devlog_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & devlog_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int mbox_show(struct seq_file *seq , void *v ) { char const *owner[4U] ; int i ; unsigned int mbox ; struct adapter *adap ; void *addr ; unsigned int ctrl_reg ; int tmp ; void *ctrl ; unsigned int tmp___0 ; unsigned long tmp___1 ; { owner[0] = "none"; owner[1] = "FW"; owner[2] = "driver"; owner[3] = "unknown"; mbox = (unsigned int )((long )seq->private) & 7U; adap = (struct adapter *)(seq->private + - ((unsigned long )mbox)); addr = adap->regs + (unsigned long )((mbox + 120U) * 1024U + 576U); tmp = is_t4(adap->params.chip); ctrl_reg = tmp != 0 ? 640U : 656U; ctrl = adap->regs + (unsigned long )((mbox + 120U) * 1024U + ctrl_reg); tmp___0 = readl((void const volatile *)ctrl); i = (int )tmp___0 & 3; seq_printf(seq, "mailbox owned by %s\n\n", owner[i]); i = 0; goto ldv_50403; ldv_50402: tmp___1 = readq((void const volatile *)addr + (unsigned long )i); seq_printf(seq, "%016llx\n", (unsigned long long )tmp___1); i = i + 8; ldv_50403: ; if (i <= 63) { goto ldv_50402; } else { } return (0); } } static int mbox_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & mbox_show, inode->i_private); return (tmp); } } static ssize_t mbox_write(struct file *file , char const *buf , size_t count , loff_t *pos ) { int i ; char c ; char s[256U] ; unsigned long long data[8U] ; struct inode const *ino ; unsigned int mbox ; struct adapter *adap ; void *addr ; void *ctrl ; unsigned long tmp ; int tmp___0 ; struct inode *tmp___1 ; unsigned int tmp___2 ; { c = 10; if (count > 255UL || count == 0UL) { return (-22L); } else { } tmp = copy_from_user((void *)(& s), (void const *)buf, count); if (tmp != 0UL) { return (-14L); } else { } s[count] = 0; tmp___0 = sscanf((char const *)(& s), "%llx %llx %llx %llx %llx %llx %llx %llx%c", (unsigned long long *)(& data), (unsigned long long *)(& data) + 1UL, (unsigned long long *)(& data) + 2UL, (unsigned long long *)(& data) + 3UL, (unsigned long long *)(& data) + 4UL, (unsigned long long *)(& data) + 5UL, (unsigned long long *)(& data) + 6UL, (unsigned long long *)(& data) + 7UL, & c); if (tmp___0 <= 7 || (int )((signed char )c) != 10) { return (-22L); } else { } tmp___1 = file_inode((struct file const *)file); ino = (struct inode const *)tmp___1; mbox = (unsigned int )((long )ino->i_private) & 7U; adap = (struct adapter *)(ino->i_private + - ((unsigned long )mbox)); addr = adap->regs + (unsigned long )((mbox + 120U) * 1024U + 576U); ctrl = addr + 64UL; tmp___2 = readl((void const volatile *)ctrl); if ((tmp___2 & 3U) != 2U) { return (-16L); } else { } i = 0; goto ldv_50425; ldv_50424: writeq((unsigned long )data[i], (void volatile *)addr + (unsigned long )(i * 8)); i = i + 1; ldv_50425: ; if (i <= 7) { goto ldv_50424; } else { } writel(9U, (void volatile *)ctrl); return ((ssize_t )count); } } static struct file_operations const mbox_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, & mbox_write, 0, 0, 0, 0, 0, 0, 0, 0, & mbox_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static ssize_t flash_read(struct file *file , char *buf , size_t count , loff_t *ppos ) { loff_t pos ; loff_t avail ; struct inode *tmp ; struct adapter *adap ; size_t len ; int ret ; int ofst ; u8 data[256U] ; size_t _min1 ; unsigned long _min2 ; unsigned long tmp___0 ; { pos = *ppos; tmp = file_inode((struct file const *)file); avail = tmp->i_size; adap = (struct adapter *)file->private_data; if (pos < 0LL) { return (-22L); } else { } if (pos >= avail) { return (0L); } else { } if ((unsigned long long )(avail - pos) < (unsigned long long )count) { count = (size_t )(avail - pos); } else { } goto ldv_50445; ldv_50444: ofst = (int )pos & 3; _min1 = (size_t )ofst + count; _min2 = 256UL; len = _min1 < _min2 ? _min1 : _min2; ret = t4_read_flash(adap, (unsigned int )pos - (unsigned int )ofst, (unsigned int )((len + 3UL) / 4UL), (u32 *)(& data), 1); if (ret != 0) { return ((ssize_t )ret); } else { } len = len - (size_t )ofst; tmp___0 = copy_to_user((void *)buf, (void const *)(& data) + (unsigned long )ofst, len); if (tmp___0 != 0UL) { return (-14L); } else { } buf = buf + len; pos = (loff_t )((unsigned long long )pos + (unsigned long long )len); count = count - len; ldv_50445: ; if (count != 0UL) { goto ldv_50444; } else { } count = (size_t )(pos - *ppos); *ppos = pos; return ((ssize_t )count); } } static struct file_operations const flash_debugfs_fops = {& __this_module, 0, & flash_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & mem_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; __inline static void tcamxy2valmask(u64 x , u64 y , u8 *addr , u64 *mask ) { __u64 tmp ; { *mask = x | y; tmp = __fswab64(y); y = tmp; memcpy((void *)addr, (void const *)(& y) + 2U, 6UL); return; } } static int mps_tcam_show(struct seq_file *seq , void *v ) { struct adapter *adap ; unsigned int chip_ver ; u64 mask ; u8 addr[6U] ; bool replicate ; unsigned int idx ; u64 tcamy ; u64 tcamx ; u64 val ; u32 cls_lo ; u32 cls_hi ; u32 ctl ; u32 rplc[8U] ; unsigned int tmp ; u32 tmp___0 ; u32 tmp___1 ; u32 tmp___2 ; u32 tmp___3 ; struct fw_ldst_cmd ldst_cmd ; int ret ; struct fw_ldst_mps_rplc mps_rplc ; u32 ldst_addrspc ; __u32 tmp___4 ; __u16 tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; __u32 tmp___8 ; __u32 tmp___9 ; __u32 tmp___10 ; __u32 tmp___11 ; __u32 tmp___12 ; __u32 tmp___13 ; { adap = (struct adapter *)seq->private; chip_ver = ((unsigned int )adap->params.chip >> 4) & 15U; if ((unsigned long )v == (unsigned long )((void *)1)) { if ((unsigned int )adap->params.arch.mps_rplc_size > 128U) { seq_puts(seq, "Idx Ethernet address Mask Vld Ports PF VF Replication P0 P1 P2 P3 ML\n"); } else { seq_puts(seq, "Idx Ethernet address Mask Vld Ports PF VF Replication\t P0 P1 P2 P3 ML\n"); } } else { idx = (unsigned int )((long )v) - 2U; rplc[0] = 0U; tmp = 1U; while (1) { if (tmp >= 8U) { break; } else { } rplc[tmp] = 0U; tmp = tmp + 1U; } if (chip_ver > 5U) { ctl = 0U; if (idx <= 255U) { ctl = (idx << 17) | ctl; } else { ctl = (((idx - 256U) << 17) | ctl) | 33554432U; } t4_write_reg(adap, 61448U, ctl); tmp___0 = t4_read_reg(adap, 61444U); val = (u64 )tmp___0; tcamy = (val & 65535ULL) << 32; tmp___1 = t4_read_reg(adap, 61440U); tcamy = (u64 )tmp___1 | tcamy; ctl = ctl | 65536U; t4_write_reg(adap, 61448U, ctl); tmp___2 = t4_read_reg(adap, 61444U); val = (u64 )tmp___2; tcamx = (val & 65535ULL) << 32; tmp___3 = t4_read_reg(adap, 61440U); tcamx = (u64 )tmp___3 | tcamx; } else { tcamy = t4_read_reg64(adap, (idx + 3840U) * 16U); tcamx = t4_read_reg64(adap, idx * 16U + 61448U); } cls_lo = t4_read_reg(adap, (idx + 7168U) * 8U); cls_hi = t4_read_reg(adap, idx * 8U + 57348U); if ((tcamx & tcamy) != 0ULL) { seq_printf(seq, "%3u -\n", idx); goto out; } else { } rplc[3] = 0U; rplc[2] = rplc[3]; rplc[1] = rplc[2]; rplc[0] = rplc[1]; if (chip_ver > 5U) { replicate = (cls_lo & 4096U) != 0U; } else { replicate = (cls_lo & 2048U) != 0U; } if ((int )replicate) { memset((void *)(& ldst_cmd), 0, 64UL); ldst_addrspc = 32U; tmp___4 = __fswab32(ldst_addrspc | 29360128U); ldst_cmd.op_to_addrspace = tmp___4; ldst_cmd.cycles_to_len16 = 67108864U; tmp___5 = __fswab16((int )((unsigned int )((__u16 )idx) | 32768U)); ldst_cmd.u.mps.rplc.fid_idx = tmp___5; ret = t4_wr_mbox(adap, (int )adap->mbox, (void const *)(& ldst_cmd), 64, (void *)(& ldst_cmd)); if (ret != 0) { dev_warn((struct device const *)adap->pdev_dev, "Can\'t read MPS replication map for idx %d: %d\n", idx, - ret); } else { mps_rplc = ldst_cmd.u.mps.rplc; tmp___6 = __fswab32(mps_rplc.rplc31_0); rplc[0] = tmp___6; tmp___7 = __fswab32(mps_rplc.rplc63_32); rplc[1] = tmp___7; tmp___8 = __fswab32(mps_rplc.rplc95_64); rplc[2] = tmp___8; tmp___9 = __fswab32(mps_rplc.rplc127_96); rplc[3] = tmp___9; if ((unsigned int )adap->params.arch.mps_rplc_size > 128U) { tmp___10 = __fswab32(mps_rplc.rplc159_128); rplc[4] = tmp___10; tmp___11 = __fswab32(mps_rplc.rplc191_160); rplc[5] = tmp___11; tmp___12 = __fswab32(mps_rplc.rplc223_192); rplc[6] = tmp___12; tmp___13 = __fswab32(mps_rplc.rplc255_224); rplc[7] = tmp___13; } else { } } } else { } tcamxy2valmask(tcamx, tcamy, (u8 *)(& addr), & mask); if (chip_ver > 5U) { seq_printf(seq, "%3u %02x:%02x:%02x:%02x:%02x:%02x %012llx%3c %#x%4u%4d", idx, (int )addr[0], (int )addr[1], (int )addr[2], (int )addr[3], (int )addr[4], (int )addr[5], mask, (cls_lo & 8192U) != 0U ? 89 : 78, cls_hi & 15U, (cls_lo >> 9) & 7U, (cls_lo & 256U) != 0U ? cls_lo & 255U : 4294967295U); } else { seq_printf(seq, "%3u %02x:%02x:%02x:%02x:%02x:%02x %012llx%3c %#x%4u%4d", idx, (int )addr[0], (int )addr[1], (int )addr[2], (int )addr[3], (int )addr[4], (int )addr[5], mask, (cls_lo & 4096U) != 0U ? 89 : 78, cls_hi & 15U, (cls_lo >> 8) & 7U, (cls_lo & 128U) != 0U ? cls_lo & 127U : 4294967295U); } if ((int )replicate) { if ((unsigned int )adap->params.arch.mps_rplc_size > 128U) { seq_printf(seq, " %08x %08x %08x %08x %08x %08x %08x %08x", rplc[7], rplc[6], rplc[5], rplc[4], rplc[3], rplc[2], rplc[1], rplc[0]); } else { seq_printf(seq, " %08x %08x %08x %08x", rplc[3], rplc[2], rplc[1], rplc[0]); } } else if ((unsigned int )adap->params.arch.mps_rplc_size > 128U) { seq_printf(seq, "%72c", 32); } else { seq_printf(seq, "%36c", 32); } if (chip_ver > 5U) { seq_printf(seq, "%4u%3u%3u%3u %#x\n", (cls_lo >> 14) & 7U, (cls_lo >> 17) & 7U, (cls_lo >> 20) & 7U, (cls_lo >> 23) & 7U, (cls_lo >> 26) & 15U); } else { seq_printf(seq, "%4u%3u%3u%3u %#x\n", (cls_lo >> 13) & 7U, (cls_lo >> 16) & 7U, (cls_lo >> 19) & 7U, (cls_lo >> 22) & 7U, (cls_lo >> 25) & 15U); } } out: ; return (0); } } __inline static void *mps_tcam_get_idx(struct seq_file *seq , loff_t pos ) { struct adapter *adap ; int max_mac_addr ; int tmp ; { adap = (struct adapter *)seq->private; tmp = is_t4(adap->params.chip); max_mac_addr = tmp != 0 ? 336 : 512; return ((loff_t )max_mac_addr >= pos ? (void *)(pos + 1LL) : (void *)0); } } static void *mps_tcam_start(struct seq_file *seq , loff_t *pos ) { void *tmp ; void *tmp___0 ; { if (*pos != 0LL) { tmp = mps_tcam_get_idx(seq, *pos); tmp___0 = tmp; } else { tmp___0 = (void *)1; } return (tmp___0); } } static void *mps_tcam_next(struct seq_file *seq , void *v , loff_t *pos ) { void *tmp ; { *pos = *pos + 1LL; tmp = mps_tcam_get_idx(seq, *pos); return (tmp); } } static void mps_tcam_stop(struct seq_file *seq , void *v ) { { return; } } static struct seq_operations const mps_tcam_seq_ops = {& mps_tcam_start, & mps_tcam_stop, & mps_tcam_next, & mps_tcam_show}; static int mps_tcam_open(struct inode *inode , struct file *file ) { int res ; int tmp ; struct seq_file *seq ; { tmp = ldv_seq_open_202(file, & mps_tcam_seq_ops); res = tmp; if (res == 0) { seq = (struct seq_file *)file->private_data; seq->private = inode->i_private; } else { } return (res); } } static struct file_operations const mps_tcam_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & mps_tcam_open, 0, & seq_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int sensors_show(struct seq_file *seq , void *v ) { struct adapter *adap ; u32 param[7U] ; u32 val[7U] ; int ret ; { adap = (struct adapter *)seq->private; param[0] = 17891328U; param[1] = 17891584U; ret = t4_query_params(adap, adap->mbox, adap->pf, 0U, 2U, (u32 const *)(& param), (u32 *)(& val)); if (ret < 0 || val[0] == 0U) { seq_puts(seq, "Temperature: \n"); } else { seq_printf(seq, "Temperature: %dC\n", val[0]); } if (ret < 0 || val[1] == 0U) { seq_puts(seq, "Core VDD: \n"); } else { seq_printf(seq, "Core VDD: %dmV\n", val[1]); } return (0); } } static int sensors_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & sensors_show, inode->i_private); return (tmp); } } static struct file_operations const sensors_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & sensors_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int clip_tbl_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & clip_tbl_show, inode->i_private); return (tmp); } } static struct file_operations const clip_tbl_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & clip_tbl_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int rss_show(struct seq_file *seq , void *v , int idx ) { u16 *entry ; { entry = (u16 *)v; seq_printf(seq, "%4d: %4u %4u %4u %4u %4u %4u %4u %4u\n", idx * 8, (int )*entry, (int )*(entry + 1UL), (int )*(entry + 2UL), (int )*(entry + 3UL), (int )*(entry + 4UL), (int )*(entry + 5UL), (int )*(entry + 6UL), (int )*(entry + 7UL)); return (0); } } static int rss_open(struct inode *inode , struct file *file ) { int ret ; struct seq_tab *p ; struct adapter *adap ; { adap = (struct adapter *)inode->i_private; p = seq_open_tab(file, 256U, 16U, 0U, & rss_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } ret = t4_read_rss(adap, (u16 *)(& p->data)); if (ret != 0) { ldv_seq_release_private_203(inode, file); } else { } return (ret); } } static struct file_operations const rss_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & rss_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static char const *yesno(int x ) { char const *yes ; char const *no ; { yes = "yes"; no = "no"; return (x != 0 ? yes : no); } } static int rss_config_show(struct seq_file *seq , void *v ) { struct adapter *adapter ; char const *keymode[4U] ; u32 rssconf ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; char const *tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; char const *tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; char const *tmp___36 ; char const *tmp___37 ; char const *tmp___38 ; char const *tmp___39 ; char const *tmp___40 ; char const *tmp___41 ; char const *tmp___42 ; char const *tmp___43 ; char const *tmp___44 ; char const *tmp___45 ; char const *tmp___46 ; char const *tmp___47 ; char const *tmp___48 ; char const *tmp___49 ; char const *tmp___50 ; char const *tmp___51 ; char const *tmp___52 ; char const *tmp___53 ; char const *tmp___54 ; char const *tmp___55 ; char const *tmp___56 ; char const *tmp___57 ; char const *tmp___58 ; char const *tmp___59 ; { adapter = (struct adapter *)seq->private; keymode[0] = "global"; keymode[1] = "global and per-VF scramble"; keymode[2] = "per-PF and per-VF scramble"; keymode[3] = "per-VF and per-VF scramble"; rssconf = t4_read_reg(adapter, 32240U); seq_printf(seq, "TP_RSS_CONFIG: %#x\n", rssconf); tmp = yesno((long )((int )rssconf) & (-0x7FFFFFFF-1)); seq_printf(seq, " Tnl4TupEnIpv6: %3s\n", tmp); tmp___0 = yesno((int )rssconf & 1073741824); seq_printf(seq, " Tnl2TupEnIpv6: %3s\n", tmp___0); tmp___1 = yesno((int )rssconf & 536870912); seq_printf(seq, " Tnl4TupEnIpv4: %3s\n", tmp___1); tmp___2 = yesno((int )rssconf & 268435456); seq_printf(seq, " Tnl2TupEnIpv4: %3s\n", tmp___2); tmp___3 = yesno((int )rssconf & 134217728); seq_printf(seq, " TnlTcpSel: %3s\n", tmp___3); tmp___4 = yesno((int )rssconf & 67108864); seq_printf(seq, " TnlIp6Sel: %3s\n", tmp___4); tmp___5 = yesno((int )rssconf & 33554432); seq_printf(seq, " TnlVrtSel: %3s\n", tmp___5); tmp___6 = yesno((int )rssconf & 16777216); seq_printf(seq, " TnlMapEn: %3s\n", tmp___6); tmp___7 = yesno((int )rssconf & 524288); seq_printf(seq, " OfdHashSave: %3s\n", tmp___7); tmp___8 = yesno((int )rssconf & 262144); seq_printf(seq, " OfdVrtSel: %3s\n", tmp___8); tmp___9 = yesno((int )rssconf & 131072); seq_printf(seq, " OfdMapEn: %3s\n", tmp___9); tmp___10 = yesno((int )rssconf & 65536); seq_printf(seq, " OfdLkpEn: %3s\n", tmp___10); tmp___11 = yesno((int )rssconf & 32768); seq_printf(seq, " Syn4TupEnIpv6: %3s\n", tmp___11); tmp___12 = yesno((int )rssconf & 16384); seq_printf(seq, " Syn2TupEnIpv6: %3s\n", tmp___12); tmp___13 = yesno((int )rssconf & 8192); seq_printf(seq, " Syn4TupEnIpv4: %3s\n", tmp___13); tmp___14 = yesno((int )rssconf & 4096); seq_printf(seq, " Syn2TupEnIpv4: %3s\n", tmp___14); tmp___15 = yesno((int )rssconf & 32768); seq_printf(seq, " Syn4TupEnIpv6: %3s\n", tmp___15); tmp___16 = yesno((int )rssconf & 2048); seq_printf(seq, " SynIp6Sel: %3s\n", tmp___16); tmp___17 = yesno((int )rssconf & 1024); seq_printf(seq, " SynVrt6Sel: %3s\n", tmp___17); tmp___18 = yesno((int )rssconf & 512); seq_printf(seq, " SynMapEn: %3s\n", tmp___18); tmp___19 = yesno((int )rssconf & 256); seq_printf(seq, " SynLkpEn: %3s\n", tmp___19); tmp___20 = yesno((int )rssconf & 128); seq_printf(seq, " ChnEn: %3s\n", tmp___20); tmp___21 = yesno((int )rssconf & 64); seq_printf(seq, " PrtEn: %3s\n", tmp___21); tmp___22 = yesno((int )rssconf & 32); seq_printf(seq, " TnlAllLkp: %3s\n", tmp___22); tmp___23 = yesno((int )rssconf & 16); seq_printf(seq, " VrtEn: %3s\n", tmp___23); tmp___24 = yesno((int )rssconf & 8); seq_printf(seq, " CngEn: %3s\n", tmp___24); tmp___25 = yesno((int )rssconf & 4); seq_printf(seq, " HashToeplitz: %3s\n", tmp___25); tmp___26 = yesno((int )rssconf & 2); seq_printf(seq, " Udp4En: %3s\n", tmp___26); tmp___27 = yesno((int )rssconf & 1); seq_printf(seq, " Disable: %3s\n", tmp___27); seq_puts(seq, "\n"); rssconf = t4_read_reg(adapter, 32244U); seq_printf(seq, "TP_RSS_CONFIG_TNL: %#x\n", rssconf); seq_printf(seq, " MaskSize: %3d\n", rssconf >> 28); seq_printf(seq, " MaskFilter: %3d\n", (rssconf >> 16) & 2047U); if ((((unsigned int )adapter->params.chip >> 4) & 15U) > 5U) { tmp___28 = yesno((int )rssconf & 4); seq_printf(seq, " HashAll: %3s\n", tmp___28); tmp___29 = yesno((int )rssconf & 2); seq_printf(seq, " HashEth: %3s\n", tmp___29); } else { } tmp___30 = yesno((int )rssconf & 1); seq_printf(seq, " UseWireCh: %3s\n", tmp___30); seq_puts(seq, "\n"); rssconf = t4_read_reg(adapter, 32248U); seq_printf(seq, "TP_RSS_CONFIG_OFD: %#x\n", rssconf); seq_printf(seq, " MaskSize: %3d\n", rssconf >> 28); tmp___31 = yesno((int )rssconf & 1048576); seq_printf(seq, " RRCplMapEn: %3s\n", tmp___31); seq_printf(seq, " RRCplQueWidth: %3d\n", (rssconf >> 16) & 15U); seq_puts(seq, "\n"); rssconf = t4_read_reg(adapter, 32252U); seq_printf(seq, "TP_RSS_CONFIG_SYN: %#x\n", rssconf); seq_printf(seq, " MaskSize: %3d\n", rssconf >> 28); tmp___32 = yesno((int )rssconf & 1); seq_printf(seq, " UseWireCh: %3s\n", tmp___32); seq_puts(seq, "\n"); rssconf = t4_read_reg(adapter, 32256U); seq_printf(seq, "TP_RSS_CONFIG_VRT: %#x\n", rssconf); if ((((unsigned int )adapter->params.chip >> 4) & 15U) > 5U) { seq_printf(seq, " KeyWrAddrX: %3d\n", rssconf >> 30); tmp___33 = yesno((int )rssconf & 67108864); seq_printf(seq, " KeyExtend: %3s\n", tmp___33); } else { } tmp___34 = yesno((int )rssconf & 33554432); seq_printf(seq, " VfRdRg: %3s\n", tmp___34); tmp___35 = yesno((int )rssconf & 16777216); seq_printf(seq, " VfRdEn: %3s\n", tmp___35); tmp___36 = yesno((int )rssconf & 8388608); seq_printf(seq, " VfPerrEn: %3s\n", tmp___36); tmp___37 = yesno((int )rssconf & 4194304); seq_printf(seq, " KeyPerrEn: %3s\n", tmp___37); tmp___38 = yesno((int )rssconf & 2097152); seq_printf(seq, " DisVfVlan: %3s\n", tmp___38); tmp___39 = yesno((int )rssconf & 1048576); seq_printf(seq, " EnUpSwt: %3s\n", tmp___39); seq_printf(seq, " HashDelay: %3d\n", (rssconf >> 16) & 15U); if ((((unsigned int )adapter->params.chip >> 4) & 15U) <= 5U) { seq_printf(seq, " VfWrAddr: %3d\n", (rssconf >> 8) & 127U); } else { seq_printf(seq, " VfWrAddr: %3d\n", (rssconf >> 8) & 255U); } seq_printf(seq, " KeyMode: %s\n", keymode[(rssconf >> 6) & 3U]); tmp___40 = yesno((int )rssconf & 32); seq_printf(seq, " VfWrEn: %3s\n", tmp___40); tmp___41 = yesno((int )rssconf & 16); seq_printf(seq, " KeyWrEn: %3s\n", tmp___41); seq_printf(seq, " KeyWrAddr: %3d\n", rssconf & 15U); seq_puts(seq, "\n"); rssconf = t4_read_reg(adapter, 32260U); seq_printf(seq, "TP_RSS_CONFIG_CNG: %#x\n", rssconf); tmp___42 = yesno((long )((int )rssconf) & (-0x7FFFFFFF-1)); seq_printf(seq, " ChnCount3: %3s\n", tmp___42); tmp___43 = yesno((int )rssconf & 1073741824); seq_printf(seq, " ChnCount2: %3s\n", tmp___43); tmp___44 = yesno((int )rssconf & 536870912); seq_printf(seq, " ChnCount1: %3s\n", tmp___44); tmp___45 = yesno((int )rssconf & 268435456); seq_printf(seq, " ChnCount0: %3s\n", tmp___45); tmp___46 = yesno((int )rssconf & 134217728); seq_printf(seq, " ChnUndFlow3: %3s\n", tmp___46); tmp___47 = yesno((int )rssconf & 67108864); seq_printf(seq, " ChnUndFlow2: %3s\n", tmp___47); tmp___48 = yesno((int )rssconf & 33554432); seq_printf(seq, " ChnUndFlow1: %3s\n", tmp___48); tmp___49 = yesno((int )rssconf & 16777216); seq_printf(seq, " ChnUndFlow0: %3s\n", tmp___49); tmp___50 = yesno((int )rssconf & 524288); seq_printf(seq, " RstChn3: %3s\n", tmp___50); tmp___51 = yesno((int )rssconf & 262144); seq_printf(seq, " RstChn2: %3s\n", tmp___51); tmp___52 = yesno((int )rssconf & 131072); seq_printf(seq, " RstChn1: %3s\n", tmp___52); tmp___53 = yesno((int )rssconf & 65536); seq_printf(seq, " RstChn0: %3s\n", tmp___53); tmp___54 = yesno((int )rssconf & 32768); seq_printf(seq, " UpdVld: %3s\n", tmp___54); tmp___55 = yesno((int )rssconf & 16384); seq_printf(seq, " Xoff: %3s\n", tmp___55); tmp___56 = yesno((int )rssconf & 8192); seq_printf(seq, " UpdChn3: %3s\n", tmp___56); tmp___57 = yesno((int )rssconf & 4096); seq_printf(seq, " UpdChn2: %3s\n", tmp___57); tmp___58 = yesno((int )rssconf & 2048); seq_printf(seq, " UpdChn1: %3s\n", tmp___58); tmp___59 = yesno((int )rssconf & 1024); seq_printf(seq, " UpdChn0: %3s\n", tmp___59); seq_printf(seq, " Queue: %3d\n", rssconf & 1023U); return (0); } } static int rss_config_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & rss_config_show, inode->i_private); return (tmp); } } static struct file_operations const rss_config_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & rss_config_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int rss_key_show(struct seq_file *seq , void *v ) { u32 key[10U] ; { t4_read_rss_key((struct adapter *)seq->private, (u32 *)(& key)); seq_printf(seq, "%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x\n", key[9], key[8], key[7], key[6], key[5], key[4], key[3], key[2], key[1], key[0]); return (0); } } static int rss_key_open(struct inode *inode , struct file *file ) { int tmp ; { tmp = single_open(file, & rss_key_show, inode->i_private); return (tmp); } } static ssize_t rss_key_write(struct file *file , char const *buf , size_t count , loff_t *pos ) { int i ; int j ; u32 key[10U] ; char s[100U] ; char *p ; struct adapter *adap ; struct inode *tmp ; unsigned long tmp___0 ; unsigned int tmp___1 ; { tmp = file_inode((struct file const *)file); adap = (struct adapter *)tmp->i_private; if (count > 99UL) { return (-22L); } else { } tmp___0 = copy_from_user((void *)(& s), (void const *)buf, count); if (tmp___0 != 0UL) { return (-14L); } else { } i = (int )count; goto ldv_50574; ldv_50573: i = i - 1; ldv_50574: ; if (i > 0 && ((int )_ctype[(int )((unsigned char )s[i + -1])] & 32) != 0) { goto ldv_50573; } else { } s[i] = 0; p = (char *)(& s); i = 9; goto ldv_50580; ldv_50579: key[i] = 0U; j = 0; goto ldv_50577; ldv_50576: ; if (((int )_ctype[(int )((unsigned char )*p)] & 68) == 0) { return (-22L); } else { } tmp___1 = hex2val((int )*p); key[i] = (key[i] << 4) | tmp___1; j = j + 1; p = p + 1; ldv_50577: ; if (j <= 7) { goto ldv_50576; } else { } i = i - 1; ldv_50580: ; if (i >= 0) { goto ldv_50579; } else { } t4_write_rss_key(adap, (u32 const *)(& key), -1); return ((ssize_t )count); } } static struct file_operations const rss_key_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, & rss_key_write, 0, 0, 0, 0, 0, 0, 0, 0, & rss_key_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int rss_pf_config_show(struct seq_file *seq , void *v , int idx ) { struct rss_pf_conf *pfconf ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { if ((unsigned long )v == (unsigned long )((void *)1)) { pfconf = (struct rss_pf_conf *)seq->private + 14U; seq_printf(seq, "PF Map Index Size = %d\n\n", (pfconf->rss_pf_map >> 24) & 3U); seq_puts(seq, " RSS PF VF Hash Tuple Enable Default\n"); seq_puts(seq, " Enable IPF Mask Mask IPv6 IPv4 UDP Queue\n"); seq_puts(seq, " PF Map Chn Prt Map Size Size Four Two Four Two Four Ch1 Ch0\n"); } else { pfconf = (struct rss_pf_conf *)v; tmp = yesno((int )pfconf->rss_pf_config & 268435456); tmp___0 = yesno((int )pfconf->rss_pf_config & 16777216); tmp___1 = yesno((int )pfconf->rss_pf_config & 33554432); tmp___2 = yesno((int )pfconf->rss_pf_config & 67108864); tmp___3 = yesno((int )pfconf->rss_pf_config & 134217728); tmp___4 = yesno((int )pfconf->rss_pf_config & 536870912); tmp___5 = yesno((int )pfconf->rss_pf_config & 1073741824); tmp___6 = yesno((long )((int )pfconf->rss_pf_config) & (-0x7FFFFFFF-1)); seq_printf(seq, "%3d %3s %3s %3s %3d %3d %3d %3s %3s %3s %3s %3s %3d %3d\n", idx, tmp___6, tmp___5, tmp___4, (pfconf->rss_pf_map >> idx * 3) & 7U, (pfconf->rss_pf_mask >> idx * 4) & 15U, (pfconf->rss_pf_config >> 20) & 15U, tmp___3, tmp___2, tmp___1, tmp___0, tmp, (pfconf->rss_pf_config >> 10) & 1023U, pfconf->rss_pf_config & 1023U); } return (0); } } static int rss_pf_config_open(struct inode *inode , struct file *file ) { struct adapter *adapter ; struct seq_tab *p ; u32 rss_pf_map ; u32 rss_pf_mask ; struct rss_pf_conf *pfconf ; int pf ; { adapter = (struct adapter *)inode->i_private; p = seq_open_tab(file, 8U, 12U, 1U, & rss_pf_config_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } pfconf = (struct rss_pf_conf *)(& p->data); rss_pf_map = t4_read_rss_pf_map(adapter); rss_pf_mask = t4_read_rss_pf_mask(adapter); pf = 0; goto ldv_50604; ldv_50603: (pfconf + (unsigned long )pf)->rss_pf_map = rss_pf_map; (pfconf + (unsigned long )pf)->rss_pf_mask = rss_pf_mask; t4_read_rss_pf_config(adapter, (unsigned int )pf, & (pfconf + (unsigned long )pf)->rss_pf_config); pf = pf + 1; ldv_50604: ; if (pf <= 7) { goto ldv_50603; } else { } return (0); } } static struct file_operations const rss_pf_config_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & rss_pf_config_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static int rss_vf_config_show(struct seq_file *seq , void *v , int idx ) { struct rss_vf_conf *vfconf ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; { if ((unsigned long )v == (unsigned long )((void *)1)) { seq_puts(seq, " RSS Hash Tuple Enable\n"); seq_puts(seq, " Enable IVF Dis Enb IPv6 IPv4 UDP Def Secret Key\n"); seq_puts(seq, " VF Chn Prt Map VLAN uP Four Two Four Two Four Que Idx Hash\n"); } else { vfconf = (struct rss_vf_conf *)v; tmp = yesno((long )((int )vfconf->rss_vf_vfh) & (-0x7FFFFFFF-1)); tmp___0 = yesno((int )vfconf->rss_vf_vfh & 16); tmp___1 = yesno((int )vfconf->rss_vf_vfh & 32); tmp___2 = yesno((int )vfconf->rss_vf_vfh & 64); tmp___3 = yesno((int )vfconf->rss_vf_vfh & 32); tmp___4 = yesno((int )vfconf->rss_vf_vfh & 1073741824); tmp___5 = yesno((int )vfconf->rss_vf_vfh & 268435456); tmp___6 = yesno((int )vfconf->rss_vf_vfh & 134217728); tmp___7 = yesno((int )vfconf->rss_vf_vfh & 67108864); seq_printf(seq, "%3d %3s %3s %3d %3s %3s %3s %3s %3s %3s %3s %4d %3d %#10x\n", idx, tmp___7, tmp___6, (vfconf->rss_vf_vfh >> 8) & 255U, tmp___5, tmp___4, tmp___3, tmp___2, tmp___1, tmp___0, tmp, (vfconf->rss_vf_vfh >> 16) & 1023U, vfconf->rss_vf_vfh & 15U, vfconf->rss_vf_vfl); } return (0); } } static int rss_vf_config_open(struct inode *inode , struct file *file ) { struct adapter *adapter ; struct seq_tab *p ; struct rss_vf_conf *vfconf ; int vf ; int vfcount ; { adapter = (struct adapter *)inode->i_private; vfcount = (int )adapter->params.arch.vfcount; p = seq_open_tab(file, (unsigned int )vfcount, 8U, 1U, & rss_vf_config_show); if ((unsigned long )p == (unsigned long )((struct seq_tab *)0)) { return (-12); } else { } vfconf = (struct rss_vf_conf *)(& p->data); vf = 0; goto ldv_50626; ldv_50625: t4_read_rss_vf_config(adapter, (unsigned int )vf, & (vfconf + (unsigned long )vf)->rss_vf_vfl, & (vfconf + (unsigned long )vf)->rss_vf_vfh); vf = vf + 1; ldv_50626: ; if (vf < vfcount) { goto ldv_50625; } else { } return (0); } } static struct file_operations const rss_vf_config_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & rss_vf_config_open, 0, & seq_release_private, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; __inline static struct port_info *ethqset2pinfo(struct adapter *adap , int qset ) { int pidx ; struct port_info *pi ; struct port_info *tmp ; long tmp___0 ; { pidx = 0; goto ldv_50636; ldv_50635: tmp = adap2pinfo(adap, pidx); pi = tmp; if ((int )pi->first_qset <= qset && (int )pi->first_qset + (int )pi->nqsets > qset) { return (pi); } else { } pidx = pidx + 1; ldv_50636: ; if ((int )adap->params.nports > pidx) { goto ldv_50635; } else { } tmp___0 = ldv__builtin_expect(1L, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--08_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/11616/dscv_tempdir/dscv/ri/08_1a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c"), "i" (1889), "i" (12UL)); ldv_50638: ; goto ldv_50638; } else { } return ((struct port_info *)0); } } static int sge_qinfo_show(struct seq_file *seq , void *v ) { struct adapter *adap ; int eth_entries ; int toe_entries ; int rdma_entries ; int ciq_entries ; int ctrl_entries ; int i ; int r ; int toe_idx ; int rdma_idx ; int ciq_idx ; int ctrl_idx ; int fq_idx ; int base_qset ; struct sge_eth_rxq const *rx ; struct sge_eth_txq const *tx ; int n ; int _min1 ; int _min2 ; struct port_info *tmp ; struct port_info *tmp___0 ; unsigned int tmp___1 ; struct sge_ofld_rxq const *rx___0 ; struct sge_ofld_txq const *tx___0 ; int n___0 ; int _min1___0 ; int _min2___0 ; unsigned int tmp___2 ; struct sge_ofld_rxq const *rx___1 ; int n___1 ; int _min1___1 ; int _min2___1 ; unsigned int tmp___3 ; struct sge_ofld_rxq const *rx___2 ; int n___2 ; int _min1___2 ; int _min2___2 ; unsigned int tmp___4 ; struct sge_ctrl_txq const *tx___1 ; int n___3 ; int _min1___3 ; int _min2___3 ; struct sge_rspq const *evtq ; unsigned int tmp___5 ; { adap = (struct adapter *)seq->private; eth_entries = ((int )adap->sge.ethqsets + 3) / 4; toe_entries = ((int )adap->sge.ofldqsets + 3) / 4; rdma_entries = ((int )adap->sge.rdmaqs + 3) / 4; ciq_entries = ((int )adap->sge.rdmaciqs + 3) / 4; ctrl_entries = 1; r = (int )((unsigned int )((long )v) - 1U); toe_idx = r - eth_entries; rdma_idx = toe_idx - toe_entries; ciq_idx = rdma_idx - rdma_entries; ctrl_idx = ciq_idx - ciq_entries; fq_idx = ctrl_idx - ctrl_entries; if (r != 0) { seq_putc(seq, 10); } else { } if (r < eth_entries) { base_qset = r * 4; rx = (struct sge_eth_rxq const *)(& adap->sge.ethrxq) + (unsigned long )base_qset; tx = (struct sge_eth_txq const *)(& adap->sge.ethtxq) + (unsigned long )base_qset; _min1 = 4; _min2 = (int )adap->sge.ethqsets + r * -4; n = _min1 < _min2 ? _min1 : _min2; seq_printf(seq, "%-12s", (char *)"QType:"); i = 0; goto ldv_50664; ldv_50663: seq_printf(seq, " %16s", (char *)"Ethernet"); i = i + 1; ldv_50664: ; if (i < n) { goto ldv_50663; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Interface:"); i = 0; goto ldv_50667; ldv_50666: seq_printf(seq, " %16s", (unsigned long )(rx + (unsigned long )i)->rspq.netdev != (unsigned long )((struct net_device */* const */)0) ? (char *)(& ((rx + (unsigned long )i)->rspq.netdev)->name) : (char *)"N/A"); i = i + 1; ldv_50667: ; if (i < n) { goto ldv_50666; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ ID:"); i = 0; goto ldv_50670; ldv_50669: seq_printf(seq, " %16u", (tx + (unsigned long )i)->q.cntxt_id); i = i + 1; ldv_50670: ; if (i < n) { goto ldv_50669; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ size:"); i = 0; goto ldv_50673; ldv_50672: seq_printf(seq, " %16u", (tx + (unsigned long )i)->q.size); i = i + 1; ldv_50673: ; if (i < n) { goto ldv_50672; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ inuse:"); i = 0; goto ldv_50676; ldv_50675: seq_printf(seq, " %16u", (tx + (unsigned long )i)->q.in_use); i = i + 1; ldv_50676: ; if (i < n) { goto ldv_50675; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ CIDX:"); i = 0; goto ldv_50679; ldv_50678: seq_printf(seq, " %16u", (tx + (unsigned long )i)->q.cidx); i = i + 1; ldv_50679: ; if (i < n) { goto ldv_50678; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ PIDX:"); i = 0; goto ldv_50682; ldv_50681: seq_printf(seq, " %16u", (tx + (unsigned long )i)->q.pidx); i = i + 1; ldv_50682: ; if (i < n) { goto ldv_50681; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"DCB Prio:"); i = 0; goto ldv_50685; ldv_50684: seq_printf(seq, " %16u", (int )(tx + (unsigned long )i)->dcb_prio); i = i + 1; ldv_50685: ; if (i < n) { goto ldv_50684; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"DCB PGID:"); i = 0; goto ldv_50688; ldv_50687: tmp = ethqset2pinfo(adap, base_qset + i); seq_printf(seq, " %16u", (tmp->dcb.pgid >> (7 - (int )(tx + (unsigned long )i)->dcb_prio) * 4) & 15U); i = i + 1; ldv_50688: ; if (i < n) { goto ldv_50687; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"DCB PFC:"); i = 0; goto ldv_50691; ldv_50690: tmp___0 = ethqset2pinfo(adap, base_qset + i); seq_printf(seq, " %16u", ((int )tmp___0->dcb.pfcen >> (7 - (int )(tx + (unsigned long )i)->dcb_prio)) & 1); i = i + 1; ldv_50691: ; if (i < n) { goto ldv_50690; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ ID:"); i = 0; goto ldv_50694; ldv_50693: seq_printf(seq, " %16u", (int )(rx + (unsigned long )i)->rspq.abs_id); i = i + 1; ldv_50694: ; if (i < n) { goto ldv_50693; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ size:"); i = 0; goto ldv_50697; ldv_50696: seq_printf(seq, " %16u", (rx + (unsigned long )i)->rspq.size); i = i + 1; ldv_50697: ; if (i < n) { goto ldv_50696; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQE size:"); i = 0; goto ldv_50700; ldv_50699: seq_printf(seq, " %16u", (rx + (unsigned long )i)->rspq.iqe_len); i = i + 1; ldv_50700: ; if (i < n) { goto ldv_50699; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ CIDX:"); i = 0; goto ldv_50703; ldv_50702: seq_printf(seq, " %16u", (rx + (unsigned long )i)->rspq.cidx); i = i + 1; ldv_50703: ; if (i < n) { goto ldv_50702; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ Gen:"); i = 0; goto ldv_50706; ldv_50705: seq_printf(seq, " %16u", (int )(rx + (unsigned long )i)->rspq.gen); i = i + 1; ldv_50706: ; if (i < n) { goto ldv_50705; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr delay:"); i = 0; goto ldv_50709; ldv_50708: tmp___1 = qtimer_val((struct adapter const *)adap, & (rx + (unsigned long )i)->rspq); seq_printf(seq, " %16u", tmp___1); i = i + 1; ldv_50709: ; if (i < n) { goto ldv_50708; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr pktcnt:"); i = 0; goto ldv_50712; ldv_50711: seq_printf(seq, " %16u", (int )adap->sge.counter_val[(int )(rx + (unsigned long )i)->rspq.pktcnt_idx]); i = i + 1; ldv_50712: ; if (i < n) { goto ldv_50711; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL ID:"); i = 0; goto ldv_50715; ldv_50714: seq_printf(seq, " %16u", (rx + (unsigned long )i)->fl.cntxt_id); i = i + 1; ldv_50715: ; if (i < n) { goto ldv_50714; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL size:"); i = 0; goto ldv_50718; ldv_50717: seq_printf(seq, " %16u", (unsigned int )(rx + (unsigned long )i)->fl.size - 8U); i = i + 1; ldv_50718: ; if (i < n) { goto ldv_50717; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL pend:"); i = 0; goto ldv_50721; ldv_50720: seq_printf(seq, " %16u", (rx + (unsigned long )i)->fl.pend_cred); i = i + 1; ldv_50721: ; if (i < n) { goto ldv_50720; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL avail:"); i = 0; goto ldv_50724; ldv_50723: seq_printf(seq, " %16u", (rx + (unsigned long )i)->fl.avail); i = i + 1; ldv_50724: ; if (i < n) { goto ldv_50723; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL PIDX:"); i = 0; goto ldv_50727; ldv_50726: seq_printf(seq, " %16u", (rx + (unsigned long )i)->fl.pidx); i = i + 1; ldv_50727: ; if (i < n) { goto ldv_50726; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL CIDX:"); i = 0; goto ldv_50730; ldv_50729: seq_printf(seq, " %16u", (rx + (unsigned long )i)->fl.cidx); i = i + 1; ldv_50730: ; if (i < n) { goto ldv_50729; } else { } seq_putc(seq, 10); } else if (toe_idx < toe_entries) { rx___0 = (struct sge_ofld_rxq const *)(& adap->sge.ofldrxq) + (unsigned long )(toe_idx * 4); tx___0 = (struct sge_ofld_txq const *)(& adap->sge.ofldtxq) + (unsigned long )(toe_idx * 4); _min1___0 = 4; _min2___0 = (int )adap->sge.ofldqsets + toe_idx * -4; n___0 = _min1___0 < _min2___0 ? _min1___0 : _min2___0; seq_printf(seq, "%-12s", (char *)"QType:"); i = 0; goto ldv_50739; ldv_50738: seq_printf(seq, " %16s", (char *)"TOE"); i = i + 1; ldv_50739: ; if (i < n___0) { goto ldv_50738; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ ID:"); i = 0; goto ldv_50742; ldv_50741: seq_printf(seq, " %16u", (tx___0 + (unsigned long )i)->q.cntxt_id); i = i + 1; ldv_50742: ; if (i < n___0) { goto ldv_50741; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ size:"); i = 0; goto ldv_50745; ldv_50744: seq_printf(seq, " %16u", (tx___0 + (unsigned long )i)->q.size); i = i + 1; ldv_50745: ; if (i < n___0) { goto ldv_50744; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ inuse:"); i = 0; goto ldv_50748; ldv_50747: seq_printf(seq, " %16u", (tx___0 + (unsigned long )i)->q.in_use); i = i + 1; ldv_50748: ; if (i < n___0) { goto ldv_50747; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ CIDX:"); i = 0; goto ldv_50751; ldv_50750: seq_printf(seq, " %16u", (tx___0 + (unsigned long )i)->q.cidx); i = i + 1; ldv_50751: ; if (i < n___0) { goto ldv_50750; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ PIDX:"); i = 0; goto ldv_50754; ldv_50753: seq_printf(seq, " %16u", (tx___0 + (unsigned long )i)->q.pidx); i = i + 1; ldv_50754: ; if (i < n___0) { goto ldv_50753; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ ID:"); i = 0; goto ldv_50757; ldv_50756: seq_printf(seq, " %16u", (int )(rx___0 + (unsigned long )i)->rspq.abs_id); i = i + 1; ldv_50757: ; if (i < n___0) { goto ldv_50756; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ size:"); i = 0; goto ldv_50760; ldv_50759: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->rspq.size); i = i + 1; ldv_50760: ; if (i < n___0) { goto ldv_50759; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQE size:"); i = 0; goto ldv_50763; ldv_50762: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->rspq.iqe_len); i = i + 1; ldv_50763: ; if (i < n___0) { goto ldv_50762; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ CIDX:"); i = 0; goto ldv_50766; ldv_50765: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->rspq.cidx); i = i + 1; ldv_50766: ; if (i < n___0) { goto ldv_50765; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ Gen:"); i = 0; goto ldv_50769; ldv_50768: seq_printf(seq, " %16u", (int )(rx___0 + (unsigned long )i)->rspq.gen); i = i + 1; ldv_50769: ; if (i < n___0) { goto ldv_50768; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr delay:"); i = 0; goto ldv_50772; ldv_50771: tmp___2 = qtimer_val((struct adapter const *)adap, & (rx___0 + (unsigned long )i)->rspq); seq_printf(seq, " %16u", tmp___2); i = i + 1; ldv_50772: ; if (i < n___0) { goto ldv_50771; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr pktcnt:"); i = 0; goto ldv_50775; ldv_50774: seq_printf(seq, " %16u", (int )adap->sge.counter_val[(int )(rx___0 + (unsigned long )i)->rspq.pktcnt_idx]); i = i + 1; ldv_50775: ; if (i < n___0) { goto ldv_50774; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL ID:"); i = 0; goto ldv_50778; ldv_50777: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->fl.cntxt_id); i = i + 1; ldv_50778: ; if (i < n___0) { goto ldv_50777; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL size:"); i = 0; goto ldv_50781; ldv_50780: seq_printf(seq, " %16u", (unsigned int )(rx___0 + (unsigned long )i)->fl.size - 8U); i = i + 1; ldv_50781: ; if (i < n___0) { goto ldv_50780; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL pend:"); i = 0; goto ldv_50784; ldv_50783: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->fl.pend_cred); i = i + 1; ldv_50784: ; if (i < n___0) { goto ldv_50783; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL avail:"); i = 0; goto ldv_50787; ldv_50786: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->fl.avail); i = i + 1; ldv_50787: ; if (i < n___0) { goto ldv_50786; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL PIDX:"); i = 0; goto ldv_50790; ldv_50789: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->fl.pidx); i = i + 1; ldv_50790: ; if (i < n___0) { goto ldv_50789; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL CIDX:"); i = 0; goto ldv_50793; ldv_50792: seq_printf(seq, " %16u", (rx___0 + (unsigned long )i)->fl.cidx); i = i + 1; ldv_50793: ; if (i < n___0) { goto ldv_50792; } else { } seq_putc(seq, 10); } else if (rdma_idx < rdma_entries) { rx___1 = (struct sge_ofld_rxq const *)(& adap->sge.rdmarxq) + (unsigned long )(rdma_idx * 4); _min1___1 = 4; _min2___1 = (int )adap->sge.rdmaqs + rdma_idx * -4; n___1 = _min1___1 < _min2___1 ? _min1___1 : _min2___1; seq_printf(seq, "%-12s", (char *)"QType:"); i = 0; goto ldv_50801; ldv_50800: seq_printf(seq, " %16s", (char *)"RDMA-CPL"); i = i + 1; ldv_50801: ; if (i < n___1) { goto ldv_50800; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Interface:"); i = 0; goto ldv_50804; ldv_50803: seq_printf(seq, " %16s", (unsigned long )(rx___1 + (unsigned long )i)->rspq.netdev != (unsigned long )((struct net_device */* const */)0) ? (char *)(& ((rx___1 + (unsigned long )i)->rspq.netdev)->name) : (char *)"N/A"); i = i + 1; ldv_50804: ; if (i < n___1) { goto ldv_50803; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ ID:"); i = 0; goto ldv_50807; ldv_50806: seq_printf(seq, " %16u", (int )(rx___1 + (unsigned long )i)->rspq.abs_id); i = i + 1; ldv_50807: ; if (i < n___1) { goto ldv_50806; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ size:"); i = 0; goto ldv_50810; ldv_50809: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->rspq.size); i = i + 1; ldv_50810: ; if (i < n___1) { goto ldv_50809; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQE size:"); i = 0; goto ldv_50813; ldv_50812: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->rspq.iqe_len); i = i + 1; ldv_50813: ; if (i < n___1) { goto ldv_50812; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ CIDX:"); i = 0; goto ldv_50816; ldv_50815: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->rspq.cidx); i = i + 1; ldv_50816: ; if (i < n___1) { goto ldv_50815; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ Gen:"); i = 0; goto ldv_50819; ldv_50818: seq_printf(seq, " %16u", (int )(rx___1 + (unsigned long )i)->rspq.gen); i = i + 1; ldv_50819: ; if (i < n___1) { goto ldv_50818; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr delay:"); i = 0; goto ldv_50822; ldv_50821: tmp___3 = qtimer_val((struct adapter const *)adap, & (rx___1 + (unsigned long )i)->rspq); seq_printf(seq, " %16u", tmp___3); i = i + 1; ldv_50822: ; if (i < n___1) { goto ldv_50821; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr pktcnt:"); i = 0; goto ldv_50825; ldv_50824: seq_printf(seq, " %16u", (int )adap->sge.counter_val[(int )(rx___1 + (unsigned long )i)->rspq.pktcnt_idx]); i = i + 1; ldv_50825: ; if (i < n___1) { goto ldv_50824; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL ID:"); i = 0; goto ldv_50828; ldv_50827: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->fl.cntxt_id); i = i + 1; ldv_50828: ; if (i < n___1) { goto ldv_50827; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL size:"); i = 0; goto ldv_50831; ldv_50830: seq_printf(seq, " %16u", (unsigned int )(rx___1 + (unsigned long )i)->fl.size - 8U); i = i + 1; ldv_50831: ; if (i < n___1) { goto ldv_50830; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL pend:"); i = 0; goto ldv_50834; ldv_50833: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->fl.pend_cred); i = i + 1; ldv_50834: ; if (i < n___1) { goto ldv_50833; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL avail:"); i = 0; goto ldv_50837; ldv_50836: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->fl.avail); i = i + 1; ldv_50837: ; if (i < n___1) { goto ldv_50836; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL PIDX:"); i = 0; goto ldv_50840; ldv_50839: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->fl.pidx); i = i + 1; ldv_50840: ; if (i < n___1) { goto ldv_50839; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"FL CIDX:"); i = 0; goto ldv_50843; ldv_50842: seq_printf(seq, " %16u", (rx___1 + (unsigned long )i)->fl.cidx); i = i + 1; ldv_50843: ; if (i < n___1) { goto ldv_50842; } else { } seq_putc(seq, 10); } else if (ciq_idx < ciq_entries) { rx___2 = (struct sge_ofld_rxq const *)(& adap->sge.rdmaciq) + (unsigned long )(ciq_idx * 4); _min1___2 = 4; _min2___2 = (int )adap->sge.rdmaciqs + ciq_idx * -4; n___2 = _min1___2 < _min2___2 ? _min1___2 : _min2___2; seq_printf(seq, "%-12s", (char *)"QType:"); i = 0; goto ldv_50851; ldv_50850: seq_printf(seq, " %16s", (char *)"RDMA-CIQ"); i = i + 1; ldv_50851: ; if (i < n___2) { goto ldv_50850; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Interface:"); i = 0; goto ldv_50854; ldv_50853: seq_printf(seq, " %16s", (unsigned long )(rx___2 + (unsigned long )i)->rspq.netdev != (unsigned long )((struct net_device */* const */)0) ? (char *)(& ((rx___2 + (unsigned long )i)->rspq.netdev)->name) : (char *)"N/A"); i = i + 1; ldv_50854: ; if (i < n___2) { goto ldv_50853; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ ID:"); i = 0; goto ldv_50857; ldv_50856: seq_printf(seq, " %16u", (int )(rx___2 + (unsigned long )i)->rspq.abs_id); i = i + 1; ldv_50857: ; if (i < n___2) { goto ldv_50856; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ size:"); i = 0; goto ldv_50860; ldv_50859: seq_printf(seq, " %16u", (rx___2 + (unsigned long )i)->rspq.size); i = i + 1; ldv_50860: ; if (i < n___2) { goto ldv_50859; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQE size:"); i = 0; goto ldv_50863; ldv_50862: seq_printf(seq, " %16u", (rx___2 + (unsigned long )i)->rspq.iqe_len); i = i + 1; ldv_50863: ; if (i < n___2) { goto ldv_50862; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ CIDX:"); i = 0; goto ldv_50866; ldv_50865: seq_printf(seq, " %16u", (rx___2 + (unsigned long )i)->rspq.cidx); i = i + 1; ldv_50866: ; if (i < n___2) { goto ldv_50865; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"RspQ Gen:"); i = 0; goto ldv_50869; ldv_50868: seq_printf(seq, " %16u", (int )(rx___2 + (unsigned long )i)->rspq.gen); i = i + 1; ldv_50869: ; if (i < n___2) { goto ldv_50868; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr delay:"); i = 0; goto ldv_50872; ldv_50871: tmp___4 = qtimer_val((struct adapter const *)adap, & (rx___2 + (unsigned long )i)->rspq); seq_printf(seq, " %16u", tmp___4); i = i + 1; ldv_50872: ; if (i < n___2) { goto ldv_50871; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"Intr pktcnt:"); i = 0; goto ldv_50875; ldv_50874: seq_printf(seq, " %16u", (int )adap->sge.counter_val[(int )(rx___2 + (unsigned long )i)->rspq.pktcnt_idx]); i = i + 1; ldv_50875: ; if (i < n___2) { goto ldv_50874; } else { } seq_putc(seq, 10); } else if (ctrl_idx < ctrl_entries) { tx___1 = (struct sge_ctrl_txq const *)(& adap->sge.ctrlq) + (unsigned long )(ctrl_idx * 4); _min1___3 = 4; _min2___3 = (int )adap->params.nports + ctrl_idx * -4; n___3 = _min1___3 < _min2___3 ? _min1___3 : _min2___3; seq_printf(seq, "%-12s", (char *)"QType:"); i = 0; goto ldv_50883; ldv_50882: seq_printf(seq, " %16s", (char *)"Control"); i = i + 1; ldv_50883: ; if (i < n___3) { goto ldv_50882; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ ID:"); i = 0; goto ldv_50886; ldv_50885: seq_printf(seq, " %16u", (tx___1 + (unsigned long )i)->q.cntxt_id); i = i + 1; ldv_50886: ; if (i < n___3) { goto ldv_50885; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ size:"); i = 0; goto ldv_50889; ldv_50888: seq_printf(seq, " %16u", (tx___1 + (unsigned long )i)->q.size); i = i + 1; ldv_50889: ; if (i < n___3) { goto ldv_50888; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ inuse:"); i = 0; goto ldv_50892; ldv_50891: seq_printf(seq, " %16u", (tx___1 + (unsigned long )i)->q.in_use); i = i + 1; ldv_50892: ; if (i < n___3) { goto ldv_50891; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ CIDX:"); i = 0; goto ldv_50895; ldv_50894: seq_printf(seq, " %16u", (tx___1 + (unsigned long )i)->q.cidx); i = i + 1; ldv_50895: ; if (i < n___3) { goto ldv_50894; } else { } seq_putc(seq, 10); seq_printf(seq, "%-12s", (char *)"TxQ PIDX:"); i = 0; goto ldv_50898; ldv_50897: seq_printf(seq, " %16u", (tx___1 + (unsigned long )i)->q.pidx); i = i + 1; ldv_50898: ; if (i < n___3) { goto ldv_50897; } else { } seq_putc(seq, 10); } else if (fq_idx == 0) { evtq = (struct sge_rspq const *)(& adap->sge.fw_evtq); seq_printf(seq, "%-12s %16s\n", (char *)"QType:", (char *)"FW event queue"); seq_printf(seq, "%-12s %16u\n", (char *)"RspQ ID:", (int )evtq->abs_id); seq_printf(seq, "%-12s %16u\n", (char *)"RspQ size:", evtq->size); seq_printf(seq, "%-12s %16u\n", (char *)"RspQE size:", evtq->iqe_len); seq_printf(seq, "%-12s %16u\n", (char *)"RspQ CIDX:", evtq->cidx); seq_printf(seq, "%-12s %16u\n", (char *)"RspQ Gen:", (int )evtq->gen); tmp___5 = qtimer_val((struct adapter const *)adap, evtq); seq_printf(seq, "%-12s %16u\n", (char *)"Intr delay:", tmp___5); seq_printf(seq, "%-12s %16u\n", (char *)"Intr pktcnt:", (int )adap->sge.counter_val[(int )evtq->pktcnt_idx]); } else { } return (0); } } static int sge_queue_entries(struct adapter const *adap ) { { return ((((((int )adap->sge.ethqsets + 3) / 4 + ((int )adap->sge.ofldqsets + 3) / 4) + ((int )adap->sge.rdmaqs + 3) / 4) + ((int )adap->sge.rdmaciqs + 3) / 4) + 2); } } static void *sge_queue_start(struct seq_file *seq , loff_t *pos ) { int entries ; int tmp ; { tmp = sge_queue_entries((struct adapter const *)seq->private); entries = tmp; return (*pos < (loff_t )entries ? (void *)((unsigned long )*pos + 1UL) : (void *)0); } } static void sge_queue_stop(struct seq_file *seq , void *v ) { { return; } } static void *sge_queue_next(struct seq_file *seq , void *v , loff_t *pos ) { int entries ; int tmp ; { tmp = sge_queue_entries((struct adapter const *)seq->private); entries = tmp; *pos = *pos + 1LL; return (*pos < (loff_t )entries ? (void *)((unsigned long )*pos + 1UL) : (void *)0); } } static struct seq_operations const sge_qinfo_seq_ops = {& sge_queue_start, & sge_queue_stop, & sge_queue_next, & sge_qinfo_show}; static int sge_qinfo_open(struct inode *inode , struct file *file ) { int res ; int tmp ; struct seq_file *seq ; { tmp = ldv_seq_open_204(file, & sge_qinfo_seq_ops); res = tmp; if (res == 0) { seq = (struct seq_file *)file->private_data; seq->private = inode->i_private; } else { } return (res); } } static struct file_operations const sge_qinfo_debugfs_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & sge_qinfo_open, 0, & seq_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int mem_open(struct inode *inode , struct file *file ) { unsigned int mem ; struct adapter *adap ; { file->private_data = inode->i_private; mem = (unsigned int )((long )file->private_data) & 3U; adap = (struct adapter *)(file->private_data + - ((unsigned long )mem)); t4_fwcache(adap, 0); return (0); } } static ssize_t mem_read(struct file *file , char *buf , size_t count , loff_t *ppos ) { loff_t pos ; loff_t avail ; struct inode *tmp ; unsigned int mem ; struct adapter *adap ; __be32 *data ; int ret ; void *tmp___0 ; unsigned long tmp___1 ; { pos = *ppos; tmp = file_inode((struct file const *)file); avail = tmp->i_size; mem = (unsigned int )((long )file->private_data) & 3U; adap = (struct adapter *)(file->private_data + - ((unsigned long )mem)); if (pos < 0LL) { return (-22L); } else { } if (pos >= avail) { return (0L); } else { } if ((unsigned long long )(avail - pos) < (unsigned long long )count) { count = (size_t )(avail - pos); } else { } tmp___0 = t4_alloc_mem(count); data = (__be32 *)tmp___0; if ((unsigned long )data == (unsigned long )((__be32 *)0U)) { return (-12L); } else { } spin_lock(& adap->win0_lock); ret = t4_memory_rw(adap, 0, (int )mem, (u32 )pos, (u32 )count, (void *)data, 1); spin_unlock(& adap->win0_lock); if (ret != 0) { t4_free_mem((void *)data); return ((ssize_t )ret); } else { } tmp___1 = copy_to_user((void *)buf, (void const *)data, count); ret = (int )tmp___1; t4_free_mem((void *)data); if (ret != 0) { return (-14L); } else { } *ppos = (loff_t )((unsigned long long )pos + (unsigned long long )count); return ((ssize_t )count); } } static struct file_operations const mem_debugfs_fops = {& __this_module, & default_llseek, & mem_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static void add_debugfs_mem(struct adapter *adap , char const *name , unsigned int idx , unsigned int size_mb ) { { debugfs_create_file_size(name, 256, adap->debugfs_root, (void *)adap + (unsigned long )idx, & mem_debugfs_fops, (loff_t )(size_mb << 20)); return; } } static int blocked_fl_open(struct inode *inode , struct file *file ) { { file->private_data = inode->i_private; return (0); } } static ssize_t blocked_fl_read(struct file *filp , char *ubuf , size_t count , loff_t *ppos ) { int len ; struct adapter const *adap ; char *buf ; ssize_t size ; void *tmp ; int tmp___0 ; { adap = (struct adapter const *)filp->private_data; size = (ssize_t )((((unsigned int )adap->sge.egr_sz + 3U) / 4U + (unsigned int )adap->sge.egr_sz / 32U) + 2U); tmp = kzalloc((size_t )size, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, (size_t )(size + -1L), "%*pb\n", adap->sge.egr_sz, adap->sge.blocked_fl); tmp___0 = sprintf(buf + (unsigned long )len, "\n"); len = tmp___0 + len; size = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)buf, (size_t )len); t4_free_mem((void *)buf); return (size); } } static ssize_t blocked_fl_write(struct file *filp , char const *ubuf , size_t count , loff_t *ppos ) { int err ; unsigned long *t ; struct adapter *adap ; void *tmp ; { adap = (struct adapter *)filp->private_data; tmp = kcalloc(((unsigned long )adap->sge.egr_sz + 63UL) / 64UL, 8UL, 208U); t = (unsigned long *)tmp; if ((unsigned long )t == (unsigned long )((unsigned long *)0UL)) { return (-12L); } else { } err = bitmap_parse_user(ubuf, (unsigned int )count, t, (int )adap->sge.egr_sz); if (err != 0) { return ((ssize_t )err); } else { } bitmap_copy(adap->sge.blocked_fl, (unsigned long const *)t, adap->sge.egr_sz); t4_free_mem((void *)t); return ((ssize_t )count); } } static struct file_operations const blocked_fl_fops = {& __this_module, & generic_file_llseek, & blocked_fl_read, & blocked_fl_write, 0, 0, 0, 0, 0, 0, 0, 0, & blocked_fl_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void add_debugfs_files(struct adapter *adap , struct t4_debugfs_entry *files , unsigned int nfiles ) { int i ; { i = 0; goto ldv_50983; ldv_50982: debugfs_create_file((files + (unsigned long )i)->name, (int )(files + (unsigned long )i)->mode, adap->debugfs_root, (void *)adap + (unsigned long )(files + (unsigned long )i)->data, (files + (unsigned long )i)->ops); i = i + 1; ldv_50983: ; if ((unsigned int )i < nfiles) { goto ldv_50982; } else { } return; } } int t4_setup_debugfs(struct adapter *adap ) { int i ; u32 size ; struct dentry *de ; struct t4_debugfs_entry t4_debugfs_files[42U] ; struct t4_debugfs_entry t5_debugfs_files[2U] ; int tmp ; u32 tmp___0 ; int tmp___1 ; { size = 0U; t4_debugfs_files[0].name = "cim_la"; t4_debugfs_files[0].ops = & cim_la_fops; t4_debugfs_files[0].mode = 256U; t4_debugfs_files[0].data = 0U; t4_debugfs_files[1].name = "cim_pif_la"; t4_debugfs_files[1].ops = & cim_pif_la_fops; t4_debugfs_files[1].mode = 256U; t4_debugfs_files[1].data = 0U; t4_debugfs_files[2].name = "cim_ma_la"; t4_debugfs_files[2].ops = & cim_ma_la_fops; t4_debugfs_files[2].mode = 256U; t4_debugfs_files[2].data = 0U; t4_debugfs_files[3].name = "cim_qcfg"; t4_debugfs_files[3].ops = & cim_qcfg_fops; t4_debugfs_files[3].mode = 256U; t4_debugfs_files[3].data = 0U; t4_debugfs_files[4].name = "clk"; t4_debugfs_files[4].ops = & clk_debugfs_fops; t4_debugfs_files[4].mode = 256U; t4_debugfs_files[4].data = 0U; t4_debugfs_files[5].name = "devlog"; t4_debugfs_files[5].ops = & devlog_fops; t4_debugfs_files[5].mode = 256U; t4_debugfs_files[5].data = 0U; t4_debugfs_files[6].name = "mbox0"; t4_debugfs_files[6].ops = & mbox_debugfs_fops; t4_debugfs_files[6].mode = 384U; t4_debugfs_files[6].data = 0U; t4_debugfs_files[7].name = "mbox1"; t4_debugfs_files[7].ops = & mbox_debugfs_fops; t4_debugfs_files[7].mode = 384U; t4_debugfs_files[7].data = 1U; t4_debugfs_files[8].name = "mbox2"; t4_debugfs_files[8].ops = & mbox_debugfs_fops; t4_debugfs_files[8].mode = 384U; t4_debugfs_files[8].data = 2U; t4_debugfs_files[9].name = "mbox3"; t4_debugfs_files[9].ops = & mbox_debugfs_fops; t4_debugfs_files[9].mode = 384U; t4_debugfs_files[9].data = 3U; t4_debugfs_files[10].name = "mbox4"; t4_debugfs_files[10].ops = & mbox_debugfs_fops; t4_debugfs_files[10].mode = 384U; t4_debugfs_files[10].data = 4U; t4_debugfs_files[11].name = "mbox5"; t4_debugfs_files[11].ops = & mbox_debugfs_fops; t4_debugfs_files[11].mode = 384U; t4_debugfs_files[11].data = 5U; t4_debugfs_files[12].name = "mbox6"; t4_debugfs_files[12].ops = & mbox_debugfs_fops; t4_debugfs_files[12].mode = 384U; t4_debugfs_files[12].data = 6U; t4_debugfs_files[13].name = "mbox7"; t4_debugfs_files[13].ops = & mbox_debugfs_fops; t4_debugfs_files[13].mode = 384U; t4_debugfs_files[13].data = 7U; t4_debugfs_files[14].name = "l2t"; t4_debugfs_files[14].ops = & t4_l2t_fops; t4_debugfs_files[14].mode = 256U; t4_debugfs_files[14].data = 0U; t4_debugfs_files[15].name = "mps_tcam"; t4_debugfs_files[15].ops = & mps_tcam_debugfs_fops; t4_debugfs_files[15].mode = 256U; t4_debugfs_files[15].data = 0U; t4_debugfs_files[16].name = "rss"; t4_debugfs_files[16].ops = & rss_debugfs_fops; t4_debugfs_files[16].mode = 256U; t4_debugfs_files[16].data = 0U; t4_debugfs_files[17].name = "rss_config"; t4_debugfs_files[17].ops = & rss_config_debugfs_fops; t4_debugfs_files[17].mode = 256U; t4_debugfs_files[17].data = 0U; t4_debugfs_files[18].name = "rss_key"; t4_debugfs_files[18].ops = & rss_key_debugfs_fops; t4_debugfs_files[18].mode = 256U; t4_debugfs_files[18].data = 0U; t4_debugfs_files[19].name = "rss_pf_config"; t4_debugfs_files[19].ops = & rss_pf_config_debugfs_fops; t4_debugfs_files[19].mode = 256U; t4_debugfs_files[19].data = 0U; t4_debugfs_files[20].name = "rss_vf_config"; t4_debugfs_files[20].ops = & rss_vf_config_debugfs_fops; t4_debugfs_files[20].mode = 256U; t4_debugfs_files[20].data = 0U; t4_debugfs_files[21].name = "sge_qinfo"; t4_debugfs_files[21].ops = & sge_qinfo_debugfs_fops; t4_debugfs_files[21].mode = 256U; t4_debugfs_files[21].data = 0U; t4_debugfs_files[22].name = "ibq_tp0"; t4_debugfs_files[22].ops = & cim_ibq_fops; t4_debugfs_files[22].mode = 256U; t4_debugfs_files[22].data = 0U; t4_debugfs_files[23].name = "ibq_tp1"; t4_debugfs_files[23].ops = & cim_ibq_fops; t4_debugfs_files[23].mode = 256U; t4_debugfs_files[23].data = 1U; t4_debugfs_files[24].name = "ibq_ulp"; t4_debugfs_files[24].ops = & cim_ibq_fops; t4_debugfs_files[24].mode = 256U; t4_debugfs_files[24].data = 2U; t4_debugfs_files[25].name = "ibq_sge0"; t4_debugfs_files[25].ops = & cim_ibq_fops; t4_debugfs_files[25].mode = 256U; t4_debugfs_files[25].data = 3U; t4_debugfs_files[26].name = "ibq_sge1"; t4_debugfs_files[26].ops = & cim_ibq_fops; t4_debugfs_files[26].mode = 256U; t4_debugfs_files[26].data = 4U; t4_debugfs_files[27].name = "ibq_ncsi"; t4_debugfs_files[27].ops = & cim_ibq_fops; t4_debugfs_files[27].mode = 256U; t4_debugfs_files[27].data = 5U; t4_debugfs_files[28].name = "obq_ulp0"; t4_debugfs_files[28].ops = & cim_obq_fops; t4_debugfs_files[28].mode = 256U; t4_debugfs_files[28].data = 0U; t4_debugfs_files[29].name = "obq_ulp1"; t4_debugfs_files[29].ops = & cim_obq_fops; t4_debugfs_files[29].mode = 256U; t4_debugfs_files[29].data = 1U; t4_debugfs_files[30].name = "obq_ulp2"; t4_debugfs_files[30].ops = & cim_obq_fops; t4_debugfs_files[30].mode = 256U; t4_debugfs_files[30].data = 2U; t4_debugfs_files[31].name = "obq_ulp3"; t4_debugfs_files[31].ops = & cim_obq_fops; t4_debugfs_files[31].mode = 256U; t4_debugfs_files[31].data = 3U; t4_debugfs_files[32].name = "obq_sge"; t4_debugfs_files[32].ops = & cim_obq_fops; t4_debugfs_files[32].mode = 256U; t4_debugfs_files[32].data = 4U; t4_debugfs_files[33].name = "obq_ncsi"; t4_debugfs_files[33].ops = & cim_obq_fops; t4_debugfs_files[33].mode = 256U; t4_debugfs_files[33].data = 5U; t4_debugfs_files[34].name = "tp_la"; t4_debugfs_files[34].ops = & tp_la_fops; t4_debugfs_files[34].mode = 256U; t4_debugfs_files[34].data = 0U; t4_debugfs_files[35].name = "ulprx_la"; t4_debugfs_files[35].ops = & ulprx_la_fops; t4_debugfs_files[35].mode = 256U; t4_debugfs_files[35].data = 0U; t4_debugfs_files[36].name = "sensors"; t4_debugfs_files[36].ops = & sensors_debugfs_fops; t4_debugfs_files[36].mode = 256U; t4_debugfs_files[36].data = 0U; t4_debugfs_files[37].name = "pm_stats"; t4_debugfs_files[37].ops = & pm_stats_debugfs_fops; t4_debugfs_files[37].mode = 256U; t4_debugfs_files[37].data = 0U; t4_debugfs_files[38].name = "tx_rate"; t4_debugfs_files[38].ops = & tx_rate_debugfs_fops; t4_debugfs_files[38].mode = 256U; t4_debugfs_files[38].data = 0U; t4_debugfs_files[39].name = "cctrl"; t4_debugfs_files[39].ops = & cctrl_tbl_debugfs_fops; t4_debugfs_files[39].mode = 256U; t4_debugfs_files[39].data = 0U; t4_debugfs_files[40].name = "clip_tbl"; t4_debugfs_files[40].ops = & clip_tbl_debugfs_fops; t4_debugfs_files[40].mode = 256U; t4_debugfs_files[40].data = 0U; t4_debugfs_files[41].name = "blocked_fl"; t4_debugfs_files[41].ops = & blocked_fl_fops; t4_debugfs_files[41].mode = 384U; t4_debugfs_files[41].data = 0U; t5_debugfs_files[0].name = "obq_sge_rx_q0"; t5_debugfs_files[0].ops = & cim_obq_fops; t5_debugfs_files[0].mode = 256U; t5_debugfs_files[0].data = 6U; t5_debugfs_files[1].name = "obq_sge_rx_q1"; t5_debugfs_files[1].ops = & cim_obq_fops; t5_debugfs_files[1].mode = 256U; t5_debugfs_files[1].data = 7U; add_debugfs_files(adap, (struct t4_debugfs_entry *)(& t4_debugfs_files), 42U); tmp = is_t4(adap->params.chip); if (tmp == 0) { add_debugfs_files(adap, (struct t4_debugfs_entry *)(& t5_debugfs_files), 2U); } else { } tmp___0 = t4_read_reg(adap, 30680U); i = (int )tmp___0; if (i & 1) { size = t4_read_reg(adap, 30656U); add_debugfs_mem(adap, "edc0", 0U, size & 4095U); } else { } if (((unsigned int )i & 2U) != 0U) { size = t4_read_reg(adap, 30660U); add_debugfs_mem(adap, "edc1", 1U, size & 4095U); } else { } tmp___1 = is_t5(adap->params.chip); if (tmp___1 != 0) { if (((unsigned int )i & 4U) != 0U) { size = t4_read_reg(adap, 30664U); add_debugfs_mem(adap, "mc0", 2U, size & 4095U); } else { } if (((unsigned int )i & 16U) != 0U) { size = t4_read_reg(adap, 30728U); add_debugfs_mem(adap, "mc1", 3U, size & 4095U); } else { } } else { if (((unsigned int )i & 4U) != 0U) { size = t4_read_reg(adap, 30664U); } else { } add_debugfs_mem(adap, "mc", 2U, size & 4095U); } de = debugfs_create_file_size("flash", 256, adap->debugfs_root, (void *)adap, & flash_debugfs_fops, (loff_t )adap->params.sf_size); return (0); } } void *ldv_retval_33 ; int ldv_retval_18 ; int ldv_retval_2 ; int ldv_retval_35 ; int ldv_retval_26 ; int ldv_retval_5 ; int ldv_retval_0 ; extern int ldv_release_12(void) ; void *ldv_retval_11 ; int ldv_retval_1 ; int ldv_retval_28 ; int ldv_retval_25 ; int ldv_retval_22 ; int ldv_retval_36 ; int ldv_retval_27 ; int ldv_retval_15 ; void *ldv_retval_16 ; int ldv_retval_29 ; int ldv_retval_32 ; extern int ldv_release_25(void) ; void *ldv_retval_31 ; int ldv_retval_7 ; int ldv_retval_19 ; int ldv_retval_14 ; void *ldv_retval_17 ; int ldv_retval_40 ; void *ldv_retval_12 ; int ldv_retval_6 ; int ldv_retval_39 ; extern int ldv_release_13(void) ; void *ldv_retval_34 ; int ldv_retval_13 ; int ldv_retval_10 ; int ldv_retval_9 ; int ldv_retval_4 ; void *ldv_retval_30 ; int ldv_retval_3 ; void ldv_file_operations_20(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); rss_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); rss_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_26(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); mbox_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); mbox_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_40(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_la_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_la_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_16(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); rss_vf_config_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); rss_vf_config_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_17(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); rss_pf_config_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); rss_pf_config_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_12(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); blocked_fl_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); blocked_fl_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_34(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); tp_la_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); tp_la_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_39(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_pif_la_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_pif_la_fops_group2 = (struct file *)tmp___0; return; } } void ldv_seq_operations_24(void) { void *tmp ; { tmp = ldv_init_zalloc(256UL); mps_tcam_seq_ops_group1 = (struct seq_file *)tmp; return; } } void ldv_seq_operations_15(void) { void *tmp ; { tmp = ldv_init_zalloc(256UL); sge_qinfo_seq_ops_group1 = (struct seq_file *)tmp; return; } } void ldv_file_operations_31(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); tx_rate_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); tx_rate_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_13(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); mem_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); mem_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_29(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); clk_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); clk_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_33(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); ulprx_la_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); ulprx_la_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_30(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cctrl_tbl_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cctrl_tbl_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_23(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); mps_tcam_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); mps_tcam_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_19(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); rss_config_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); rss_config_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_32(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); pm_stats_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); pm_stats_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_25(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); flash_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); flash_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_14(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); sge_qinfo_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); sge_qinfo_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_seq_operations_28(void) { void *tmp ; { tmp = ldv_init_zalloc(256UL); devlog_seq_ops_group1 = (struct seq_file *)tmp; return; } } void ldv_file_operations_38(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_ma_la_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_ma_la_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_22(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); sensors_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); sensors_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_35(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_obq_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_obq_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_37(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_qcfg_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_qcfg_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_21(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); clip_tbl_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); clip_tbl_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_36(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); cim_ibq_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); cim_ibq_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_18(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); rss_key_debugfs_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); rss_key_debugfs_fops_group2 = (struct file *)tmp___0; return; } } void ldv_file_operations_27(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(1000UL); devlog_fops_group1 = (struct inode *)tmp; tmp___0 = ldv_init_zalloc(504UL); devlog_fops_group2 = (struct file *)tmp___0; return; } } void ldv_seq_operations_41(void) { void *tmp ; { tmp = ldv_init_zalloc(256UL); seq_tab_ops_group1 = (struct seq_file *)tmp; return; } } void ldv_main_exported_35(void) { loff_t ldvarg86 ; loff_t *ldvarg87 ; void *tmp ; char *ldvarg89 ; void *tmp___0 ; size_t ldvarg88 ; int ldvarg85 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg87 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg89 = (char *)tmp___0; ldv_memset((void *)(& ldvarg86), 0, 8UL); ldv_memset((void *)(& ldvarg88), 0, 8UL); ldv_memset((void *)(& ldvarg85), 0, 4UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_35 == 1) { ldv_retval_19 = cim_obq_open(cim_obq_fops_group1, cim_obq_fops_group2); if (ldv_retval_19 == 0) { ldv_state_variable_35 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51136; case 1: ; if (ldv_state_variable_35 == 2) { ldv_seq_release_private_205(cim_obq_fops_group1, cim_obq_fops_group2); ldv_state_variable_35 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51136; case 2: ; if (ldv_state_variable_35 == 2) { seq_read(cim_obq_fops_group2, ldvarg89, ldvarg88, ldvarg87); ldv_state_variable_35 = 2; } else { } goto ldv_51136; case 3: ; if (ldv_state_variable_35 == 2) { seq_lseek(cim_obq_fops_group2, ldvarg86, ldvarg85); ldv_state_variable_35 = 2; } else { } goto ldv_51136; default: ldv_stop(); } ldv_51136: ; return; } } void ldv_main_exported_33(void) { loff_t *ldvarg2 ; void *tmp ; int ldvarg0 ; size_t ldvarg3 ; char *ldvarg4 ; void *tmp___0 ; loff_t ldvarg1 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg2 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg4 = (char *)tmp___0; ldv_memset((void *)(& ldvarg0), 0, 4UL); ldv_memset((void *)(& ldvarg3), 0, 8UL); ldv_memset((void *)(& ldvarg1), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_33 == 1) { ldv_retval_0 = ulprx_la_open(ulprx_la_fops_group1, ulprx_la_fops_group2); if (ldv_retval_0 == 0) { ldv_state_variable_33 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51150; case 1: ; if (ldv_state_variable_33 == 2) { ldv_seq_release_private_206(ulprx_la_fops_group1, ulprx_la_fops_group2); ldv_state_variable_33 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51150; case 2: ; if (ldv_state_variable_33 == 2) { seq_read(ulprx_la_fops_group2, ldvarg4, ldvarg3, ldvarg2); ldv_state_variable_33 = 2; } else { } goto ldv_51150; case 3: ; if (ldv_state_variable_33 == 2) { seq_lseek(ulprx_la_fops_group2, ldvarg1, ldvarg0); ldv_state_variable_33 = 2; } else { } goto ldv_51150; default: ldv_stop(); } ldv_51150: ; return; } } void ldv_main_exported_32(void) { char *ldvarg9 ; void *tmp ; loff_t *ldvarg10 ; void *tmp___0 ; size_t ldvarg8 ; loff_t ldvarg6 ; int ldvarg5 ; char *ldvarg12 ; void *tmp___1 ; loff_t *ldvarg7 ; void *tmp___2 ; size_t ldvarg11 ; int tmp___3 ; { tmp = ldv_init_zalloc(1UL); ldvarg9 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg10 = (loff_t *)tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg12 = (char *)tmp___1; tmp___2 = ldv_init_zalloc(8UL); ldvarg7 = (loff_t *)tmp___2; ldv_memset((void *)(& ldvarg8), 0, 8UL); ldv_memset((void *)(& ldvarg6), 0, 8UL); ldv_memset((void *)(& ldvarg5), 0, 4UL); ldv_memset((void *)(& ldvarg11), 0, 8UL); tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_32 == 1) { ldv_retval_1 = pm_stats_open(pm_stats_debugfs_fops_group1, pm_stats_debugfs_fops_group2); if (ldv_retval_1 == 0) { ldv_state_variable_32 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51167; case 1: ; if (ldv_state_variable_32 == 2) { single_release(pm_stats_debugfs_fops_group1, pm_stats_debugfs_fops_group2); ldv_state_variable_32 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51167; case 2: ; if (ldv_state_variable_32 == 1) { pm_stats_clear(pm_stats_debugfs_fops_group2, (char const *)ldvarg12, ldvarg11, ldvarg10); ldv_state_variable_32 = 1; } else { } if (ldv_state_variable_32 == 2) { pm_stats_clear(pm_stats_debugfs_fops_group2, (char const *)ldvarg12, ldvarg11, ldvarg10); ldv_state_variable_32 = 2; } else { } goto ldv_51167; case 3: ; if (ldv_state_variable_32 == 2) { seq_read(pm_stats_debugfs_fops_group2, ldvarg9, ldvarg8, ldvarg7); ldv_state_variable_32 = 2; } else { } goto ldv_51167; case 4: ; if (ldv_state_variable_32 == 2) { seq_lseek(pm_stats_debugfs_fops_group2, ldvarg6, ldvarg5); ldv_state_variable_32 = 2; } else { } goto ldv_51167; default: ldv_stop(); } ldv_51167: ; return; } } void ldv_main_exported_21(void) { loff_t *ldvarg15 ; void *tmp ; size_t ldvarg16 ; int ldvarg13 ; loff_t ldvarg14 ; char *ldvarg17 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg15 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg17 = (char *)tmp___0; ldv_memset((void *)(& ldvarg16), 0, 8UL); ldv_memset((void *)(& ldvarg13), 0, 4UL); ldv_memset((void *)(& ldvarg14), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_21 == 1) { ldv_retval_2 = clip_tbl_open(clip_tbl_debugfs_fops_group1, clip_tbl_debugfs_fops_group2); if (ldv_retval_2 == 0) { ldv_state_variable_21 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51182; case 1: ; if (ldv_state_variable_21 == 2) { single_release(clip_tbl_debugfs_fops_group1, clip_tbl_debugfs_fops_group2); ldv_state_variable_21 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51182; case 2: ; if (ldv_state_variable_21 == 2) { seq_read(clip_tbl_debugfs_fops_group2, ldvarg17, ldvarg16, ldvarg15); ldv_state_variable_21 = 2; } else { } goto ldv_51182; case 3: ; if (ldv_state_variable_21 == 2) { seq_lseek(clip_tbl_debugfs_fops_group2, ldvarg14, ldvarg13); ldv_state_variable_21 = 2; } else { } goto ldv_51182; default: ldv_stop(); } ldv_51182: ; return; } } void ldv_main_exported_26(void) { loff_t ldvarg19 ; char *ldvarg22 ; void *tmp ; char *ldvarg25 ; void *tmp___0 ; size_t ldvarg21 ; loff_t *ldvarg23 ; void *tmp___1 ; loff_t *ldvarg20 ; void *tmp___2 ; int ldvarg18 ; size_t ldvarg24 ; int tmp___3 ; { tmp = ldv_init_zalloc(1UL); ldvarg22 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg25 = (char *)tmp___0; tmp___1 = ldv_init_zalloc(8UL); ldvarg23 = (loff_t *)tmp___1; tmp___2 = ldv_init_zalloc(8UL); ldvarg20 = (loff_t *)tmp___2; ldv_memset((void *)(& ldvarg19), 0, 8UL); ldv_memset((void *)(& ldvarg21), 0, 8UL); ldv_memset((void *)(& ldvarg18), 0, 4UL); ldv_memset((void *)(& ldvarg24), 0, 8UL); tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_26 == 1) { ldv_retval_3 = mbox_open(mbox_debugfs_fops_group1, mbox_debugfs_fops_group2); if (ldv_retval_3 == 0) { ldv_state_variable_26 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51199; case 1: ; if (ldv_state_variable_26 == 2) { single_release(mbox_debugfs_fops_group1, mbox_debugfs_fops_group2); ldv_state_variable_26 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51199; case 2: ; if (ldv_state_variable_26 == 1) { mbox_write(mbox_debugfs_fops_group2, (char const *)ldvarg25, ldvarg24, ldvarg23); ldv_state_variable_26 = 1; } else { } if (ldv_state_variable_26 == 2) { mbox_write(mbox_debugfs_fops_group2, (char const *)ldvarg25, ldvarg24, ldvarg23); ldv_state_variable_26 = 2; } else { } goto ldv_51199; case 3: ; if (ldv_state_variable_26 == 2) { seq_read(mbox_debugfs_fops_group2, ldvarg22, ldvarg21, ldvarg20); ldv_state_variable_26 = 2; } else { } goto ldv_51199; case 4: ; if (ldv_state_variable_26 == 2) { seq_lseek(mbox_debugfs_fops_group2, ldvarg19, ldvarg18); ldv_state_variable_26 = 2; } else { } goto ldv_51199; default: ldv_stop(); } ldv_51199: ; return; } } void ldv_main_exported_17(void) { char *ldvarg30 ; void *tmp ; loff_t *ldvarg28 ; void *tmp___0 ; size_t ldvarg29 ; int ldvarg26 ; loff_t ldvarg27 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg30 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg28 = (loff_t *)tmp___0; ldv_memset((void *)(& ldvarg29), 0, 8UL); ldv_memset((void *)(& ldvarg26), 0, 4UL); ldv_memset((void *)(& ldvarg27), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_17 == 1) { ldv_retval_4 = rss_pf_config_open(rss_pf_config_debugfs_fops_group1, rss_pf_config_debugfs_fops_group2); if (ldv_retval_4 == 0) { ldv_state_variable_17 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51214; case 1: ; if (ldv_state_variable_17 == 2) { ldv_seq_release_private_207(rss_pf_config_debugfs_fops_group1, rss_pf_config_debugfs_fops_group2); ldv_state_variable_17 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51214; case 2: ; if (ldv_state_variable_17 == 2) { seq_read(rss_pf_config_debugfs_fops_group2, ldvarg30, ldvarg29, ldvarg28); ldv_state_variable_17 = 2; } else { } goto ldv_51214; case 3: ; if (ldv_state_variable_17 == 2) { seq_lseek(rss_pf_config_debugfs_fops_group2, ldvarg27, ldvarg26); ldv_state_variable_17 = 2; } else { } goto ldv_51214; default: ldv_stop(); } ldv_51214: ; return; } } void ldv_main_exported_22(void) { char *ldvarg148 ; void *tmp ; int ldvarg144 ; loff_t *ldvarg146 ; void *tmp___0 ; loff_t ldvarg145 ; size_t ldvarg147 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg148 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg146 = (loff_t *)tmp___0; ldv_memset((void *)(& ldvarg144), 0, 4UL); ldv_memset((void *)(& ldvarg145), 0, 8UL); ldv_memset((void *)(& ldvarg147), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_22 == 1) { ldv_retval_22 = sensors_open(sensors_debugfs_fops_group1, sensors_debugfs_fops_group2); if (ldv_retval_22 == 0) { ldv_state_variable_22 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51228; case 1: ; if (ldv_state_variable_22 == 2) { single_release(sensors_debugfs_fops_group1, sensors_debugfs_fops_group2); ldv_state_variable_22 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51228; case 2: ; if (ldv_state_variable_22 == 2) { seq_read(sensors_debugfs_fops_group2, ldvarg148, ldvarg147, ldvarg146); ldv_state_variable_22 = 2; } else { } goto ldv_51228; case 3: ; if (ldv_state_variable_22 == 2) { seq_lseek(sensors_debugfs_fops_group2, ldvarg145, ldvarg144); ldv_state_variable_22 = 2; } else { } goto ldv_51228; default: ldv_stop(); } ldv_51228: ; return; } } void ldv_main_exported_18(void) { size_t ldvarg34 ; loff_t *ldvarg36 ; void *tmp ; size_t ldvarg37 ; loff_t *ldvarg33 ; void *tmp___0 ; char *ldvarg38 ; void *tmp___1 ; int ldvarg31 ; loff_t ldvarg32 ; char *ldvarg35 ; void *tmp___2 ; int tmp___3 ; { tmp = ldv_init_zalloc(8UL); ldvarg36 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg33 = (loff_t *)tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg38 = (char *)tmp___1; tmp___2 = ldv_init_zalloc(1UL); ldvarg35 = (char *)tmp___2; ldv_memset((void *)(& ldvarg34), 0, 8UL); ldv_memset((void *)(& ldvarg37), 0, 8UL); ldv_memset((void *)(& ldvarg31), 0, 4UL); ldv_memset((void *)(& ldvarg32), 0, 8UL); tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_18 == 1) { ldv_retval_5 = rss_key_open(rss_key_debugfs_fops_group1, rss_key_debugfs_fops_group2); if (ldv_retval_5 == 0) { ldv_state_variable_18 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51245; case 1: ; if (ldv_state_variable_18 == 2) { single_release(rss_key_debugfs_fops_group1, rss_key_debugfs_fops_group2); ldv_state_variable_18 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51245; case 2: ; if (ldv_state_variable_18 == 1) { rss_key_write(rss_key_debugfs_fops_group2, (char const *)ldvarg38, ldvarg37, ldvarg36); ldv_state_variable_18 = 1; } else { } if (ldv_state_variable_18 == 2) { rss_key_write(rss_key_debugfs_fops_group2, (char const *)ldvarg38, ldvarg37, ldvarg36); ldv_state_variable_18 = 2; } else { } goto ldv_51245; case 3: ; if (ldv_state_variable_18 == 2) { seq_read(rss_key_debugfs_fops_group2, ldvarg35, ldvarg34, ldvarg33); ldv_state_variable_18 = 2; } else { } goto ldv_51245; case 4: ; if (ldv_state_variable_18 == 2) { seq_lseek(rss_key_debugfs_fops_group2, ldvarg32, ldvarg31); ldv_state_variable_18 = 2; } else { } goto ldv_51245; default: ldv_stop(); } ldv_51245: ; return; } } void ldv_main_exported_30(void) { loff_t ldvarg40 ; size_t ldvarg42 ; char *ldvarg43 ; void *tmp ; loff_t *ldvarg41 ; void *tmp___0 ; int ldvarg39 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg43 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg41 = (loff_t *)tmp___0; ldv_memset((void *)(& ldvarg40), 0, 8UL); ldv_memset((void *)(& ldvarg42), 0, 8UL); ldv_memset((void *)(& ldvarg39), 0, 4UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_30 == 1) { ldv_retval_6 = cctrl_tbl_open(cctrl_tbl_debugfs_fops_group1, cctrl_tbl_debugfs_fops_group2); if (ldv_retval_6 == 0) { ldv_state_variable_30 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51260; case 1: ; if (ldv_state_variable_30 == 2) { single_release(cctrl_tbl_debugfs_fops_group1, cctrl_tbl_debugfs_fops_group2); ldv_state_variable_30 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51260; case 2: ; if (ldv_state_variable_30 == 2) { seq_read(cctrl_tbl_debugfs_fops_group2, ldvarg43, ldvarg42, ldvarg41); ldv_state_variable_30 = 2; } else { } goto ldv_51260; case 3: ; if (ldv_state_variable_30 == 2) { seq_lseek(cctrl_tbl_debugfs_fops_group2, ldvarg40, ldvarg39); ldv_state_variable_30 = 2; } else { } goto ldv_51260; default: ldv_stop(); } ldv_51260: ; return; } } void ldv_main_exported_23(void) { size_t ldvarg158 ; int ldvarg155 ; loff_t *ldvarg157 ; void *tmp ; char *ldvarg159 ; void *tmp___0 ; loff_t ldvarg156 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg157 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg159 = (char *)tmp___0; ldv_memset((void *)(& ldvarg158), 0, 8UL); ldv_memset((void *)(& ldvarg155), 0, 4UL); ldv_memset((void *)(& ldvarg156), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_23 == 1) { ldv_retval_26 = mps_tcam_open(mps_tcam_debugfs_fops_group1, mps_tcam_debugfs_fops_group2); if (ldv_retval_26 == 0) { ldv_state_variable_23 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51274; case 1: ; if (ldv_state_variable_23 == 2) { ldv_seq_release_208(mps_tcam_debugfs_fops_group1, mps_tcam_debugfs_fops_group2); ldv_state_variable_23 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51274; case 2: ; if (ldv_state_variable_23 == 2) { seq_read(mps_tcam_debugfs_fops_group2, ldvarg159, ldvarg158, ldvarg157); ldv_state_variable_23 = 2; } else { } goto ldv_51274; case 3: ; if (ldv_state_variable_23 == 2) { seq_lseek(mps_tcam_debugfs_fops_group2, ldvarg156, ldvarg155); ldv_state_variable_23 = 2; } else { } goto ldv_51274; default: ldv_stop(); } ldv_51274: ; return; } } void ldv_main_exported_13(void) { loff_t *ldvarg152 ; void *tmp ; loff_t ldvarg151 ; size_t ldvarg153 ; char *ldvarg154 ; void *tmp___0 ; int ldvarg150 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg152 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg154 = (char *)tmp___0; ldv_memset((void *)(& ldvarg151), 0, 8UL); ldv_memset((void *)(& ldvarg153), 0, 8UL); ldv_memset((void *)(& ldvarg150), 0, 4UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_13 == 1) { ldv_retval_25 = simple_open(mem_debugfs_fops_group1, mem_debugfs_fops_group2); if (ldv_retval_25 == 0) { ldv_state_variable_13 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51288; case 1: ; if (ldv_state_variable_13 == 2) { mem_read(mem_debugfs_fops_group2, ldvarg154, ldvarg153, ldvarg152); ldv_state_variable_13 = 2; } else { } goto ldv_51288; case 2: ; if (ldv_state_variable_13 == 2) { default_llseek(mem_debugfs_fops_group2, ldvarg151, ldvarg150); ldv_state_variable_13 = 2; } else { } goto ldv_51288; case 3: ; if (ldv_state_variable_13 == 2) { ldv_release_13(); ldv_state_variable_13 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51288; default: ldv_stop(); } ldv_51288: ; return; } } void ldv_main_exported_16(void) { loff_t *ldvarg46 ; void *tmp ; size_t ldvarg47 ; int ldvarg44 ; loff_t ldvarg45 ; char *ldvarg48 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg46 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg48 = (char *)tmp___0; ldv_memset((void *)(& ldvarg47), 0, 8UL); ldv_memset((void *)(& ldvarg44), 0, 4UL); ldv_memset((void *)(& ldvarg45), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_16 == 1) { ldv_retval_7 = rss_vf_config_open(rss_vf_config_debugfs_fops_group1, rss_vf_config_debugfs_fops_group2); if (ldv_retval_7 == 0) { ldv_state_variable_16 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51302; case 1: ; if (ldv_state_variable_16 == 2) { ldv_seq_release_private_209(rss_vf_config_debugfs_fops_group1, rss_vf_config_debugfs_fops_group2); ldv_state_variable_16 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51302; case 2: ; if (ldv_state_variable_16 == 2) { seq_read(rss_vf_config_debugfs_fops_group2, ldvarg48, ldvarg47, ldvarg46); ldv_state_variable_16 = 2; } else { } goto ldv_51302; case 3: ; if (ldv_state_variable_16 == 2) { seq_lseek(rss_vf_config_debugfs_fops_group2, ldvarg45, ldvarg44); ldv_state_variable_16 = 2; } else { } goto ldv_51302; default: ldv_stop(); } ldv_51302: ; return; } } void ldv_main_exported_29(void) { int ldvarg160 ; loff_t ldvarg161 ; loff_t *ldvarg162 ; void *tmp ; size_t ldvarg163 ; char *ldvarg164 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg162 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg164 = (char *)tmp___0; ldv_memset((void *)(& ldvarg160), 0, 4UL); ldv_memset((void *)(& ldvarg161), 0, 8UL); ldv_memset((void *)(& ldvarg163), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_29 == 1) { ldv_retval_27 = clk_open(clk_debugfs_fops_group1, clk_debugfs_fops_group2); if (ldv_retval_27 == 0) { ldv_state_variable_29 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51316; case 1: ; if (ldv_state_variable_29 == 2) { single_release(clk_debugfs_fops_group1, clk_debugfs_fops_group2); ldv_state_variable_29 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51316; case 2: ; if (ldv_state_variable_29 == 2) { seq_read(clk_debugfs_fops_group2, ldvarg164, ldvarg163, ldvarg162); ldv_state_variable_29 = 2; } else { } goto ldv_51316; case 3: ; if (ldv_state_variable_29 == 2) { seq_lseek(clk_debugfs_fops_group2, ldvarg161, ldvarg160); ldv_state_variable_29 = 2; } else { } goto ldv_51316; default: ldv_stop(); } ldv_51316: ; return; } } void ldv_main_exported_25(void) { loff_t *ldvarg59 ; void *tmp ; size_t ldvarg60 ; char *ldvarg61 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg59 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg61 = (char *)tmp___0; ldv_memset((void *)(& ldvarg60), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_25 == 1) { ldv_retval_10 = mem_open(flash_debugfs_fops_group1, flash_debugfs_fops_group2); if (ldv_retval_10 == 0) { ldv_state_variable_25 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51328; case 1: ; if (ldv_state_variable_25 == 2) { flash_read(flash_debugfs_fops_group2, ldvarg61, ldvarg60, ldvarg59); ldv_state_variable_25 = 2; } else { } goto ldv_51328; case 2: ; if (ldv_state_variable_25 == 2) { ldv_release_25(); ldv_state_variable_25 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51328; default: ldv_stop(); } ldv_51328: ; return; } } void ldv_main_exported_27(void) { loff_t *ldvarg56 ; void *tmp ; loff_t ldvarg55 ; int ldvarg54 ; char *ldvarg58 ; void *tmp___0 ; size_t ldvarg57 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg56 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg58 = (char *)tmp___0; ldv_memset((void *)(& ldvarg55), 0, 8UL); ldv_memset((void *)(& ldvarg54), 0, 4UL); ldv_memset((void *)(& ldvarg57), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_27 == 1) { ldv_retval_9 = devlog_open(devlog_fops_group1, devlog_fops_group2); if (ldv_retval_9 == 0) { ldv_state_variable_27 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51341; case 1: ; if (ldv_state_variable_27 == 2) { ldv_seq_release_private_210(devlog_fops_group1, devlog_fops_group2); ldv_state_variable_27 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51341; case 2: ; if (ldv_state_variable_27 == 2) { seq_read(devlog_fops_group2, ldvarg58, ldvarg57, ldvarg56); ldv_state_variable_27 = 2; } else { } goto ldv_51341; case 3: ; if (ldv_state_variable_27 == 2) { seq_lseek(devlog_fops_group2, ldvarg55, ldvarg54); ldv_state_variable_27 = 2; } else { } goto ldv_51341; default: ldv_stop(); } ldv_51341: ; return; } } void ldv_main_exported_39(void) { char *ldvarg172 ; void *tmp ; loff_t ldvarg169 ; int ldvarg168 ; size_t ldvarg171 ; loff_t *ldvarg170 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg172 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg170 = (loff_t *)tmp___0; ldv_memset((void *)(& ldvarg169), 0, 8UL); ldv_memset((void *)(& ldvarg168), 0, 4UL); ldv_memset((void *)(& ldvarg171), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_39 == 1) { ldv_retval_28 = cim_pif_la_open(cim_pif_la_fops_group1, cim_pif_la_fops_group2); if (ldv_retval_28 == 0) { ldv_state_variable_39 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51355; case 1: ; if (ldv_state_variable_39 == 2) { ldv_seq_release_private_211(cim_pif_la_fops_group1, cim_pif_la_fops_group2); ldv_state_variable_39 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51355; case 2: ; if (ldv_state_variable_39 == 2) { seq_read(cim_pif_la_fops_group2, ldvarg172, ldvarg171, ldvarg170); ldv_state_variable_39 = 2; } else { } goto ldv_51355; case 3: ; if (ldv_state_variable_39 == 2) { seq_lseek(cim_pif_la_fops_group2, ldvarg169, ldvarg168); ldv_state_variable_39 = 2; } else { } goto ldv_51355; default: ldv_stop(); } ldv_51355: ; return; } } void ldv_main_exported_28(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_state_variable_28 == 1) { ldv_retval_12 = devlog_start(devlog_seq_ops_group1, devlog_seq_ops_group3); if ((unsigned long )ldv_retval_12 != (unsigned long )((void *)0)) { ldv_state_variable_28 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_12 == (unsigned long )((void *)0)) { ldv_state_variable_28 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51364; case 1: ; if (ldv_state_variable_28 == 3) { devlog_stop(devlog_seq_ops_group1, devlog_seq_ops_group2); ldv_state_variable_28 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_28 == 2) { devlog_stop(devlog_seq_ops_group1, devlog_seq_ops_group2); ldv_state_variable_28 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51364; case 2: ; if (ldv_state_variable_28 == 2) { devlog_show(devlog_seq_ops_group1, (void *)devlog_seq_ops_group3); ldv_state_variable_28 = 2; } else { } goto ldv_51364; case 3: ; if (ldv_state_variable_28 == 2) { ldv_retval_11 = devlog_next(devlog_seq_ops_group1, devlog_seq_ops_group2, devlog_seq_ops_group3); if ((unsigned long )ldv_retval_11 == (unsigned long )((void *)0)) { ldv_state_variable_28 = 2; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_11 != (unsigned long )((void *)0)) { ldv_state_variable_28 = 3; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51364; default: ldv_stop(); } ldv_51364: ; return; } } void ldv_main_exported_40(void) { int ldvarg62 ; loff_t *ldvarg64 ; void *tmp ; char *ldvarg66 ; void *tmp___0 ; loff_t ldvarg63 ; size_t ldvarg65 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg64 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg66 = (char *)tmp___0; ldv_memset((void *)(& ldvarg62), 0, 4UL); ldv_memset((void *)(& ldvarg63), 0, 8UL); ldv_memset((void *)(& ldvarg65), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_40 == 1) { ldv_retval_13 = cim_la_open(cim_la_fops_group1, cim_la_fops_group2); if (ldv_retval_13 == 0) { ldv_state_variable_40 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51378; case 1: ; if (ldv_state_variable_40 == 2) { ldv_seq_release_private_212(cim_la_fops_group1, cim_la_fops_group2); ldv_state_variable_40 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51378; case 2: ; if (ldv_state_variable_40 == 2) { seq_read(cim_la_fops_group2, ldvarg66, ldvarg65, ldvarg64); ldv_state_variable_40 = 2; } else { } goto ldv_51378; case 3: ; if (ldv_state_variable_40 == 2) { seq_lseek(cim_la_fops_group2, ldvarg63, ldvarg62); ldv_state_variable_40 = 2; } else { } goto ldv_51378; default: ldv_stop(); } ldv_51378: ; return; } } void ldv_main_exported_36(void) { int ldvarg173 ; size_t ldvarg176 ; loff_t ldvarg174 ; loff_t *ldvarg175 ; void *tmp ; char *ldvarg177 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg175 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg177 = (char *)tmp___0; ldv_memset((void *)(& ldvarg173), 0, 4UL); ldv_memset((void *)(& ldvarg176), 0, 8UL); ldv_memset((void *)(& ldvarg174), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_36 == 1) { ldv_retval_29 = cim_ibq_open(cim_ibq_fops_group1, cim_ibq_fops_group2); if (ldv_retval_29 == 0) { ldv_state_variable_36 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51392; case 1: ; if (ldv_state_variable_36 == 2) { ldv_seq_release_private_213(cim_ibq_fops_group1, cim_ibq_fops_group2); ldv_state_variable_36 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51392; case 2: ; if (ldv_state_variable_36 == 2) { seq_read(cim_ibq_fops_group2, ldvarg177, ldvarg176, ldvarg175); ldv_state_variable_36 = 2; } else { } goto ldv_51392; case 3: ; if (ldv_state_variable_36 == 2) { seq_lseek(cim_ibq_fops_group2, ldvarg174, ldvarg173); ldv_state_variable_36 = 2; } else { } goto ldv_51392; default: ldv_stop(); } ldv_51392: ; return; } } void ldv_main_exported_41(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_state_variable_41 == 1) { ldv_retval_31 = seq_tab_start(seq_tab_ops_group1, seq_tab_ops_group3); if ((unsigned long )ldv_retval_31 != (unsigned long )((void *)0)) { ldv_state_variable_41 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_31 == (unsigned long )((void *)0)) { ldv_state_variable_41 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51401; case 1: ; if (ldv_state_variable_41 == 3) { seq_tab_stop(seq_tab_ops_group1, seq_tab_ops_group2); ldv_state_variable_41 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_41 == 2) { seq_tab_stop(seq_tab_ops_group1, seq_tab_ops_group2); ldv_state_variable_41 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51401; case 2: ; if (ldv_state_variable_41 == 2) { seq_tab_show(seq_tab_ops_group1, (void *)seq_tab_ops_group3); ldv_state_variable_41 = 2; } else { } goto ldv_51401; case 3: ; if (ldv_state_variable_41 == 2) { ldv_retval_30 = seq_tab_next(seq_tab_ops_group1, seq_tab_ops_group2, seq_tab_ops_group3); if ((unsigned long )ldv_retval_30 == (unsigned long )((void *)0)) { ldv_state_variable_41 = 2; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_30 != (unsigned long )((void *)0)) { ldv_state_variable_41 = 3; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51401; default: ldv_stop(); } ldv_51401: ; return; } } void ldv_main_exported_12(void) { char *ldvarg185 ; void *tmp ; char *ldvarg182 ; void *tmp___0 ; size_t ldvarg181 ; loff_t *ldvarg180 ; void *tmp___1 ; loff_t ldvarg179 ; size_t ldvarg184 ; int ldvarg178 ; loff_t *ldvarg183 ; void *tmp___2 ; int tmp___3 ; { tmp = ldv_init_zalloc(1UL); ldvarg185 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg182 = (char *)tmp___0; tmp___1 = ldv_init_zalloc(8UL); ldvarg180 = (loff_t *)tmp___1; tmp___2 = ldv_init_zalloc(8UL); ldvarg183 = (loff_t *)tmp___2; ldv_memset((void *)(& ldvarg181), 0, 8UL); ldv_memset((void *)(& ldvarg179), 0, 8UL); ldv_memset((void *)(& ldvarg184), 0, 8UL); ldv_memset((void *)(& ldvarg178), 0, 4UL); tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_12 == 1) { ldv_retval_32 = blocked_fl_open(blocked_fl_fops_group1, blocked_fl_fops_group2); if (ldv_retval_32 == 0) { ldv_state_variable_12 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51418; case 1: ; if (ldv_state_variable_12 == 1) { blocked_fl_write(blocked_fl_fops_group2, (char const *)ldvarg185, ldvarg184, ldvarg183); ldv_state_variable_12 = 1; } else { } if (ldv_state_variable_12 == 2) { blocked_fl_write(blocked_fl_fops_group2, (char const *)ldvarg185, ldvarg184, ldvarg183); ldv_state_variable_12 = 2; } else { } goto ldv_51418; case 2: ; if (ldv_state_variable_12 == 2) { blocked_fl_read(blocked_fl_fops_group2, ldvarg182, ldvarg181, ldvarg180); ldv_state_variable_12 = 2; } else { } goto ldv_51418; case 3: ; if (ldv_state_variable_12 == 2) { generic_file_llseek(blocked_fl_fops_group2, ldvarg179, ldvarg178); ldv_state_variable_12 = 2; } else { } goto ldv_51418; case 4: ; if (ldv_state_variable_12 == 2) { ldv_release_12(); ldv_state_variable_12 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51418; default: ldv_stop(); } ldv_51418: ; return; } } void ldv_main_exported_14(void) { size_t ldvarg75 ; int ldvarg72 ; loff_t *ldvarg74 ; void *tmp ; char *ldvarg76 ; void *tmp___0 ; loff_t ldvarg73 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg74 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg76 = (char *)tmp___0; ldv_memset((void *)(& ldvarg75), 0, 8UL); ldv_memset((void *)(& ldvarg72), 0, 4UL); ldv_memset((void *)(& ldvarg73), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_14 == 1) { ldv_retval_15 = sge_qinfo_open(sge_qinfo_debugfs_fops_group1, sge_qinfo_debugfs_fops_group2); if (ldv_retval_15 == 0) { ldv_state_variable_14 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51433; case 1: ; if (ldv_state_variable_14 == 2) { ldv_seq_release_214(sge_qinfo_debugfs_fops_group1, sge_qinfo_debugfs_fops_group2); ldv_state_variable_14 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51433; case 2: ; if (ldv_state_variable_14 == 2) { seq_read(sge_qinfo_debugfs_fops_group2, ldvarg76, ldvarg75, ldvarg74); ldv_state_variable_14 = 2; } else { } goto ldv_51433; case 3: ; if (ldv_state_variable_14 == 2) { seq_lseek(sge_qinfo_debugfs_fops_group2, ldvarg73, ldvarg72); ldv_state_variable_14 = 2; } else { } goto ldv_51433; default: ldv_stop(); } ldv_51433: ; return; } } void ldv_main_exported_15(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_state_variable_15 == 1) { ldv_retval_34 = sge_queue_start(sge_qinfo_seq_ops_group1, sge_qinfo_seq_ops_group3); if ((unsigned long )ldv_retval_34 == (unsigned long )((void *)0)) { ldv_state_variable_15 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_34 != (unsigned long )((void *)0)) { ldv_state_variable_15 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51442; case 1: ; if (ldv_state_variable_15 == 3) { sge_queue_stop(sge_qinfo_seq_ops_group1, sge_qinfo_seq_ops_group2); ldv_state_variable_15 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_15 == 2) { sge_queue_stop(sge_qinfo_seq_ops_group1, sge_qinfo_seq_ops_group2); ldv_state_variable_15 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51442; case 2: ; if (ldv_state_variable_15 == 3) { sge_qinfo_show(sge_qinfo_seq_ops_group1, (void *)sge_qinfo_seq_ops_group3); ldv_state_variable_15 = 3; } else { } goto ldv_51442; case 3: ; if (ldv_state_variable_15 == 3) { ldv_retval_33 = sge_queue_next(sge_qinfo_seq_ops_group1, sge_qinfo_seq_ops_group2, sge_qinfo_seq_ops_group3); if ((unsigned long )ldv_retval_33 == (unsigned long )((void *)0)) { ldv_state_variable_15 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_33 != (unsigned long )((void *)0)) { ldv_state_variable_15 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51442; default: ldv_stop(); } ldv_51442: ; return; } } void ldv_main_exported_20(void) { loff_t *ldvarg69 ; void *tmp ; loff_t ldvarg68 ; char *ldvarg71 ; void *tmp___0 ; int ldvarg67 ; size_t ldvarg70 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg69 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg71 = (char *)tmp___0; ldv_memset((void *)(& ldvarg68), 0, 8UL); ldv_memset((void *)(& ldvarg67), 0, 4UL); ldv_memset((void *)(& ldvarg70), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_20 == 1) { ldv_retval_14 = rss_open(rss_debugfs_fops_group1, rss_debugfs_fops_group2); if (ldv_retval_14 == 0) { ldv_state_variable_20 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51456; case 1: ; if (ldv_state_variable_20 == 2) { ldv_seq_release_private_215(rss_debugfs_fops_group1, rss_debugfs_fops_group2); ldv_state_variable_20 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51456; case 2: ; if (ldv_state_variable_20 == 2) { seq_read(rss_debugfs_fops_group2, ldvarg71, ldvarg70, ldvarg69); ldv_state_variable_20 = 2; } else { } goto ldv_51456; case 3: ; if (ldv_state_variable_20 == 2) { seq_lseek(rss_debugfs_fops_group2, ldvarg68, ldvarg67); ldv_state_variable_20 = 2; } else { } goto ldv_51456; default: ldv_stop(); } ldv_51456: ; return; } } void ldv_main_exported_38(void) { loff_t ldvarg188 ; int ldvarg187 ; loff_t *ldvarg189 ; void *tmp ; size_t ldvarg190 ; char *ldvarg191 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg189 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg191 = (char *)tmp___0; ldv_memset((void *)(& ldvarg188), 0, 8UL); ldv_memset((void *)(& ldvarg187), 0, 4UL); ldv_memset((void *)(& ldvarg190), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_38 == 1) { ldv_retval_35 = cim_ma_la_open(cim_ma_la_fops_group1, cim_ma_la_fops_group2); if (ldv_retval_35 == 0) { ldv_state_variable_38 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51470; case 1: ; if (ldv_state_variable_38 == 2) { ldv_seq_release_private_216(cim_ma_la_fops_group1, cim_ma_la_fops_group2); ldv_state_variable_38 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51470; case 2: ; if (ldv_state_variable_38 == 2) { seq_read(cim_ma_la_fops_group2, ldvarg191, ldvarg190, ldvarg189); ldv_state_variable_38 = 2; } else { } goto ldv_51470; case 3: ; if (ldv_state_variable_38 == 2) { seq_lseek(cim_ma_la_fops_group2, ldvarg188, ldvarg187); ldv_state_variable_38 = 2; } else { } goto ldv_51470; default: ldv_stop(); } ldv_51470: ; return; } } void ldv_main_exported_34(void) { int ldvarg192 ; char *ldvarg199 ; void *tmp ; size_t ldvarg198 ; loff_t ldvarg193 ; loff_t *ldvarg197 ; void *tmp___0 ; loff_t *ldvarg194 ; void *tmp___1 ; char *ldvarg196 ; void *tmp___2 ; size_t ldvarg195 ; int tmp___3 ; { tmp = ldv_init_zalloc(1UL); ldvarg199 = (char *)tmp; tmp___0 = ldv_init_zalloc(8UL); ldvarg197 = (loff_t *)tmp___0; tmp___1 = ldv_init_zalloc(8UL); ldvarg194 = (loff_t *)tmp___1; tmp___2 = ldv_init_zalloc(1UL); ldvarg196 = (char *)tmp___2; ldv_memset((void *)(& ldvarg192), 0, 4UL); ldv_memset((void *)(& ldvarg198), 0, 8UL); ldv_memset((void *)(& ldvarg193), 0, 8UL); ldv_memset((void *)(& ldvarg195), 0, 8UL); tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_34 == 1) { ldv_retval_36 = tp_la_open(tp_la_fops_group1, tp_la_fops_group2); if (ldv_retval_36 == 0) { ldv_state_variable_34 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51487; case 1: ; if (ldv_state_variable_34 == 2) { ldv_seq_release_private_217(tp_la_fops_group1, tp_la_fops_group2); ldv_state_variable_34 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51487; case 2: ; if (ldv_state_variable_34 == 1) { tp_la_write(tp_la_fops_group2, (char const *)ldvarg199, ldvarg198, ldvarg197); ldv_state_variable_34 = 1; } else { } if (ldv_state_variable_34 == 2) { tp_la_write(tp_la_fops_group2, (char const *)ldvarg199, ldvarg198, ldvarg197); ldv_state_variable_34 = 2; } else { } goto ldv_51487; case 3: ; if (ldv_state_variable_34 == 2) { seq_read(tp_la_fops_group2, ldvarg196, ldvarg195, ldvarg194); ldv_state_variable_34 = 2; } else { } goto ldv_51487; case 4: ; if (ldv_state_variable_34 == 2) { seq_lseek(tp_la_fops_group2, ldvarg193, ldvarg192); ldv_state_variable_34 = 2; } else { } goto ldv_51487; default: ldv_stop(); } ldv_51487: ; return; } } void ldv_main_exported_37(void) { loff_t *ldvarg202 ; void *tmp ; loff_t ldvarg201 ; int ldvarg200 ; size_t ldvarg203 ; char *ldvarg204 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg202 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg204 = (char *)tmp___0; ldv_memset((void *)(& ldvarg201), 0, 8UL); ldv_memset((void *)(& ldvarg200), 0, 4UL); ldv_memset((void *)(& ldvarg203), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_37 == 1) { ldv_retval_39 = cim_qcfg_open(cim_qcfg_fops_group1, cim_qcfg_fops_group2); if (ldv_retval_39 == 0) { ldv_state_variable_37 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51502; case 1: ; if (ldv_state_variable_37 == 2) { single_release(cim_qcfg_fops_group1, cim_qcfg_fops_group2); ldv_state_variable_37 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51502; case 2: ; if (ldv_state_variable_37 == 2) { seq_read(cim_qcfg_fops_group2, ldvarg204, ldvarg203, ldvarg202); ldv_state_variable_37 = 2; } else { } goto ldv_51502; case 3: ; if (ldv_state_variable_37 == 2) { seq_lseek(cim_qcfg_fops_group2, ldvarg201, ldvarg200); ldv_state_variable_37 = 2; } else { } goto ldv_51502; default: ldv_stop(); } ldv_51502: ; return; } } void ldv_main_exported_24(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_state_variable_24 == 1) { ldv_retval_17 = mps_tcam_start(mps_tcam_seq_ops_group1, mps_tcam_seq_ops_group3); if ((unsigned long )ldv_retval_17 != (unsigned long )((void *)0)) { ldv_state_variable_24 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_17 == (unsigned long )((void *)0)) { ldv_state_variable_24 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51511; case 1: ; if (ldv_state_variable_24 == 3) { mps_tcam_stop(mps_tcam_seq_ops_group1, mps_tcam_seq_ops_group2); ldv_state_variable_24 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_24 == 2) { mps_tcam_stop(mps_tcam_seq_ops_group1, mps_tcam_seq_ops_group2); ldv_state_variable_24 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51511; case 2: ; if (ldv_state_variable_24 == 2) { mps_tcam_show(mps_tcam_seq_ops_group1, (void *)mps_tcam_seq_ops_group3); ldv_state_variable_24 = 2; } else { } goto ldv_51511; case 3: ; if (ldv_state_variable_24 == 2) { ldv_retval_16 = mps_tcam_next(mps_tcam_seq_ops_group1, mps_tcam_seq_ops_group2, mps_tcam_seq_ops_group3); if ((unsigned long )ldv_retval_16 != (unsigned long )((void *)0)) { ldv_state_variable_24 = 3; ref_cnt = ref_cnt + 1; } else { } if ((unsigned long )ldv_retval_16 == (unsigned long )((void *)0)) { ldv_state_variable_24 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51511; default: ldv_stop(); } ldv_51511: ; return; } } void ldv_main_exported_19(void) { int ldvarg226 ; loff_t ldvarg227 ; loff_t *ldvarg228 ; void *tmp ; size_t ldvarg229 ; char *ldvarg230 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg228 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg230 = (char *)tmp___0; ldv_memset((void *)(& ldvarg226), 0, 4UL); ldv_memset((void *)(& ldvarg227), 0, 8UL); ldv_memset((void *)(& ldvarg229), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_19 == 1) { ldv_retval_40 = rss_config_open(rss_config_debugfs_fops_group1, rss_config_debugfs_fops_group2); if (ldv_retval_40 == 0) { ldv_state_variable_19 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51525; case 1: ; if (ldv_state_variable_19 == 2) { single_release(rss_config_debugfs_fops_group1, rss_config_debugfs_fops_group2); ldv_state_variable_19 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51525; case 2: ; if (ldv_state_variable_19 == 2) { seq_read(rss_config_debugfs_fops_group2, ldvarg230, ldvarg229, ldvarg228); ldv_state_variable_19 = 2; } else { } goto ldv_51525; case 3: ; if (ldv_state_variable_19 == 2) { seq_lseek(rss_config_debugfs_fops_group2, ldvarg227, ldvarg226); ldv_state_variable_19 = 2; } else { } goto ldv_51525; default: ldv_stop(); } ldv_51525: ; return; } } void ldv_main_exported_31(void) { size_t ldvarg83 ; loff_t *ldvarg82 ; void *tmp ; int ldvarg80 ; char *ldvarg84 ; void *tmp___0 ; loff_t ldvarg81 ; int tmp___1 ; { tmp = ldv_init_zalloc(8UL); ldvarg82 = (loff_t *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg84 = (char *)tmp___0; ldv_memset((void *)(& ldvarg83), 0, 8UL); ldv_memset((void *)(& ldvarg80), 0, 4UL); ldv_memset((void *)(& ldvarg81), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_31 == 1) { ldv_retval_18 = tx_rate_open(tx_rate_debugfs_fops_group1, tx_rate_debugfs_fops_group2); if (ldv_retval_18 == 0) { ldv_state_variable_31 = 2; ref_cnt = ref_cnt + 1; } else { } } else { } goto ldv_51539; case 1: ; if (ldv_state_variable_31 == 2) { single_release(tx_rate_debugfs_fops_group1, tx_rate_debugfs_fops_group2); ldv_state_variable_31 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_51539; case 2: ; if (ldv_state_variable_31 == 2) { seq_read(tx_rate_debugfs_fops_group2, ldvarg84, ldvarg83, ldvarg82); ldv_state_variable_31 = 2; } else { } goto ldv_51539; case 3: ; if (ldv_state_variable_31 == 2) { seq_lseek(tx_rate_debugfs_fops_group2, ldvarg81, ldvarg80); ldv_state_variable_31 = 2; } else { } goto ldv_51539; default: ldv_stop(); } ldv_51539: ; return; } } bool ldv_queue_work_on_193(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_194(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_195(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_7(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_196(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_7(2); return; } } bool ldv_queue_delayed_work_on_197(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_7(& ldv_func_arg3->work, 2); return (ldv_func_res); } } int ldv_seq_release_private_198(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_199(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_200(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___5 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_201(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___6 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_open_202(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) { ldv_func_ret_type___7 ldv_func_res ; int tmp ; { tmp = seq_open(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; if (ldv_func_res == 0) { ldv_state_variable_28 = 1; ldv_seq_operations_28(); } else { } return (ldv_func_res); } } int ldv_seq_release_private_203(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___8 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_open_204(struct file *ldv_func_arg1 , struct seq_operations const *ldv_func_arg2 ) { ldv_func_ret_type___9 ldv_func_res ; int tmp ; { tmp = seq_open(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; if (ldv_func_res == 0) { ldv_state_variable_28 = 1; ldv_seq_operations_28(); } else { } return (ldv_func_res); } } int ldv_seq_release_private_205(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___15 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_206(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___16 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_207(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___17 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_208(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___13 ldv_func_res ; int tmp ; { tmp = seq_release(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_209(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___14 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_210(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___18 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_211(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___19 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_212(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___20 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_213(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___21 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_214(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___22 ldv_func_res ; int tmp ; { tmp = seq_release(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_215(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___23 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_216(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___24 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } int ldv_seq_release_private_217(struct inode *ldv_func_arg1 , struct file *ldv_func_arg2 ) { ldv_func_ret_type___25 ldv_func_res ; int tmp ; { tmp = seq_release_private(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; ldv_state_variable_28 = 0; return (ldv_func_res); } } extern void *memset(void * , int , size_t ) ; __inline static void ldv_error(void) { { ERROR: ; __VERIFIER_error(); } } bool ldv_is_err(void const *ptr ) { { return ((unsigned long )ptr > 2012UL); } } void *ldv_err_ptr(long error ) { { return ((void *)(2012L - error)); } } long ldv_ptr_err(void const *ptr ) { { return ((long )(2012UL - (unsigned long )ptr)); } } bool ldv_is_err_or_null(void const *ptr ) { bool tmp ; int tmp___0 ; { if ((unsigned long )ptr == (unsigned long )((void const *)0)) { tmp___0 = 1; } else { tmp = ldv_is_err(ptr); if ((int )tmp) { tmp___0 = 1; } else { tmp___0 = 0; } } return ((bool )tmp___0); } } int ldv_module_refcounter = 1; void ldv_module_get(struct module *module ) { { if ((unsigned long )module != (unsigned long )((struct module *)0)) { ldv_module_refcounter = ldv_module_refcounter + 1; } else { } return; } } int ldv_try_module_get(struct module *module ) { int module_get_succeeded ; { if ((unsigned long )module != (unsigned long )((struct module *)0)) { module_get_succeeded = ldv_undef_int(); if (module_get_succeeded == 1) { ldv_module_refcounter = ldv_module_refcounter + 1; return (1); } else { return (0); } } else { } return (0); } } void ldv_module_put(struct module *module ) { { if ((unsigned long )module != (unsigned long )((struct module *)0)) { if (ldv_module_refcounter <= 1) { ldv_error(); } else { } ldv_module_refcounter = ldv_module_refcounter - 1; } else { } return; } } void ldv_module_put_and_exit(void) { { ldv_module_put((struct module *)1); LDV_STOP: ; goto LDV_STOP; } } unsigned int ldv_module_refcount(void) { { return ((unsigned int )(ldv_module_refcounter + -1)); } } void ldv_check_final_state(void) { { if (ldv_module_refcounter != 1) { ldv_error(); } else { } return; } }