extern void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { __assert_fail("0", "drivers--net--wan--farsync.ko_011.5ffa6d7.43_1a.cil_true-unreach-call.i", 3, "reach_error"); } /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef __builtin_va_list __gnuc_va_list[1U]; typedef __gnuc_va_list va_list[1U]; typedef unsigned int __kernel_mode_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef long __kernel_time_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef long long __kernel_loff_t; typedef __kernel_uid_t __kernel_uid32_t; typedef __kernel_gid_t __kernel_gid32_t; typedef unsigned char __u8; 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 unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef u64 dma_addr_t; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef __kernel_mode_t mode_t; typedef __kernel_pid_t pid_t; typedef __kernel_timer_t timer_t; typedef __kernel_clockid_t clockid_t; 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 __kernel_clock_t clock_t; typedef __u16 __be16; typedef __u32 __wsum; typedef unsigned int gfp_t; typedef u64 resource_size_t; struct module; struct bug_entry { unsigned long bug_addr ; char const *file ; unsigned short line ; unsigned short flags ; }; struct completion; struct pt_regs; struct pid; 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 task_struct; struct mm_struct; struct info { long ___orig_eip ; long ___ebx ; long ___ecx ; long ___edx ; long ___esi ; long ___edi ; long ___ebp ; long ___eax ; long ___ds ; long ___es ; long ___fs ; long ___orig_eax ; long ___eip ; long ___cs ; long ___eflags ; long ___esp ; long ___ss ; long ___vm86_es ; long ___vm86_ds ; long ___vm86_fs ; long ___vm86_gs ; }; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct page; struct __anonstruct_pgd_t_6 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_6 pgd_t; struct __anonstruct_pgprot_t_7 { pgprotval_t pgprot ; }; typedef struct __anonstruct_pgprot_t_7 pgprot_t; struct __anonstruct_ldv_1843_11 { unsigned int a ; unsigned int b ; }; struct __anonstruct_ldv_1858_12 { 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_ldv_1859_10 { struct __anonstruct_ldv_1843_11 ldv_1843 ; struct __anonstruct_ldv_1858_12 ldv_1858 ; }; struct desc_struct { union __anonunion_ldv_1859_10 ldv_1859 ; }; struct __anonstruct_cpumask_t_13 { unsigned long bits[1U] ; }; typedef struct __anonstruct_cpumask_t_13 cpumask_t; struct thread_struct; struct x8664_pda { struct task_struct *pcurrent ; unsigned long data_offset ; unsigned long kernelstack ; unsigned long oldrsp ; int irqcount ; unsigned int cpunumber ; char *irqstackptr ; unsigned int nodenumber ; unsigned int __softirq_pending ; unsigned int __nmi_count ; short mmu_state ; short isidle ; struct mm_struct *active_mm ; unsigned int apic_timer_irqs ; unsigned int irq0_irqs ; unsigned int irq_resched_count ; unsigned int irq_call_count ; unsigned int irq_tlb_count ; unsigned int irq_thermal_count ; unsigned int irq_threshold_count ; unsigned int irq_spurious_count ; }; struct exec_domain; struct map_segment; struct exec_domain { char const *name ; void (*handler)(int , struct pt_regs * ) ; unsigned char pers_low ; unsigned char pers_high ; unsigned long *signal_map ; unsigned long *signal_invmap ; struct map_segment *err_map ; struct map_segment *socktype_map ; struct map_segment *sockopt_map ; struct map_segment *af_map ; struct module *module ; struct exec_domain *next ; }; struct i387_fsave_struct { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u32 status ; }; struct __anonstruct_ldv_3923_15 { u64 rip ; u64 rdp ; }; struct __anonstruct_ldv_3929_16 { u32 fip ; u32 fcs ; u32 foo ; u32 fos ; }; union __anonunion_ldv_3930_14 { struct __anonstruct_ldv_3923_15 ldv_3923 ; struct __anonstruct_ldv_3929_16 ldv_3929 ; }; struct i387_fxsave_struct { u16 cwd ; u16 swd ; u16 twd ; u16 fop ; union __anonunion_ldv_3930_14 ldv_3930 ; u32 mxcsr ; u32 mxcsr_mask ; u32 st_space[32U] ; u32 xmm_space[64U] ; u32 padding[24U] ; }; struct i387_soft_struct { 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 info *info ; u32 entry_eip ; }; union i387_union { struct i387_fsave_struct fsave ; struct i387_fxsave_struct fxsave ; struct i387_soft_struct soft ; }; struct thread_struct { struct desc_struct tls_array[3U] ; unsigned long sp0 ; unsigned long sp ; unsigned long usersp ; unsigned short es ; unsigned short ds ; unsigned short fsindex ; unsigned short gsindex ; unsigned long ip ; unsigned long fs ; unsigned long gs ; unsigned long debugreg0 ; unsigned long debugreg1 ; unsigned long debugreg2 ; unsigned long debugreg3 ; unsigned long debugreg6 ; unsigned long debugreg7 ; unsigned long cr2 ; unsigned long trap_no ; unsigned long error_code ; union i387_union i387 ; unsigned long *io_bitmap_ptr ; unsigned long iopl ; unsigned int io_bitmap_max ; unsigned long debugctlmsr ; unsigned long ds_area_msr ; }; struct __anonstruct_mm_segment_t_17 { unsigned long seg ; }; typedef struct __anonstruct_mm_segment_t_17 mm_segment_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 __anonstruct_ldv_4369_19 { unsigned long arg0 ; unsigned long arg1 ; unsigned long arg2 ; unsigned long arg3 ; }; struct __anonstruct_futex_20 { u32 *uaddr ; u32 val ; u32 flags ; u32 bitset ; u64 time ; }; union __anonunion_ldv_4377_18 { struct __anonstruct_ldv_4369_19 ldv_4369 ; struct __anonstruct_futex_20 futex ; }; struct restart_block { long (*fn)(struct restart_block * ) ; union __anonunion_ldv_4377_18 ldv_4377 ; }; struct thread_info { struct task_struct *task ; struct exec_domain *exec_domain ; __u32 flags ; __u32 status ; __u32 cpu ; int preempt_count ; mm_segment_t addr_limit ; struct restart_block restart_block ; void *sysenter_return ; }; struct __anonstruct_raw_spinlock_t_21 { unsigned int slock ; }; typedef struct __anonstruct_raw_spinlock_t_21 raw_spinlock_t; struct __anonstruct_raw_rwlock_t_22 { unsigned int lock ; }; typedef struct __anonstruct_raw_rwlock_t_22 raw_rwlock_t; 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 long usage_mask ; struct stack_trace usage_traces[9U] ; 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] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache ; char const *name ; int cpu ; }; struct held_lock { u64 prev_chain_key ; struct lock_class *class ; unsigned long acquire_ip ; struct lockdep_map *instance ; u64 waittime_stamp ; u64 holdtime_stamp ; int irq_context ; int trylock ; int read ; int check ; int hardirqs_off ; }; struct __anonstruct_spinlock_t_23 { raw_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_spinlock_t_23 spinlock_t; struct __anonstruct_rwlock_t_24 { raw_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_24 rwlock_t; struct __anonstruct_atomic_t_25 { int counter ; }; typedef struct __anonstruct_atomic_t_25 atomic_t; struct __anonstruct_atomic64_t_26 { long counter ; }; typedef struct __anonstruct_atomic64_t_26 atomic64_t; typedef atomic64_t atomic_long_t; struct __anonstruct_seqlock_t_27 { unsigned int sequence ; spinlock_t lock ; }; typedef struct __anonstruct_seqlock_t_27 seqlock_t; struct timespec { time_t tv_sec ; long tv_nsec ; }; struct key; struct file; 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; struct kobject; struct attribute { char const *name ; struct module *owner ; mode_t mode ; }; struct attribute_group { char const *name ; int (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; }; struct vm_area_struct; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(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 __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct kset; struct kobj_type; struct sysfs_dirent; struct kobject { char const *name ; struct kref kref ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct sysfs_dirent *sd ; 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 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops *sysfs_ops ; struct attribute **default_attrs ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (*filter)(struct kset * , struct kobject * ) ; char const *(*name)(struct kset * , struct kobject * ) ; int (*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 *uevent_ops ; }; struct marker; typedef void marker_probe_func(void * , void * , char const * , va_list * ); struct marker_probe_closure { marker_probe_func *func ; void *probe_private ; }; struct marker { char const *name ; char const *format ; char state ; char ptype ; void (*call)(struct marker const * , void * , char const * , ...) ; struct marker_probe_closure single ; struct marker_probe_closure *multi ; }; struct __anonstruct_nodemask_t_33 { unsigned long bits[1U] ; }; typedef struct __anonstruct_nodemask_t_33 nodemask_t; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct thread_info *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct mutex_waiter { struct list_head list ; struct task_struct *task ; struct mutex *lock ; void *magic ; }; struct rw_semaphore; struct rw_semaphore { __s32 activity ; spinlock_t wait_lock ; struct list_head wait_list ; struct lockdep_map dep_map ; }; struct ctl_table; struct device; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char should_wakeup : 1 ; struct list_head entry ; }; struct kmem_cache; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; void (*function)(unsigned long ) ; unsigned long data ; struct tvec_base *base ; void *start_site ; char start_comm[16U] ; int start_pid ; }; struct hrtimer; enum hrtimer_restart; 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 kmem_cache_cpu { void **freelist ; struct page *page ; int node ; unsigned int offset ; unsigned int objsize ; unsigned int stat[17U] ; }; struct kmem_cache_node { spinlock_t list_lock ; unsigned long nr_partial ; atomic_long_t nr_slabs ; struct list_head partial ; struct list_head full ; }; struct kmem_cache { unsigned long flags ; int size ; int objsize ; int offset ; int order ; struct kmem_cache_node local_node ; int objects ; gfp_t allocflags ; int refcount ; void (*ctor)(struct kmem_cache * , void * ) ; int inuse ; int align ; char const *name ; struct list_head list ; struct kobject kobj ; int remote_node_defrag_ratio ; struct kmem_cache_node *node[64U] ; struct kmem_cache_cpu *cpu_slab[8U] ; }; struct __anonstruct_local_t_84 { atomic_long_t a ; }; typedef struct __anonstruct_local_t_84 local_t; struct mod_arch_specific { }; struct kernel_symbol { unsigned long value ; char const *name ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; }; struct exception_table_entry; struct module_ref { local_t count ; }; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2 } ; struct module_sect_attr { struct module_attribute mattr ; char *name ; unsigned long address ; }; struct module_sect_attrs { struct attribute_group grp ; int nsections ; struct module_sect_attr attrs[0U] ; }; struct module_param_attrs; struct module_notes_attrs; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_param_attrs *param_attrs ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned int num_syms ; unsigned long const *crcs ; struct kernel_symbol const *gpl_syms ; unsigned int num_gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned int num_unused_syms ; unsigned long const *unused_crcs ; struct kernel_symbol const *unused_gpl_syms ; unsigned int num_unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; struct kernel_symbol const *gpl_future_syms ; unsigned int num_gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_exentries ; struct exception_table_entry const *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned long init_size ; unsigned long core_size ; unsigned long init_text_size ; unsigned long core_text_size ; void *unwind_info ; struct mod_arch_specific arch ; unsigned int taints ; struct list_head bug_list ; struct bug_entry *bug_table ; unsigned int num_bugs ; struct module_ref ref[8U] ; struct list_head modules_which_use_me ; struct task_struct *waiter ; void (*exit)(void) ; Elf64_Sym *symtab ; unsigned long num_symtab ; char *strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; void *percpu ; char *args ; struct marker *markers ; unsigned int num_markers ; }; struct device_driver; 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 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 completion { unsigned int done ; wait_queue_head_t wait ; }; struct klist_node; struct klist { spinlock_t k_lock ; struct list_head k_list ; void (*get)(struct klist_node * ) ; void (*put)(struct klist_node * ) ; }; struct klist_node { struct klist *n_klist ; struct list_head n_node ; struct kref n_ref ; struct completion n_removed ; }; struct semaphore { atomic_t count ; int sleepers ; wait_queue_head_t wait ; }; struct dev_archdata { void *acpi_handle ; void *iommu ; }; struct driver_private; struct class; struct class_device; struct bus_type; struct bus_type_private; struct bus_attribute { struct attribute attr ; ssize_t (*show)(struct bus_type * , char * ) ; ssize_t (*store)(struct bus_type * , char const * , size_t ) ; }; struct device_attribute; struct driver_attribute; struct bus_type { char const *name ; struct bus_attribute *bus_attrs ; struct device_attribute *dev_attrs ; struct driver_attribute *drv_attrs ; 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 (*suspend)(struct device * , pm_message_t ) ; int (*suspend_late)(struct device * , pm_message_t ) ; int (*resume_early)(struct device * ) ; int (*resume)(struct device * ) ; struct bus_type_private *p ; }; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; 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 **groups ; struct driver_private *p ; }; struct driver_attribute { struct attribute attr ; ssize_t (*show)(struct device_driver * , char * ) ; ssize_t (*store)(struct device_driver * , char const * , size_t ) ; }; struct class_attribute; struct class_device_attribute; struct class { char const *name ; struct module *owner ; struct kset subsys ; struct list_head children ; struct list_head devices ; struct list_head interfaces ; struct kset class_dirs ; struct semaphore sem ; struct class_attribute *class_attrs ; struct class_device_attribute *class_dev_attrs ; struct device_attribute *dev_attrs ; int (*uevent)(struct class_device * , struct kobj_uevent_env * ) ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; void (*release)(struct class_device * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; }; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , char * ) ; ssize_t (*store)(struct class * , char const * , size_t ) ; }; struct class_device_attribute { struct attribute attr ; ssize_t (*show)(struct class_device * , char * ) ; ssize_t (*store)(struct class_device * , char const * , size_t ) ; }; struct class_device { struct list_head node ; struct kobject kobj ; struct class *class ; dev_t devt ; struct device *dev ; void *class_data ; struct class_device *parent ; struct attribute_group **groups ; void (*release)(struct class_device * ) ; int (*uevent)(struct class_device * , struct kobj_uevent_env * ) ; char class_id[20U] ; }; struct device_type { char const *name ; struct attribute_group **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; void (*release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; }; 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 device { struct klist klist_children ; struct klist_node knode_parent ; struct klist_node knode_driver ; struct klist_node knode_bus ; struct device *parent ; struct kobject kobj ; char bus_id[20U] ; struct device_type *type ; unsigned char is_registered : 1 ; unsigned char uevent_suppress : 1 ; struct semaphore sem ; struct bus_type *bus ; struct device_driver *driver ; void *driver_data ; void *platform_data ; struct dev_pm_info power ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; spinlock_t devres_lock ; struct list_head devres_head ; struct list_head node ; struct class *class ; dev_t devt ; struct attribute_group **groups ; void (*release)(struct device * ) ; }; 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 pci_bus; struct proc_dir_entry; struct pci_driver; struct pci_dev { struct list_head global_list ; struct list_head bus_list ; struct pci_bus *bus ; struct pci_bus *subordinate ; void *sysdata ; struct proc_dir_entry *procent ; 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_type ; u8 rom_base_reg ; u8 pin ; struct pci_driver *driver ; u64 dma_mask ; struct device_dma_parameters dma_parms ; pci_power_t current_state ; pci_channel_state_t error_state ; struct device dev ; int cfg_size ; unsigned int irq ; struct resource resource[12U] ; unsigned char transparent : 1 ; unsigned char multifunction : 1 ; unsigned char is_busmaster : 1 ; unsigned char no_msi : 1 ; unsigned char no_d1d2 : 1 ; unsigned char block_ucfg_access : 1 ; unsigned char broken_parity_status : 1 ; unsigned char msi_enabled : 1 ; unsigned char msix_enabled : 1 ; unsigned char is_managed : 1 ; unsigned char is_pcie : 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[12U] ; struct list_head msi_list ; }; struct pci_ops; struct pci_bus { struct list_head node ; struct pci_bus *parent ; struct list_head children ; struct list_head devices ; struct pci_dev *self ; struct resource *resource[8U] ; struct pci_ops *ops ; void *sysdata ; struct proc_dir_entry *procdir ; unsigned char number ; unsigned char primary ; unsigned char secondary ; unsigned char subordinate ; 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 ; }; struct pci_ops { 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 ; unsigned char use_driver_data : 1 ; }; 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 (*resume)(struct pci_dev * ) ; }; struct pci_driver { struct list_head node ; char *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 * ) ; struct pci_error_handlers *err_handler ; struct device_driver driver ; struct pci_dynids dynids ; }; 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 prio_tree_node; struct raw_prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; }; struct prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; unsigned long start ; unsigned long last ; }; struct __anonstruct_mm_context_t_86 { void *ldt ; rwlock_t ldtlock ; int size ; struct mutex lock ; void *vdso ; }; typedef struct __anonstruct_mm_context_t_86 mm_context_t; struct address_space; typedef atomic_long_t mm_counter_t; union __anonunion_ldv_10288_87 { atomic_t _mapcount ; unsigned int inuse ; }; struct __anonstruct_ldv_10293_89 { unsigned long private ; struct address_space *mapping ; }; struct __anonstruct_ldv_10298_90 { struct kmem_cache *slab ; void *end ; }; union __anonunion_ldv_10300_88 { struct __anonstruct_ldv_10293_89 ldv_10293 ; spinlock_t ptl ; struct __anonstruct_ldv_10298_90 ldv_10298 ; struct page *first_page ; }; union __anonunion_ldv_10304_91 { unsigned long index ; void *freelist ; }; struct page { unsigned long flags ; atomic_t _count ; union __anonunion_ldv_10288_87 ldv_10288 ; union __anonunion_ldv_10300_88 ldv_10300 ; union __anonunion_ldv_10304_91 ldv_10304 ; struct list_head lru ; unsigned long page_cgroup ; }; struct __anonstruct_vm_set_93 { struct list_head list ; void *parent ; struct vm_area_struct *head ; }; union __anonunion_shared_92 { struct __anonstruct_vm_set_93 vm_set ; struct raw_prio_tree_node prio_tree_node ; }; struct anon_vma; struct vm_operations_struct; struct mempolicy; struct vm_area_struct { struct mm_struct *vm_mm ; unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; pgprot_t vm_page_prot ; unsigned long vm_flags ; struct rb_node vm_rb ; union __anonunion_shared_92 shared ; struct list_head anon_vma_node ; struct anon_vma *anon_vma ; struct vm_operations_struct *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; unsigned long vm_truncate_count ; struct mempolicy *vm_policy ; }; struct kioctx; struct mem_cgroup; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; struct vm_area_struct *mmap_cache ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; void (*unmap_area)(struct mm_struct * , unsigned long ) ; unsigned long mmap_base ; unsigned long task_size ; unsigned long cached_hole_size ; unsigned long free_area_cache ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; int map_count ; struct rw_semaphore mmap_sem ; spinlock_t page_table_lock ; struct list_head mmlist ; mm_counter_t _file_rss ; mm_counter_t _anon_rss ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long reserved_vm ; unsigned long def_flags ; unsigned long nr_ptes ; 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[38U] ; cpumask_t cpu_vm_mask ; mm_context_t context ; unsigned int faultstamp ; unsigned int token_priority ; unsigned int last_interval ; unsigned long flags ; int core_waiters ; struct completion *core_startup_done ; struct completion core_done ; rwlock_t ioctx_list_lock ; struct kioctx *ioctx_list ; struct mem_cgroup *mem_cgroup ; }; struct user_struct; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *page ; }; 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 * ) ; struct page *(*nopage)(struct vm_area_struct * , unsigned long , int * ) ; unsigned long (*nopfn)(struct vm_area_struct * , unsigned long ) ; int (*page_mkwrite)(struct vm_area_struct * , struct page * ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; int (*migrate)(struct vm_area_struct * , nodemask_t const * , nodemask_t const * , unsigned long ) ; }; typedef unsigned short sa_family_t; struct sockaddr { sa_family_t sa_family ; char sa_data[14U] ; }; struct __anonstruct_sync_serial_settings_94 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; }; typedef struct __anonstruct_sync_serial_settings_94 sync_serial_settings; struct __anonstruct_te1_settings_95 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; unsigned int slot_map ; }; typedef struct __anonstruct_te1_settings_95 te1_settings; struct __anonstruct_raw_hdlc_proto_96 { unsigned short encoding ; unsigned short parity ; }; typedef struct __anonstruct_raw_hdlc_proto_96 raw_hdlc_proto; struct __anonstruct_fr_proto_97 { 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_97 fr_proto; struct __anonstruct_fr_proto_pvc_98 { unsigned int dlci ; }; typedef struct __anonstruct_fr_proto_pvc_98 fr_proto_pvc; struct __anonstruct_fr_proto_pvc_info_99 { unsigned int dlci ; char master[16U] ; }; typedef struct __anonstruct_fr_proto_pvc_info_99 fr_proto_pvc_info; struct __anonstruct_cisco_proto_100 { unsigned int interval ; unsigned int timeout ; }; typedef struct __anonstruct_cisco_proto_100 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_101 { 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_101 ifs_ifsu ; }; union __anonunion_ifr_ifrn_102 { char ifrn_name[16U] ; }; union __anonunion_ifr_ifru_103 { 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_102 ifr_ifrn ; union __anonunion_ifr_ifru_103 ifr_ifru ; }; struct pipe_inode_info; struct net; struct sock; struct nsproxy; struct ctl_table_header; typedef int ctl_handler(struct ctl_table * , int * , int , void * , size_t * , void * , size_t ); typedef int proc_handler(struct ctl_table * , int , struct file * , void * , size_t * , loff_t * ); struct ctl_table { int ctl_name ; char const *procname ; void *data ; int maxlen ; mode_t mode ; struct ctl_table *child ; struct ctl_table *parent ; proc_handler *proc_handler ; ctl_handler *strategy ; void *extra1 ; void *extra2 ; }; struct ctl_table_root { struct list_head root_list ; struct list_head header_list ; struct list_head *(*lookup)(struct ctl_table_root * , struct nsproxy * ) ; }; struct ctl_table_header { struct ctl_table *ctl_table ; struct list_head ctl_entry ; int used ; struct completion *unregistering ; struct ctl_table *ctl_table_arg ; struct ctl_table_root *root ; }; struct exception_table_entry { unsigned long insn ; unsigned long fixup ; }; struct sk_buff; struct rcu_head { struct rcu_head *next ; void (*func)(struct rcu_head * ) ; }; typedef s32 dma_cookie_t; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; enum hrtimer_cb_mode { HRTIMER_CB_SOFTIRQ = 0, HRTIMER_CB_IRQSAFE = 1, HRTIMER_CB_IRQSAFE_NO_RESTART = 2, HRTIMER_CB_IRQSAFE_NO_SOFTIRQ = 3 } ; struct hrtimer { struct rb_node node ; ktime_t expires ; enum hrtimer_restart (*function)(struct hrtimer * ) ; struct hrtimer_clock_base *base ; unsigned long state ; enum hrtimer_cb_mode cb_mode ; struct list_head cb_entry ; void *start_site ; char start_comm[16U] ; int start_pid ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; clockid_t index ; struct rb_root active ; struct rb_node *first ; ktime_t resolution ; ktime_t (*get_time)(void) ; ktime_t (*get_softirq_time)(void) ; ktime_t softirq_time ; ktime_t offset ; int (*reprogram)(struct hrtimer * , struct hrtimer_clock_base * , ktime_t ) ; }; struct hrtimer_cpu_base { spinlock_t lock ; struct lock_class_key lock_key ; struct hrtimer_clock_base clock_base[2U] ; struct list_head cb_pending ; ktime_t expires_next ; int hres_active ; unsigned long nr_events ; }; struct net_device; struct nf_conntrack { atomic_t use ; }; struct nf_bridge_info { atomic_t use ; struct net_device *physindev ; struct net_device *physoutdev ; unsigned int mask ; unsigned long data[4U] ; }; typedef unsigned int sk_buff_data_t; struct dst_entry; struct sec_path; struct __anonstruct_ldv_14306_107 { __u16 csum_start ; __u16 csum_offset ; }; union __anonunion_ldv_14307_106 { __wsum csum ; struct __anonstruct_ldv_14306_107 ldv_14306 ; }; struct sk_buff { struct sk_buff *next ; struct sk_buff *prev ; struct sock *sk ; ktime_t tstamp ; struct net_device *dev ; struct dst_entry *dst ; struct sec_path *sp ; char cb[48U] ; unsigned int len ; unsigned int data_len ; __u16 mac_len ; __u16 hdr_len ; union __anonunion_ldv_14307_106 ldv_14307 ; __u32 priority ; unsigned char local_df : 1 ; unsigned char cloned : 1 ; unsigned char ip_summed : 2 ; unsigned char nohdr : 1 ; unsigned char nfctinfo : 3 ; unsigned char pkt_type : 3 ; unsigned char fclone : 2 ; unsigned char ipvs_property : 1 ; unsigned char peeked : 1 ; unsigned char nf_trace : 1 ; __be16 protocol ; void (*destructor)(struct sk_buff * ) ; struct nf_conntrack *nfct ; struct sk_buff *nfct_reasm ; struct nf_bridge_info *nf_bridge ; int iif ; __u16 queue_mapping ; __u16 tc_index ; __u16 tc_verd ; dma_cookie_t dma_cookie ; __u32 secmark ; __u32 mark ; sk_buff_data_t transport_header ; sk_buff_data_t network_header ; sk_buff_data_t mac_header ; sk_buff_data_t tail ; sk_buff_data_t end ; unsigned char *head ; unsigned char *data ; unsigned int truesize ; atomic_t users ; }; struct netns_unix { int sysctl_max_dgram_qlen ; struct ctl_table_header *ctl ; }; struct netns_packet { rwlock_t sklist_lock ; struct hlist_head sklist ; }; struct netns_frags { int nqueues ; atomic_t mem ; struct list_head lru_list ; int timeout ; int high_thresh ; int low_thresh ; }; struct ipv4_devconf; struct fib_rules_ops; struct xt_table; struct netns_ipv4 { struct ctl_table_header *forw_hdr ; struct ctl_table_header *frags_hdr ; struct ipv4_devconf *devconf_all ; struct ipv4_devconf *devconf_dflt ; struct fib_rules_ops *rules_ops ; struct hlist_head *fib_table_hash ; struct sock *fibnl ; 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 netns_sysctl_ipv6 { struct ctl_table_header *table ; struct ctl_table_header *frags_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 icmpv6_time ; }; struct ipv6_devconf; struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl ; struct ipv6_devconf *devconf_all ; struct ipv6_devconf *devconf_dflt ; struct netns_frags frags ; struct xt_table *ip6table_filter ; struct xt_table *ip6table_mangle ; struct xt_table *ip6table_raw ; }; struct netns_xt { struct list_head tables[34U] ; }; struct net { atomic_t count ; atomic_t use_count ; struct list_head list ; struct work_struct work ; struct proc_dir_entry *proc_net ; struct proc_dir_entry *proc_net_stat ; struct list_head sysctl_table_headers ; struct net_device *loopback_dev ; struct list_head dev_base_head ; struct hlist_head *dev_name_head ; struct hlist_head *dev_index_head ; struct list_head rules_ops ; spinlock_t rules_mod_lock ; struct sock *rtnl ; struct ctl_table_header *sysctl_core_hdr ; int sysctl_somaxconn ; struct netns_packet packet ; struct netns_unix unx ; struct netns_ipv4 ipv4 ; struct netns_ipv6 ipv6 ; struct netns_xt xt ; }; struct vlan_group; struct ethtool_ops; struct netpoll_info; struct wireless_dev; struct net_device_subqueue { unsigned long state ; }; 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 neighbour; struct neigh_parms; struct dev_addr_list { struct dev_addr_list *next ; u8 da_addr[32U] ; u8 da_addrlen ; u8 da_synced ; int da_users ; int da_gusers ; }; struct hh_cache { struct hh_cache *hh_next ; atomic_t hh_refcnt ; __be16 hh_type ; u16 hh_len ; int (*hh_output)(struct sk_buff * ) ; seqlock_t hh_lock ; unsigned long hh_data[12U] ; }; 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 (*rebuild)(struct sk_buff * ) ; int (*cache)(struct neighbour const * , struct hh_cache * ) ; void (*cache_update)(struct hh_cache * , struct net_device const * , unsigned char const * ) ; }; enum ldv_13209 { NETREG_UNINITIALIZED = 0, NETREG_REGISTERED = 1, NETREG_UNREGISTERING = 2, NETREG_UNREGISTERED = 3, NETREG_RELEASED = 4 } ; struct iw_handler_def; struct iw_public_data; struct Qdisc; struct net_bridge_port; struct macvlan_port; struct rtnl_link_ops; struct net_device { char name[16U] ; struct hlist_node name_hlist ; unsigned long mem_end ; unsigned long mem_start ; unsigned long base_addr ; unsigned int irq ; unsigned char if_port ; unsigned char dma ; unsigned long state ; struct list_head dev_list ; struct list_head napi_list ; int (*init)(struct net_device * ) ; unsigned long features ; struct net_device *next_sched ; int ifindex ; int iflink ; struct net_device_stats *(*get_stats)(struct net_device * ) ; struct net_device_stats stats ; struct iw_handler_def const *wireless_handlers ; struct iw_public_data *wireless_data ; struct ethtool_ops const *ethtool_ops ; struct header_ops const *header_ops ; unsigned int flags ; unsigned short gflags ; unsigned short priv_flags ; unsigned short padded ; unsigned char operstate ; unsigned char link_mode ; unsigned int mtu ; unsigned short type ; unsigned short hard_header_len ; struct net_device *master ; unsigned char perm_addr[32U] ; unsigned char addr_len ; unsigned short dev_id ; struct dev_addr_list *uc_list ; int uc_count ; int uc_promisc ; struct dev_addr_list *mc_list ; int mc_count ; int promiscuity ; int allmulti ; void *atalk_ptr ; void *ip_ptr ; void *dn_ptr ; void *ip6_ptr ; void *ec_ptr ; void *ax25_ptr ; struct wireless_dev *ieee80211_ptr ; unsigned long last_rx ; unsigned char dev_addr[32U] ; unsigned char broadcast[32U] ; spinlock_t ingress_lock ; struct Qdisc *qdisc_ingress ; spinlock_t queue_lock ; struct Qdisc *qdisc ; struct Qdisc *qdisc_sleeping ; struct list_head qdisc_list ; unsigned long tx_queue_len ; struct sk_buff *gso_skb ; spinlock_t _xmit_lock ; int xmit_lock_owner ; void *priv ; int (*hard_start_xmit)(struct sk_buff * , struct net_device * ) ; unsigned long trans_start ; int watchdog_timeo ; struct timer_list watchdog_timer ; atomic_t refcnt ; struct list_head todo_list ; struct hlist_node index_hlist ; struct net_device *link_watch_next ; enum ldv_13209 reg_state ; void (*uninit)(struct net_device * ) ; void (*destructor)(struct net_device * ) ; int (*open)(struct net_device * ) ; int (*stop)(struct net_device * ) ; void (*change_rx_flags)(struct net_device * , int ) ; void (*set_rx_mode)(struct net_device * ) ; void (*set_multicast_list)(struct net_device * ) ; int (*set_mac_address)(struct net_device * , void * ) ; int (*validate_addr)(struct net_device * ) ; int (*do_ioctl)(struct net_device * , struct ifreq * , int ) ; int (*set_config)(struct net_device * , struct ifmap * ) ; int (*change_mtu)(struct net_device * , int ) ; void (*tx_timeout)(struct net_device * ) ; void (*vlan_rx_register)(struct net_device * , struct vlan_group * ) ; void (*vlan_rx_add_vid)(struct net_device * , unsigned short ) ; void (*vlan_rx_kill_vid)(struct net_device * , unsigned short ) ; int (*neigh_setup)(struct net_device * , struct neigh_parms * ) ; struct netpoll_info *npinfo ; void (*poll_controller)(struct net_device * ) ; struct net *nd_net ; struct net_bridge_port *br_port ; struct macvlan_port *macvlan_port ; struct device dev ; struct attribute_group *sysfs_groups[3U] ; struct rtnl_link_ops const *rtnl_link_ops ; unsigned int egress_subqueue_count ; struct net_device_subqueue egress_subqueue[1U] ; }; typedef int irqreturn_t; struct kernel_cap_struct { __u32 cap[2U] ; }; typedef struct kernel_cap_struct kernel_cap_t; typedef unsigned long cputime_t; struct sem_undo; struct sem_undo { struct sem_undo *proc_next ; struct sem_undo *id_next ; int semid ; short *semadj ; }; struct sem_undo_list { atomic_t refcnt ; spinlock_t lock ; struct sem_undo *proc_list ; }; struct sysv_sem { struct sem_undo_list *undo_list ; }; struct siginfo; struct __anonstruct_sigset_t_109 { unsigned long sig[1U] ; }; typedef struct __anonstruct_sigset_t_109 sigset_t; typedef void __signalfn_t(int ); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; struct sigaction { __sighandler_t sa_handler ; unsigned long sa_flags ; __sigrestore_t sa_restorer ; sigset_t sa_mask ; }; struct k_sigaction { struct sigaction sa ; }; union sigval { int sival_int ; void *sival_ptr ; }; typedef union sigval sigval_t; struct __anonstruct__kill_111 { pid_t _pid ; uid_t _uid ; }; struct __anonstruct__timer_112 { timer_t _tid ; int _overrun ; char _pad[0U] ; sigval_t _sigval ; int _sys_private ; }; struct __anonstruct__rt_113 { pid_t _pid ; uid_t _uid ; sigval_t _sigval ; }; struct __anonstruct__sigchld_114 { pid_t _pid ; uid_t _uid ; int _status ; clock_t _utime ; clock_t _stime ; }; struct __anonstruct__sigfault_115 { void *_addr ; }; struct __anonstruct__sigpoll_116 { long _band ; int _fd ; }; union __anonunion__sifields_110 { int _pad[28U] ; struct __anonstruct__kill_111 _kill ; struct __anonstruct__timer_112 _timer ; struct __anonstruct__rt_113 _rt ; struct __anonstruct__sigchld_114 _sigchld ; struct __anonstruct__sigfault_115 _sigfault ; struct __anonstruct__sigpoll_116 _sigpoll ; }; struct siginfo { int si_signo ; int si_errno ; int si_code ; union __anonunion__sifields_110 _sifields ; }; typedef struct siginfo siginfo_t; struct sigpending { struct list_head list ; sigset_t signal ; }; struct dentry; struct vfsmount; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct fs_struct { atomic_t count ; rwlock_t lock ; int umask ; struct path root ; struct path pwd ; struct path altroot ; }; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; struct hlist_head tasks[3U] ; struct rcu_head rcu ; int level ; struct upid numbers[1U] ; }; struct pid_link { struct hlist_node node ; struct pid *pid ; }; struct prop_local_single { unsigned long events ; int shift ; unsigned long period ; spinlock_t lock ; }; struct __anonstruct_seccomp_t_119 { int mode ; }; typedef struct __anonstruct_seccomp_t_119 seccomp_t; struct plist_head { struct list_head prio_list ; struct list_head node_list ; spinlock_t *lock ; }; struct rt_mutex_waiter; struct rlimit { unsigned long rlim_cur ; unsigned long rlim_max ; }; struct task_io_accounting { 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 futex_pi_state; struct robust_list_head; struct bio; struct cfs_rq; struct task_group; struct aio_ring_info { unsigned long mmap_base ; unsigned long mmap_size ; struct page **ring_pages ; spinlock_t ring_lock ; long nr_pages ; unsigned int nr ; unsigned int tail ; struct page *internal_pages[8U] ; }; struct kioctx { atomic_t users ; int dead ; struct mm_struct *mm ; unsigned long user_id ; struct kioctx *next ; wait_queue_head_t wait ; spinlock_t ctx_lock ; int reqs_active ; struct list_head active_reqs ; struct list_head run_list ; unsigned int max_reqs ; struct aio_ring_info ring_info ; struct delayed_work wq ; }; 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 ; }; union __anonunion_ldv_16732_121 { pid_t pgrp ; pid_t __pgrp ; }; union __anonunion_ldv_16737_122 { pid_t session ; pid_t __session ; }; struct tty_struct; struct taskstats; struct tty_audit_buf; struct signal_struct { atomic_t count ; atomic_t live ; wait_queue_head_t wait_chldexit ; struct task_struct *curr_target ; struct sigpending shared_pending ; int group_exit_code ; struct task_struct *group_exit_task ; int notify_count ; int group_stop_count ; unsigned int flags ; struct list_head posix_timers ; struct hrtimer real_timer ; struct pid *leader_pid ; ktime_t it_real_incr ; cputime_t it_prof_expires ; cputime_t it_virt_expires ; cputime_t it_prof_incr ; cputime_t it_virt_incr ; union __anonunion_ldv_16732_121 ldv_16732 ; struct pid *tty_old_pgrp ; union __anonunion_ldv_16737_122 ldv_16737 ; int leader ; struct tty_struct *tty ; cputime_t utime ; cputime_t stime ; cputime_t cutime ; cputime_t cstime ; cputime_t gtime ; cputime_t cgtime ; 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 long sum_sched_runtime ; struct rlimit rlim[16U] ; struct list_head cpu_timers[3U] ; struct key *session_keyring ; struct key *process_keyring ; struct pacct_struct pacct ; struct taskstats *stats ; unsigned int audit_tty ; struct tty_audit_buf *tty_audit_buf ; }; struct user_struct { atomic_t __count ; atomic_t processes ; atomic_t files ; atomic_t sigpending ; atomic_t inotify_watches ; atomic_t inotify_devs ; unsigned long mq_bytes ; unsigned long locked_shm ; struct key *uid_keyring ; struct key *session_keyring ; struct hlist_node uidhash_node ; uid_t uid ; struct task_group *tg ; struct kobject kobj ; struct work_struct work ; }; struct backing_dev_info; struct reclaim_state; struct sched_info { unsigned long pcount ; unsigned long long cpu_time ; unsigned long long run_delay ; unsigned long long last_arrival ; unsigned long long last_queued ; unsigned int bkl_count ; }; struct task_delay_info { spinlock_t lock ; unsigned int flags ; struct timespec blkio_start ; struct timespec blkio_end ; u64 blkio_delay ; u64 swapin_delay ; u32 blkio_count ; u32 swapin_count ; }; enum cpu_idle_type { CPU_IDLE = 0, CPU_NOT_IDLE = 1, CPU_NEWLY_IDLE = 2, CPU_MAX_IDLE_TYPES = 3 } ; struct sched_group { struct sched_group *next ; cpumask_t cpumask ; unsigned int __cpu_power ; u32 reciprocal_cpu_power ; }; struct sched_domain { struct sched_domain *parent ; struct sched_domain *child ; struct sched_group *groups ; cpumask_t span ; unsigned long min_interval ; unsigned long max_interval ; unsigned int busy_factor ; unsigned int imbalance_pct ; unsigned int cache_nice_tries ; unsigned int busy_idx ; unsigned int idle_idx ; unsigned int newidle_idx ; unsigned int wake_idx ; unsigned int forkexec_idx ; int flags ; unsigned long last_balance ; unsigned int balance_interval ; unsigned int nr_balance_failed ; unsigned int lb_count[3U] ; unsigned int lb_failed[3U] ; unsigned int lb_balanced[3U] ; unsigned int lb_imbalance[3U] ; unsigned int lb_gained[3U] ; unsigned int lb_hot_gained[3U] ; unsigned int lb_nobusyg[3U] ; unsigned int lb_nobusyq[3U] ; unsigned int alb_count ; unsigned int alb_failed ; unsigned int alb_pushed ; unsigned int sbe_count ; unsigned int sbe_balanced ; unsigned int sbe_pushed ; unsigned int sbf_count ; unsigned int sbf_balanced ; unsigned int sbf_pushed ; unsigned int ttwu_wake_remote ; unsigned int ttwu_move_affine ; unsigned int ttwu_move_balance ; }; struct io_context; struct group_info { int ngroups ; atomic_t usage ; gid_t small_block[32U] ; int nblocks ; gid_t *blocks[0U] ; }; struct audit_context; struct rq; struct sched_class { struct sched_class const *next ; void (*enqueue_task)(struct rq * , struct task_struct * , int ) ; void (*dequeue_task)(struct rq * , struct task_struct * , int ) ; void (*yield_task)(struct rq * ) ; int (*select_task_rq)(struct task_struct * , int ) ; void (*check_preempt_curr)(struct rq * , struct task_struct * ) ; struct task_struct *(*pick_next_task)(struct rq * ) ; void (*put_prev_task)(struct rq * , struct task_struct * ) ; unsigned long (*load_balance)(struct rq * , int , struct rq * , unsigned long , struct sched_domain * , enum cpu_idle_type , int * , int * ) ; int (*move_one_task)(struct rq * , int , struct rq * , struct sched_domain * , enum cpu_idle_type ) ; void (*pre_schedule)(struct rq * , struct task_struct * ) ; void (*post_schedule)(struct rq * ) ; void (*task_wake_up)(struct rq * , struct task_struct * ) ; void (*set_curr_task)(struct rq * ) ; void (*task_tick)(struct rq * , struct task_struct * , int ) ; void (*task_new)(struct rq * , struct task_struct * ) ; void (*set_cpus_allowed)(struct task_struct * , cpumask_t * ) ; void (*join_domain)(struct rq * ) ; void (*leave_domain)(struct rq * ) ; void (*switched_from)(struct rq * , struct task_struct * , int ) ; void (*switched_to)(struct rq * , struct task_struct * , int ) ; void (*prio_changed)(struct rq * , struct task_struct * , int , int ) ; }; struct load_weight { unsigned long weight ; unsigned long inv_weight ; }; struct sched_entity { struct load_weight load ; struct rb_node run_node ; unsigned int on_rq ; u64 exec_start ; u64 sum_exec_runtime ; u64 vruntime ; u64 prev_sum_exec_runtime ; u64 wait_start ; u64 wait_max ; u64 wait_count ; u64 wait_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 ; 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_forced2_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 *parent ; struct cfs_rq *cfs_rq ; struct cfs_rq *my_q ; }; struct rt_rq; struct sched_rt_entity { struct list_head run_list ; unsigned int time_slice ; unsigned long timeout ; int nr_cpus_allowed ; struct sched_rt_entity *parent ; struct rt_rq *rt_rq ; struct rt_rq *my_q ; }; struct linux_binfmt; struct files_struct; struct css_set; struct compat_robust_list_head; struct task_struct { long volatile state ; void *stack ; atomic_t usage ; unsigned int flags ; unsigned int ptrace ; int lock_depth ; int prio ; int static_prio ; int normal_prio ; struct sched_class const *sched_class ; struct sched_entity se ; struct sched_rt_entity rt ; struct hlist_head preempt_notifiers ; unsigned char fpu_counter ; s8 oomkilladj ; unsigned int btrace_seq ; unsigned int policy ; cpumask_t cpus_allowed ; struct sched_info sched_info ; struct list_head tasks ; struct list_head ptrace_children ; struct list_head ptrace_list ; struct mm_struct *mm ; struct mm_struct *active_mm ; struct linux_binfmt *binfmt ; int exit_state ; int exit_code ; int exit_signal ; int pdeath_signal ; unsigned int personality ; unsigned char did_exec : 1 ; 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 pid_link pids[3U] ; struct list_head thread_group ; struct completion *vfork_done ; int *set_child_tid ; int *clear_child_tid ; unsigned int rt_priority ; cputime_t utime ; cputime_t stime ; cputime_t utimescaled ; cputime_t stimescaled ; cputime_t gtime ; cputime_t prev_utime ; cputime_t prev_stime ; unsigned long nvcsw ; unsigned long nivcsw ; struct timespec start_time ; struct timespec real_start_time ; unsigned long min_flt ; unsigned long maj_flt ; cputime_t it_prof_expires ; cputime_t it_virt_expires ; unsigned long long it_sched_expires ; struct list_head cpu_timers[3U] ; uid_t uid ; uid_t euid ; uid_t suid ; uid_t fsuid ; gid_t gid ; gid_t egid ; gid_t sgid ; gid_t fsgid ; struct group_info *group_info ; kernel_cap_t cap_effective ; kernel_cap_t cap_inheritable ; kernel_cap_t cap_permitted ; kernel_cap_t cap_bset ; unsigned char keep_capabilities : 1 ; struct user_struct *user ; struct key *request_key_auth ; struct key *thread_keyring ; unsigned char jit_keyring ; char comm[16U] ; int link_count ; int total_link_count ; struct sysv_sem sysvsem ; unsigned long last_switch_timestamp ; 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 ; void *security ; struct audit_context *audit_context ; uid_t loginuid ; unsigned int sessionid ; seccomp_t seccomp ; u32 parent_exec_id ; u32 self_exec_id ; spinlock_t alloc_lock ; spinlock_t pi_lock ; struct plist_head pi_waiters ; struct rt_mutex_waiter *pi_blocked_on ; struct mutex_waiter *blocked_on ; unsigned int irq_events ; int hardirqs_enabled ; unsigned long hardirq_enable_ip ; unsigned int hardirq_enable_event ; unsigned long hardirq_disable_ip ; unsigned int hardirq_disable_event ; int softirqs_enabled ; unsigned long softirq_disable_ip ; unsigned int softirq_disable_event ; unsigned long softirq_enable_ip ; unsigned int softirq_enable_event ; int hardirq_context ; int softirq_context ; u64 curr_chain_key ; int lockdep_depth ; struct held_lock held_locks[30U] ; unsigned int lockdep_recursion ; void *journal_info ; struct bio *bio_list ; struct bio **bio_tail ; 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 ; u64 rchar ; u64 wchar ; u64 syscr ; u64 syscw ; struct task_io_accounting ioac ; u64 acct_rss_mem1 ; u64 acct_vm_mem1 ; cputime_t acct_stimexpd ; struct mempolicy *mempolicy ; short il_next ; nodemask_t mems_allowed ; int cpuset_mems_generation ; int cpuset_mem_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 ; atomic_t fs_excl ; struct rcu_head rcu ; struct pipe_inode_info *splice_pipe ; struct task_delay_info *delays ; int make_it_fail ; struct prop_local_single dirties ; int latency_record_count ; struct latency_record latency_record[32U] ; }; struct tasklet_struct { struct tasklet_struct *next ; unsigned long state ; atomic_t count ; void (*func)(unsigned long ) ; unsigned long data ; }; struct hdlc_proto { int (*open)(struct net_device * ) ; void (*close)(struct net_device * ) ; void (*start)(struct net_device * ) ; void (*stop)(struct net_device * ) ; void (*detach)(struct net_device * ) ; int (*ioctl)(struct net_device * , struct ifreq * ) ; __be16 (*type_trans)(struct sk_buff * , struct net_device * ) ; int (*netif_rx)(struct sk_buff * ) ; struct module *module ; struct hdlc_proto *next ; }; struct hdlc_device { struct net_device_stats stats ; int (*attach)(struct net_device * , unsigned short , unsigned short ) ; int (*xmit)(struct sk_buff * , struct net_device * ) ; struct hdlc_proto const *proto ; int carrier ; int open ; spinlock_t state_lock ; void *state ; void *priv ; }; typedef struct hdlc_device hdlc_device; struct fstioc_write { unsigned int size ; unsigned int offset ; unsigned char data[0U] ; }; struct fstioc_info { unsigned int valid ; unsigned int nports ; unsigned int type ; unsigned int state ; unsigned int index ; unsigned int smcFirmwareVersion ; unsigned long kernelVersion ; unsigned short lineInterface ; unsigned char proto ; unsigned char internalClock ; unsigned int lineSpeed ; unsigned int v24IpSts ; unsigned int v24OpSts ; unsigned short clockStatus ; unsigned short cableStatus ; unsigned short cardMode ; unsigned short debug ; unsigned char transparentMode ; unsigned char invertClock ; unsigned char startingSlot ; unsigned char clockSource ; unsigned char framing ; unsigned char structure ; unsigned char interface ; unsigned char coding ; unsigned char lineBuildOut ; unsigned char equalizer ; unsigned char loopMode ; unsigned char range ; unsigned char txBufferMode ; unsigned char rxBufferMode ; unsigned char losThreshold ; unsigned char idleCode ; unsigned int receiveBufferDelay ; unsigned int framingErrorCount ; unsigned int codeViolationCount ; unsigned int crcErrorCount ; int lineAttenuation ; unsigned short lossOfSignal ; unsigned short receiveRemoteAlarm ; unsigned short alarmIndicationSignal ; }; struct fst_card_info; struct fst_port_info { struct net_device *dev ; struct fst_card_info *card ; int index ; int hwif ; int run ; int mode ; int rxpos ; int txpos ; int txipos ; int start ; int txqs ; int txqe ; struct sk_buff *txq[16U] ; int rxqdepth ; }; struct fst_card_info { char *mem ; char *ctlmem ; unsigned int phys_mem ; unsigned int phys_ctlmem ; unsigned int irq ; unsigned int nports ; unsigned int type ; unsigned int state ; spinlock_t card_lock ; unsigned short pci_conf ; struct fst_port_info ports[4U] ; struct pci_dev *device ; int card_no ; int family ; int dmarx_in_progress ; int dmatx_in_progress ; unsigned long int_count ; unsigned long int_time_ave ; void *rx_dma_handle_host ; dma_addr_t rx_dma_handle_card ; void *tx_dma_handle_host ; dma_addr_t tx_dma_handle_card ; struct sk_buff *dma_skb_rx ; struct fst_port_info *dma_port_rx ; struct fst_port_info *dma_port_tx ; int dma_len_rx ; int dma_len_tx ; int dma_txpos ; int dma_rxpos ; }; enum __anonenum_93 { LDV_SPIN_UNLOCKED = 0, LDV_SPIN_LOCKED = 1 } ; void *memcpy(void * , void const * , unsigned long ) ; long ldv__builtin_expect(long exp , long c ) ; void ldv_spin_lock(void) ; void ldv_spin_unlock(void) ; __inline static void set_bit(int nr , void volatile *addr ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void clear_bit(int nr , void volatile *addr ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static int test_and_set_bit(int nr , void volatile *addr ) { int oldbit ; { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; bts %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return (oldbit); } } __inline static int test_and_clear_bit(int nr , void volatile *addr ) { int oldbit ; { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; btr %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return (oldbit); } } __inline static int constant_test_bit(int nr , void const volatile *addr ) { { return ((int )(*((unsigned long *)addr + (unsigned long )(nr / 64)) >> nr % 64) & 1); } } __inline static __u16 ___swab16(__u16 x ) { { return ((__u16 )((int )((short )((int )x << 8)) | (int )((short )((int )x >> 8)))); } } __inline static __u16 __fswab16(__u16 x ) { __u16 tmp ; { tmp = ___swab16((int )x); return (tmp); } } extern int printk(char const * , ...) ; extern void *memset(void * , int , size_t ) ; extern void __bad_pda_field(void) ; extern struct x8664_pda _proxy_pda ; __inline static void *current_text_addr(void) { void *pc ; { __asm__ volatile ("mov $1f,%0\n1:": "=r" (pc)); return (pc); } } extern void __spin_lock_init(spinlock_t * , char const * , struct lock_class_key * ) ; extern unsigned long __get_free_pages(gfp_t , unsigned int ) ; unsigned long ldv___get_free_pages_2(gfp_t ldv_func_arg1 , unsigned int ldv_func_arg2 ) ; extern void kfree(void const * ) ; extern unsigned long volatile jiffies ; extern void *kmem_cache_alloc(struct kmem_cache * , gfp_t ) ; void *ldv_kmem_cache_alloc_4(struct kmem_cache *ldv_func_arg1 , gfp_t ldv_func_arg2 ) ; void *ldv_kmem_cache_alloc_8(struct kmem_cache *ldv_func_arg1 , gfp_t ldv_func_arg2 ) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *ldv_kmalloc_3(size_t size , gfp_t flags ) { void *tmp___2 ; { tmp___2 = __kmalloc(size, flags); return (tmp___2); } } __inline static void *kmalloc(size_t size , gfp_t flags ) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static void local_inc(local_t *l ) { { __asm__ volatile (" incq %0": "+m" (l->a.counter)); return; } } extern struct module __this_module ; __inline static int module_is_live(struct module *mod ) { { return ((unsigned int )mod->state != 2U); } } __inline static int try_module_get(struct module *module ) { int ret ; unsigned int cpu ; unsigned int ret__ ; int tmp ; long tmp___0 ; { ret = 1; if ((unsigned long )module != (unsigned long )((struct module *)0)) { switch (4UL) { case 2UL: __asm__ ("movw %%gs:%c1,%0": "=r" (ret__): "i" (36UL), "m" (_proxy_pda.cpunumber)); goto ldv_8373; case 4UL: __asm__ ("movl %%gs:%c1,%0": "=r" (ret__): "i" (36UL), "m" (_proxy_pda.cpunumber)); goto ldv_8373; case 8UL: __asm__ ("movq %%gs:%c1,%0": "=r" (ret__): "i" (36UL), "m" (_proxy_pda.cpunumber)); goto ldv_8373; default: __bad_pda_field(); } ldv_8373: cpu = ret__; tmp = module_is_live(module); tmp___0 = ldv__builtin_expect(tmp != 0, 1L); if (tmp___0 != 0L) { local_inc(& module->ref[cpu].count); } else { ret = 0; } } else { } return (ret); } } extern void module_put(struct module * ) ; void ldv_check_alloc_flags(gfp_t flags ) ; __inline static void *dev_get_drvdata(struct device *dev ) { { return (dev->driver_data); } } __inline static void dev_set_drvdata(struct device *dev , void *data ) { { dev->driver_data = data; return; } } extern int pci_bus_read_config_byte(struct pci_bus * , unsigned int , int , u8 * ) ; extern int pci_bus_write_config_byte(struct pci_bus * , unsigned int , int , u8 ) ; __inline static int pci_read_config_byte(struct pci_dev *dev , int where , u8 *val ) { int tmp ; { tmp = pci_bus_read_config_byte(dev->bus, dev->devfn, where, val); return (tmp); } } __inline static int pci_write_config_byte(struct pci_dev *dev , int where , u8 val ) { int tmp ; { tmp = pci_bus_write_config_byte(dev->bus, dev->devfn, where, (int )val); 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_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 * ) ; __inline static int pci_register_driver(struct pci_driver *driver ) { int tmp ; { tmp = __pci_register_driver(driver, & __this_module, "farsync"); return (tmp); } } extern void pci_unregister_driver(struct pci_driver * ) ; __inline static unsigned char inb(unsigned short port ) { unsigned char _v ; { __asm__ volatile ("inb %w1,%0": "=a" (_v): "Nd" (port)); return (_v); } } __inline static unsigned int inl(unsigned short port ) { unsigned int _v ; { __asm__ volatile ("inl %w1,%0": "=a" (_v): "Nd" (port)); return (_v); } } __inline static void outb(unsigned char value , unsigned short port ) { { __asm__ volatile ("outb %b0,%w1": : "a" (value), "Nd" (port)); return; } } __inline static void outw(unsigned short value , unsigned short port ) { { __asm__ volatile ("outw %w0,%w1": : "a" (value), "Nd" (port)); return; } } __inline static void outl(unsigned int value , unsigned short port ) { { __asm__ volatile ("outl %0,%w1": : "a" (value), "Nd" (port)); return; } } extern void *ioremap_nocache(unsigned long , unsigned long ) ; __inline static void *ioremap(unsigned long offset , unsigned long size ) { void *tmp ; { tmp = ioremap_nocache(offset, size); return (tmp); } } extern void iounmap(void volatile * ) ; __inline static __u8 __readb(void const volatile *addr ) { { return ((__u8 )*((__u8 volatile *)addr)); } } __inline static __u16 __readw(void const volatile *addr ) { { return ((__u16 )*((__u16 volatile *)addr)); } } __inline static __u32 __readl(void const volatile *addr ) { { return ((__u32 )*((__u32 volatile *)addr)); } } __inline static void __writel(__u32 b , void volatile *addr ) { { *((__u32 volatile *)addr) = b; return; } } __inline static void __writeb(__u8 b , void volatile *addr ) { { *((__u8 volatile *)addr) = b; return; } } __inline static void __writew(__u16 b , void volatile *addr ) { { *((__u16 volatile *)addr) = b; return; } } extern void __memcpy_fromio(void * , unsigned long , unsigned int ) ; extern void __memcpy_toio(unsigned long , void const * , unsigned int ) ; __inline static void memcpy_fromio(void *to , void const volatile *from , unsigned int len ) { { __memcpy_fromio(to, (unsigned long )from, len); return; } } __inline static void memcpy_toio(void volatile *to , void const *from , unsigned int len ) { { __memcpy_toio((unsigned long )to, from, len); return; } } extern void *dma_alloc_coherent(struct device * , size_t , dma_addr_t * , gfp_t ) ; extern void dma_free_coherent(struct device * , size_t , void * , dma_addr_t ) ; __inline static void *pci_alloc_consistent(struct pci_dev *hwdev , size_t size , dma_addr_t *dma_handle ) { void *tmp ; { tmp = dma_alloc_coherent((unsigned long )hwdev != (unsigned long )((struct pci_dev *)0) ? & hwdev->dev : 0, size, dma_handle, 32U); return (tmp); } } __inline static void pci_free_consistent(struct pci_dev *hwdev , size_t size , void *vaddr , dma_addr_t dma_handle ) { { dma_free_coherent((unsigned long )hwdev != (unsigned long )((struct pci_dev *)0) ? & hwdev->dev : 0, size, vaddr, dma_handle); return; } } __inline static void *pci_get_drvdata(struct pci_dev *pdev ) { void *tmp ; { tmp = dev_get_drvdata(& pdev->dev); return (tmp); } } __inline static void pci_set_drvdata(struct pci_dev *pdev , void *data ) { { dev_set_drvdata(& pdev->dev, data); return; } } extern unsigned long copy_to_user(void * , void const * , unsigned int ) ; extern unsigned long copy_from_user(void * , void const * , unsigned int ) ; extern void kfree_skb(struct sk_buff * ) ; extern struct sk_buff *__alloc_skb(unsigned int , gfp_t , int , int ) ; __inline static struct sk_buff *ldv_alloc_skb_10(unsigned int size , gfp_t priority ) { struct sk_buff *tmp ; { tmp = __alloc_skb(size, priority, 0, -1); return (tmp); } } __inline static struct sk_buff *alloc_skb(unsigned int size , gfp_t priority ) ; extern struct sk_buff *skb_clone(struct sk_buff * , gfp_t ) ; struct sk_buff *ldv_skb_clone_13(struct sk_buff *ldv_func_arg1 , gfp_t ldv_func_arg2 ) ; extern struct sk_buff *skb_copy(struct sk_buff const * , gfp_t ) ; struct sk_buff *ldv_skb_copy_15(struct sk_buff const *ldv_func_arg1 , gfp_t ldv_func_arg2 ) ; extern int pskb_expand_head(struct sk_buff * , int , int , gfp_t ) ; int ldv_pskb_expand_head_17(struct sk_buff *ldv_func_arg1 , int ldv_func_arg2 , int ldv_func_arg3 , gfp_t ldv_func_arg4 ) ; extern void skb_over_panic(struct sk_buff * , int , void * ) ; __inline static int skb_is_nonlinear(struct sk_buff const *skb ) { { return ((int )skb->data_len); } } __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 ; int tmp___1 ; long tmp___2 ; void *tmp___3 ; long tmp___4 ; { 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(tmp___1 != 0, 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.quad 1b, %c0\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/skbuff.h"), "i" (913), "i" (24UL)); ldv_14659: ; goto ldv_14659; } else { } skb->tail = skb->tail + len; skb->len = skb->len + len; tmp___4 = ldv__builtin_expect(skb->tail > skb->end, 0L); if (tmp___4 != 0L) { tmp___3 = current_text_addr(); skb_over_panic(skb, (int )len, tmp___3); } else { } return (tmp); } } __inline static void skb_reserve(struct sk_buff *skb , int len ) { { skb->data = skb->data + (unsigned long )len; skb->tail = skb->tail + (sk_buff_data_t )len; return; } } __inline static void skb_reset_mac_header(struct sk_buff *skb ) { { skb->mac_header = (sk_buff_data_t )((long )skb->data) - (sk_buff_data_t )((long )skb->head); return; } } __inline static struct sk_buff *__dev_alloc_skb(unsigned int length , gfp_t gfp_mask ) { struct sk_buff *skb ; struct sk_buff *tmp ; long tmp___0 ; { tmp = alloc_skb(length + 16U, gfp_mask); skb = tmp; tmp___0 = ldv__builtin_expect((unsigned long )skb != (unsigned long )((struct sk_buff *)0), 1L); if (tmp___0 != 0L) { skb_reserve(skb, 16); } else { } return (skb); } } __inline static struct sk_buff *dev_alloc_skb(unsigned int length ) { struct sk_buff *tmp ; { tmp = __dev_alloc_skb(length, 32U); return (tmp); } } extern struct sk_buff *__netdev_alloc_skb(struct net_device * , unsigned int , gfp_t ) ; struct sk_buff *ldv___netdev_alloc_skb_16(struct net_device *ldv_func_arg1 , unsigned int ldv_func_arg2 , gfp_t ldv_func_arg3 ) ; extern int capable(int ) ; extern long schedule_timeout_uninterruptible(long ) ; extern int request_irq(unsigned int , irqreturn_t (*)(int , void * ) , unsigned long , char const * , void * ) ; extern void free_irq(unsigned int , void * ) ; extern void __tasklet_schedule(struct tasklet_struct * ) ; __inline static void tasklet_schedule(struct tasklet_struct *t ) { int tmp ; { tmp = test_and_set_bit(0, (void volatile *)(& t->state)); if (tmp == 0) { __tasklet_schedule(t); } else { } return; } } extern void free_netdev(struct net_device * ) ; extern int netpoll_trap(void) ; extern void __netif_schedule(struct net_device * ) ; __inline static void netif_wake_queue(struct net_device *dev ) { int tmp ; int tmp___0 ; { tmp = netpoll_trap(); if (tmp != 0) { clear_bit(0, (void volatile *)(& dev->state)); return; } else { } tmp___0 = test_and_clear_bit(0, (void volatile *)(& dev->state)); if (tmp___0 != 0) { __netif_schedule(dev); } else { } return; } } __inline static void netif_stop_queue(struct net_device *dev ) { { set_bit(0, (void volatile *)(& dev->state)); return; } } extern int netif_rx(struct sk_buff * ) ; __inline static int netif_carrier_ok(struct net_device const *dev ) { int tmp ; { tmp = constant_test_bit(4, (void const volatile *)(& dev->state)); return (tmp == 0); } } extern void netif_carrier_on(struct net_device * ) ; extern void netif_carrier_off(struct net_device * ) ; extern int register_netdev(struct net_device * ) ; extern int hdlc_ioctl(struct net_device * , struct ifreq * , int ) ; extern void unregister_hdlc_device(struct net_device * ) ; extern struct net_device *alloc_hdlcdev(void * ) ; __inline static struct hdlc_device *dev_to_hdlc(struct net_device *dev ) { { return ((struct hdlc_device *)dev->priv); } } extern int hdlc_open(struct net_device * ) ; extern void hdlc_close(struct net_device * ) ; __inline static struct net_device_stats *hdlc_stats(struct net_device *dev ) { struct hdlc_device *tmp ; { tmp = dev_to_hdlc(dev); return (& tmp->stats); } } __inline static __be16 hdlc_type_trans(struct sk_buff *skb , struct net_device *dev ) { hdlc_device *hdlc ; struct hdlc_device *tmp ; __be16 tmp___0 ; __u16 tmp___1 ; { tmp = dev_to_hdlc(dev); hdlc = tmp; skb->dev = dev; skb_reset_mac_header(skb); if ((unsigned long )(hdlc->proto)->type_trans != (unsigned long )((__be16 (*/* const */)(struct sk_buff * , struct net_device * ))0)) { tmp___0 = (*((hdlc->proto)->type_trans))(skb, dev); return (tmp___0); } else { tmp___1 = __fswab16(25); return (tmp___1); } } } static int fst_txq_low = 8; static int fst_txq_high = 12; static int fst_max_reads = 7; static int fst_excluded_cards = 0; static int fst_excluded_list[32U] ; static struct pci_device_id fst_pci_dev_id[8U] = { {5657U, 1024U, 4294967295U, 4294967295U, 0U, 0U, 1UL}, {5657U, 1088U, 4294967295U, 4294967295U, 0U, 0U, 2UL}, {5657U, 1552U, 4294967295U, 4294967295U, 0U, 0U, 3UL}, {5657U, 1568U, 4294967295U, 4294967295U, 0U, 0U, 4UL}, {5657U, 1600U, 4294967295U, 4294967295U, 0U, 0U, 5UL}, {5657U, 5648U, 4294967295U, 4294967295U, 0U, 0U, 6UL}, {5657U, 5650U, 4294967295U, 4294967295U, 0U, 0U, 6UL}, {0U, 0U, 0U, 0U, 0U, 0U, 0UL}}; struct pci_device_id const __mod_pci_device_table ; static void do_bottom_half_tx(struct fst_card_info *card ) ; static void do_bottom_half_rx(struct fst_card_info *card ) ; static void fst_process_tx_work_q(unsigned long work_q ) ; static void fst_process_int_work_q(unsigned long work_q ) ; static struct tasklet_struct fst_tx_task = {0, 0UL, {0}, & fst_process_tx_work_q, 0UL}; static struct tasklet_struct fst_int_task = {0, 0UL, {0}, & fst_process_int_work_q, 0UL}; static struct fst_card_info *fst_card_array[32U] ; static spinlock_t fst_work_q_lock ; static u64 fst_work_txq ; static u64 fst_work_intq ; static void fst_q_work_item(u64 *queue , int card_index ) { u64 mask ; { ldv_spin_lock(); mask = (u64 )(1 << card_index); *queue = *queue | mask; ldv_spin_unlock(); return; } } static void fst_process_tx_work_q(unsigned long work_q ) { u64 work_txq ; int i ; { ldv_spin_lock(); work_txq = fst_work_txq; fst_work_txq = 0ULL; ldv_spin_unlock(); i = 0; goto ldv_19027; ldv_19026: ; if ((int )work_txq & 1) { if ((unsigned long )fst_card_array[i] != (unsigned long )((struct fst_card_info *)0)) { do_bottom_half_tx(fst_card_array[i]); } else { } } else { } work_txq = work_txq >> 1; i = i + 1; ldv_19027: ; if (i <= 31) { goto ldv_19026; } else { } return; } } static void fst_process_int_work_q(unsigned long work_q ) { u64 work_intq ; int i ; { ldv_spin_lock(); work_intq = fst_work_intq; fst_work_intq = 0ULL; ldv_spin_unlock(); i = 0; goto ldv_19036; ldv_19035: ; if ((int )work_intq & 1) { if ((unsigned long )fst_card_array[i] != (unsigned long )((struct fst_card_info *)0)) { do_bottom_half_rx(fst_card_array[i]); do_bottom_half_tx(fst_card_array[i]); } else { } } else { } work_intq = work_intq >> 1; i = i + 1; ldv_19036: ; if (i <= 31) { goto ldv_19035; } else { } return; } } __inline static void fst_cpureset(struct fst_card_info *card ) { unsigned char interrupt_line_register ; unsigned long j ; unsigned int regval ; int tmp ; int tmp___0 ; { j = (unsigned long )jiffies + 1UL; if (card->family == 1) { tmp = pci_read_config_byte(card->device, 60, & interrupt_line_register); outw(17423, (int )((unsigned int )card->pci_conf + 110U)); outw(1039, (int )((unsigned int )card->pci_conf + 110U)); j = (unsigned long )jiffies + 1UL; goto ldv_19045; ldv_19044: ; ldv_19045: ; if ((unsigned long )jiffies < j) { goto ldv_19044; } else { } outw(9231, (int )((unsigned int )card->pci_conf + 110U)); j = (unsigned long )jiffies + 1UL; goto ldv_19048; ldv_19047: ; ldv_19048: ; if ((unsigned long )jiffies < j) { goto ldv_19047; } else { } outw(1039, (int )((unsigned int )card->pci_conf + 110U)); tmp___0 = pci_write_config_byte(card->device, 60, (int )interrupt_line_register); } else { regval = inl((int )((unsigned int )card->pci_conf + 80U)); outl(regval | 1073741824U, (int )((unsigned int )card->pci_conf + 80U)); outl(regval & 3221225471U, (int )((unsigned int )card->pci_conf + 80U)); } return; } } __inline static void fst_cpurelease(struct fst_card_info *card ) { { if (card->family == 1) { __readb((void const volatile *)card->mem); outw(1038, (int )((unsigned int )card->pci_conf + 110U)); outw(1039, (int )((unsigned int )card->pci_conf + 110U)); } else { __readb((void const volatile *)card->ctlmem); } return; } } __inline static void fst_clear_intr(struct fst_card_info *card ) { { if (card->family == 1) { __readb((void const volatile *)card->ctlmem); } else { outw(1347, (int )((unsigned int )card->pci_conf + 76U)); } return; } } __inline static void fst_enable_intr(struct fst_card_info *card ) { { if (card->family == 1) { outl(252446976U, (int )((unsigned int )card->pci_conf + 104U)); } else { outw(1347, (int )((unsigned int )card->pci_conf + 76U)); } return; } } __inline static void fst_disable_intr(struct fst_card_info *card ) { { if (card->family == 1) { outl(0U, (int )((unsigned int )card->pci_conf + 104U)); } else { outw(0, (int )((unsigned int )card->pci_conf + 76U)); } return; } } static void fst_process_rx_status(int rx_status , char *name ) { { switch (rx_status) { case 0: ; goto ldv_19067; case 2: ; goto ldv_19067; case 3: ; goto ldv_19067; case 4: ; goto ldv_19067; case 1: ; goto ldv_19067; } ldv_19067: ; return; } } __inline static void fst_init_dma(struct fst_card_info *card ) { { if (card->family == 1) { pci_set_master(card->device); outl(132161U, (int )((unsigned int )card->pci_conf + 128U)); outl(132161U, (int )((unsigned int )card->pci_conf + 148U)); outl(0U, (int )((unsigned int )card->pci_conf + 176U)); } else { } return; } } static void fst_tx_dma_complete(struct fst_card_info *card , struct fst_port_info *port , int len , int txpos ) { struct net_device *dev ; struct net_device_stats *stats ; struct net_device_stats *tmp ; { dev = port->dev; tmp = hdlc_stats(dev); stats = tmp; __writeb(131, (void volatile *)card->mem + (8192UL + ((((unsigned long )port->index + 16UL) * 2UL + (unsigned long )txpos) * 8UL + 3UL))); stats->tx_packets = stats->tx_packets + 1UL; stats->tx_bytes = stats->tx_bytes + (unsigned long )len; dev->trans_start = jiffies; return; } } static __be16 farsync_type_trans(struct sk_buff *skb , struct net_device *dev ) { __u16 tmp ; { skb->dev = dev; skb_reset_mac_header(skb); skb->pkt_type = 0U; tmp = __fswab16(24582); return (tmp); } } static void fst_rx_dma_complete(struct fst_card_info *card , struct fst_port_info *port , int len , struct sk_buff *skb , int rxp ) { struct net_device *dev ; struct net_device_stats *stats ; struct net_device_stats *tmp ; int pi ; int rx_status ; size_t __len ; void *__ret ; unsigned char *tmp___1 ; { dev = port->dev; tmp = hdlc_stats(dev); stats = tmp; pi = port->index; __len = (size_t )len; tmp___1 = skb_put(skb, (unsigned int )len); __ret = memcpy((void *)tmp___1, (void const *)card->rx_dma_handle_host, __len); __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); stats->rx_packets = stats->rx_packets + 1UL; stats->rx_bytes = stats->rx_bytes + (unsigned long )len; if (port->mode == 4) { skb->protocol = farsync_type_trans(skb, dev); } else { skb->protocol = hdlc_type_trans(skb, dev); } rx_status = netif_rx(skb); fst_process_rx_status(rx_status, (char *)(& (port->dev)->name)); if (rx_status == 1) { stats->rx_dropped = stats->rx_dropped + 1UL; } else { } dev->last_rx = jiffies; return; } } __inline static void fst_rx_dma(struct fst_card_info *card , unsigned char *skb , unsigned char *mem , int len ) { { outl((unsigned int )((long )skb), (int )((unsigned int )card->pci_conf + 132U)); outl((unsigned int )((long )mem), (int )((unsigned int )card->pci_conf + 136U)); outl((unsigned int )len, (int )((unsigned int )card->pci_conf + 140U)); outl(12U, (int )((unsigned int )card->pci_conf + 144U)); card->dmarx_in_progress = 1; outb(3, (int )((unsigned int )card->pci_conf + 168U)); return; } } __inline static void fst_tx_dma(struct fst_card_info *card , unsigned char *skb , unsigned char *mem , int len ) { { outl((unsigned int )((long )skb), (int )((unsigned int )card->pci_conf + 152U)); outl((unsigned int )((long )mem), (int )((unsigned int )card->pci_conf + 156U)); outl((unsigned int )len, (int )((unsigned int )card->pci_conf + 160U)); outl(4U, (int )((unsigned int )card->pci_conf + 164U)); card->dmatx_in_progress = 1; outb(3, (int )((unsigned int )card->pci_conf + 169U)); return; } } static void fst_issue_cmd(struct fst_port_info *port , unsigned short cmd ) { struct fst_card_info *card ; unsigned short mbval ; int safety ; { card = port->card; ldv_spin_lock(); mbval = __readw((void const volatile *)card->mem + (18940UL + (unsigned long )port->index)); safety = 0; goto ldv_19123; ldv_19122: ldv_spin_unlock(); schedule_timeout_uninterruptible(1L); ldv_spin_lock(); safety = safety + 1; if (safety > 2000) { printk("<3>fst: Mailbox safety timeout\n"); goto ldv_19121; } else { } mbval = __readw((void const volatile *)card->mem + (18940UL + (unsigned long )port->index)); ldv_19123: ; if ((unsigned int )mbval > 2U) { goto ldv_19122; } else { } ldv_19121: __writew((int )cmd, (void volatile *)card->mem + (18940UL + (unsigned long )port->index)); if ((unsigned int )cmd == 5U || (unsigned int )cmd == 3U) { port->txpos = 0; port->txipos = 0; port->start = 0; } else { } ldv_spin_unlock(); return; } } __inline static void fst_op_raise(struct fst_port_info *port , unsigned int outputs ) { __u32 tmp ; { tmp = __readl((void const volatile *)(port->card)->mem + (18834UL + (unsigned long )port->index)); outputs = tmp | outputs; __writel(outputs, (void volatile *)(port->card)->mem + (18834UL + (unsigned long )port->index)); if (port->run != 0) { fst_issue_cmd(port, 6); } else { } return; } } __inline static void fst_op_lower(struct fst_port_info *port , unsigned int outputs ) { __u32 tmp ; { tmp = __readl((void const volatile *)(port->card)->mem + (18834UL + (unsigned long )port->index)); outputs = ~ outputs & tmp; __writel(outputs, (void volatile *)(port->card)->mem + (18834UL + (unsigned long )port->index)); if (port->run != 0) { fst_issue_cmd(port, 6); } else { } return; } } static void fst_rx_config(struct fst_port_info *port ) { int i ; int pi ; unsigned int offset ; struct fst_card_info *card ; { pi = port->index; card = port->card; ldv_spin_lock(); i = 0; goto ldv_19141; ldv_19140: offset = (unsigned int )((((unsigned long )pi + 1UL) * 8UL + (unsigned long )i) + 8UL) * 8192U; __writew((int )((unsigned short )offset), (void volatile *)card->mem + (8192UL + ((unsigned long )pi * 8UL + (unsigned long )i) * 8UL)); __writeb((int )((unsigned char )(offset >> 16)), (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )i) * 8UL + 2UL))); __writew(57344, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )i) * 8UL + 4UL))); __writew(8192, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )i) * 8UL + 6UL))); __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )i) * 8UL + 3UL))); i = i + 1; ldv_19141: ; if (i <= 7) { goto ldv_19140; } else { } port->rxpos = 0; ldv_spin_unlock(); return; } } static void fst_tx_config(struct fst_port_info *port ) { int i ; int pi ; unsigned int offset ; struct fst_card_info *card ; { pi = port->index; card = port->card; ldv_spin_lock(); i = 0; goto ldv_19152; ldv_19151: offset = (unsigned int )(((unsigned long )pi * 2UL + (unsigned long )i) + 8UL) * 8192U; __writew((int )((unsigned short )offset), (void volatile *)card->mem + (8192UL + (((unsigned long )pi + 16UL) * 2UL + (unsigned long )i) * 8UL)); __writeb((int )((unsigned char )(offset >> 16)), (void volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )i) * 8UL + 2UL))); __writew(0, (void volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )i) * 8UL + 4UL))); __writeb(0, (void volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )i) * 8UL + 3UL))); i = i + 1; ldv_19152: ; if (i <= 1) { goto ldv_19151; } else { } port->txpos = 0; port->txipos = 0; port->start = 0; ldv_spin_unlock(); return; } } static void fst_intr_te1_alarm(struct fst_card_info *card , struct fst_port_info *port ) { u8 los ; u8 rra ; u8 ais ; int tmp ; int tmp___0 ; { los = __readb((void const volatile *)card->mem + 19301U); rra = __readb((void const volatile *)card->mem + 19302U); ais = __readb((void const volatile *)card->mem + 19303U); if ((unsigned int )los != 0U) { tmp___0 = netif_carrier_ok((struct net_device const *)port->dev); if (tmp___0 != 0) { netif_carrier_off(port->dev); } else { tmp = netif_carrier_ok((struct net_device const *)port->dev); if (tmp == 0) { netif_carrier_on(port->dev); } else { } } } else { } return; } } static void fst_intr_ctlchg(struct fst_card_info *card , struct fst_port_info *port ) { int signals ; __u32 tmp ; int tmp___0 ; int tmp___1 ; { tmp = __readl((void const volatile *)card->mem + (19000UL + (unsigned long )port->index)); signals = (int )tmp; if (((port->hwif == 2 || port->hwif == 4 ? 1 : 4) & signals) != 0) { tmp___1 = netif_carrier_ok((struct net_device const *)port->dev); if (tmp___1 == 0) { netif_carrier_on(port->dev); } else { tmp___0 = netif_carrier_ok((struct net_device const *)port->dev); if (tmp___0 != 0) { netif_carrier_off(port->dev); } else { } } } else { } return; } } static void fst_log_rx_error(struct fst_card_info *card , struct fst_port_info *port , unsigned char dmabits , int rxp , unsigned short len ) { struct net_device *dev ; struct net_device_stats *stats ; struct net_device_stats *tmp ; { dev = port->dev; tmp = hdlc_stats(dev); stats = tmp; stats->rx_errors = stats->rx_errors + 1UL; if (((int )dmabits & 16) != 0) { stats->rx_fifo_errors = stats->rx_fifo_errors + 1UL; } else { } if (((int )dmabits & 8) != 0) { stats->rx_crc_errors = stats->rx_crc_errors + 1UL; } else { } if (((int )dmabits & 32) != 0) { stats->rx_frame_errors = stats->rx_frame_errors + 1UL; } else { } if ((unsigned int )dmabits == 3U) { stats->rx_length_errors = stats->rx_length_errors + 1UL; } else { } return; } } static void fst_recover_rx_error(struct fst_card_info *card , struct fst_port_info *port , unsigned char dmabits , int rxp , unsigned short len ) { int i ; int pi ; { pi = port->index; i = 0; goto ldv_19186; ldv_19185: __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); rxp = (rxp + 1) % 8; i = i + 1; if (i > 8) { goto ldv_19184; } else { } dmabits = __readb((void const volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); ldv_19186: ; if (((int )dmabits & 130) == 0) { goto ldv_19185; } else { } ldv_19184: ; if ((int )((signed char )dmabits) >= 0) { __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); rxp = (rxp + 1) % 8; } else { } port->rxpos = rxp; return; } } static void fst_intr_rx(struct fst_card_info *card , struct fst_port_info *port ) { unsigned char dmabits ; int pi ; int rxp ; int rx_status ; unsigned short len ; struct sk_buff *skb ; struct net_device *dev ; struct net_device_stats *stats ; struct net_device_stats *tmp ; unsigned char *tmp___0 ; { dev = port->dev; tmp = hdlc_stats(dev); stats = tmp; pi = port->index; rxp = port->rxpos; dmabits = __readb((void const volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); if ((int )((signed char )dmabits) < 0) { return; } else { } if (card->dmarx_in_progress != 0) { return; } else { } len = __readw((void const volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 6UL))); len = (unsigned int )len + 65534U; if ((unsigned int )len == 0U) { printk("<3>fst: Frame received with 0 length. Card %d Port %d\n", card->card_no, port->index); __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); rxp = (rxp + 1) % 8; port->rxpos = rxp; return; } else { } if ((unsigned int )dmabits != 3U || (unsigned int )len > 8190U) { fst_log_rx_error(card, port, (int )dmabits, rxp, (int )len); fst_recover_rx_error(card, port, (int )dmabits, rxp, (int )len); return; } else { } skb = dev_alloc_skb((unsigned int )len); if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { stats->rx_dropped = stats->rx_dropped + 1UL; __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); rxp = (rxp + 1) % 8; port->rxpos = rxp; return; } else { } if ((unsigned int )len <= 63U || card->family == 0) { tmp___0 = skb_put(skb, (unsigned int )len); memcpy_fromio((void *)tmp___0, (void const volatile *)(card->mem + ((((unsigned long )pi + 1UL) * 8UL + (unsigned long )rxp) + 8UL) * 8192UL), (unsigned int )len); __writeb(128, (void volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )rxp) * 8UL + 3UL))); stats->rx_packets = stats->rx_packets + 1UL; stats->rx_bytes = stats->rx_bytes + (unsigned long )len; if (port->mode == 4) { skb->protocol = farsync_type_trans(skb, dev); } else { skb->protocol = hdlc_type_trans(skb, dev); } rx_status = netif_rx(skb); fst_process_rx_status(rx_status, (char *)(& (port->dev)->name)); if (rx_status == 1) { stats->rx_dropped = stats->rx_dropped + 1UL; } else { } dev->last_rx = jiffies; } else { card->dma_skb_rx = skb; card->dma_port_rx = port; card->dma_len_rx = (int )len; card->dma_rxpos = rxp; fst_rx_dma(card, (unsigned char *)card->rx_dma_handle_card, (unsigned char *)(((((unsigned long )pi + 1UL) * 8UL + (unsigned long )rxp) + 8UL) * 8192UL), (int )len); } rxp = (rxp + 1) % 8; port->rxpos = rxp; return; } } static void do_bottom_half_tx(struct fst_card_info *card ) { struct fst_port_info *port ; int pi ; int txq_length ; struct sk_buff *skb ; struct net_device *dev ; struct net_device_stats *stats ; size_t __len ; void *__ret ; __u8 tmp ; { pi = 0; port = (struct fst_port_info *)(& card->ports); goto ldv_19217; ldv_19216: ; if (port->run == 0) { goto ldv_19209; } else { } dev = port->dev; stats = hdlc_stats(dev); goto ldv_19215; ldv_19214: ldv_spin_lock(); txq_length = port->txqe - port->txqs; if (txq_length < 0) { txq_length = txq_length + 16; } else { } ldv_spin_unlock(); if (txq_length > 0) { ldv_spin_lock(); skb = port->txq[port->txqs]; port->txqs = port->txqs + 1; if (port->txqs == 16) { port->txqs = 0; } else { } ldv_spin_unlock(); __writew(- ((int )((__u16 )skb->len)), (void volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )port->txpos) * 8UL + 4UL))); if (skb->len <= 63U || card->family == 0) { memcpy_toio((void volatile *)(card->mem + (((unsigned long )pi * 2UL + (unsigned long )port->txpos) + 8UL) * 8192UL), (void const *)skb->data, skb->len); __writeb(131, (void volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )port->txpos) * 8UL + 3UL))); stats->tx_packets = stats->tx_packets + 1UL; stats->tx_bytes = stats->tx_bytes + (unsigned long )skb->len; dev->trans_start = jiffies; } else { __len = (size_t )skb->len; __ret = memcpy(card->tx_dma_handle_host, (void const *)skb->data, __len); card->dma_port_tx = port; card->dma_len_tx = (int )skb->len; card->dma_txpos = port->txpos; fst_tx_dma(card, (unsigned char *)card->tx_dma_handle_card, (unsigned char *)((((unsigned long )pi * 2UL + (unsigned long )port->txpos) + 8UL) * 8192UL), (int )skb->len); } port->txpos = port->txpos + 1; if (port->txpos > 1) { port->txpos = 0; } else { } if (port->start != 0) { if (txq_length < fst_txq_low) { netif_wake_queue(port->dev); port->start = 0; } else { } } else { } kfree_skb(skb); } else { goto ldv_19213; } ldv_19215: tmp = __readb((void const volatile *)card->mem + (8192UL + ((((unsigned long )pi + 16UL) * 2UL + (unsigned long )port->txpos) * 8UL + 3UL))); if ((int )((signed char )tmp) >= 0 && card->dmatx_in_progress == 0) { goto ldv_19214; } else { } ldv_19213: ; ldv_19209: pi = pi + 1; port = port + 1; ldv_19217: ; if ((unsigned int )pi < card->nports) { goto ldv_19216; } else { } return; } } static void do_bottom_half_rx(struct fst_card_info *card ) { struct fst_port_info *port ; int pi ; int rx_count ; __u8 tmp ; { rx_count = 0; pi = 0; port = (struct fst_port_info *)(& card->ports); goto ldv_19230; ldv_19229: ; if (port->run == 0) { goto ldv_19225; } else { } goto ldv_19228; ldv_19227: ; if (rx_count > fst_max_reads) { fst_q_work_item(& fst_work_intq, card->card_no); tasklet_schedule(& fst_int_task); goto ldv_19226; } else { } fst_intr_rx(card, port); rx_count = rx_count + 1; ldv_19228: tmp = __readb((void const volatile *)card->mem + (8192UL + (((unsigned long )pi * 8UL + (unsigned long )port->rxpos) * 8UL + 3UL))); if ((int )((signed char )tmp) >= 0 && card->dmarx_in_progress == 0) { goto ldv_19227; } else { } ldv_19226: ; ldv_19225: pi = pi + 1; port = port + 1; ldv_19230: ; if ((unsigned int )pi < card->nports) { goto ldv_19229; } else { } return; } } static irqreturn_t fst_intr(int dummy , void *dev_id ) { struct fst_card_info *card ; struct fst_port_info *port ; int rdidx ; int wridx ; int event ; unsigned int dma_intcsr ; unsigned int do_card_interrupt ; unsigned int int_retry_count ; __u8 tmp ; __u8 tmp___0 ; __u8 tmp___1 ; __u8 tmp___2 ; struct net_device_stats *tmp___3 ; struct net_device_stats *tmp___4 ; { card = (struct fst_card_info *)dev_id; dma_intcsr = 0U; if (card->state != 4U) { printk("<3>fst: Interrupt received for card %d in a non running state (%d)\n", card->card_no, card->state); fst_clear_intr(card); return (1); } else { } fst_clear_intr(card); do_card_interrupt = 0U; tmp = __readb((void const volatile *)card->mem + 18753U); if ((unsigned int )tmp == 1U) { do_card_interrupt = do_card_interrupt + 4U; __writeb(238, (void volatile *)card->mem + 18753U); } else { } if (card->family == 1) { dma_intcsr = inl((int )((unsigned int )card->pci_conf + 104U)); if ((dma_intcsr & 2097152U) != 0U) { outb(8, (int )((unsigned int )card->pci_conf + 168U)); fst_rx_dma_complete(card, card->dma_port_rx, card->dma_len_rx, card->dma_skb_rx, card->dma_rxpos); card->dmarx_in_progress = 0; do_card_interrupt = do_card_interrupt + 1U; } else { } if ((dma_intcsr & 4194304U) != 0U) { outb(8, (int )((unsigned int )card->pci_conf + 169U)); fst_tx_dma_complete(card, card->dma_port_tx, card->dma_len_tx, card->dma_txpos); card->dmatx_in_progress = 0; do_card_interrupt = do_card_interrupt + 2U; } else { } } else { } int_retry_count = __readl((void const volatile *)card->mem + 18964U); if (int_retry_count != 0U) { __writel(0U, (void volatile *)card->mem + 18964U); } else { } if (do_card_interrupt == 0U) { return (1); } else { } fst_q_work_item(& fst_work_intq, card->card_no); tasklet_schedule(& fst_int_task); tmp___0 = __readb((void const volatile *)card->mem + 18784U); rdidx = (int )tmp___0 & 31; tmp___1 = __readb((void const volatile *)card->mem + 18785U); wridx = (int )tmp___1 & 31; goto ldv_19262; ldv_19261: tmp___2 = __readb((void const volatile *)card->mem + (18786UL + (unsigned long )rdidx)); event = (int )tmp___2; port = (struct fst_port_info *)(& card->ports) + ((unsigned long )event & 3UL); switch (event) { case 48: ; if (port->run != 0) { fst_intr_te1_alarm(card, port); } else { } goto ldv_19245; case 24: ; case 25: ; case 26: ; case 27: ; if (port->run != 0) { fst_intr_ctlchg(card, port); } else { } goto ldv_19245; case 36: ; case 37: ; case 38: ; case 39: ; goto ldv_19245; case 40: ; case 41: ; case 42: ; case 43: tmp___3 = hdlc_stats(port->dev); tmp___3->tx_errors = tmp___3->tx_errors + 1UL; tmp___4 = hdlc_stats(port->dev); tmp___4->tx_fifo_errors = tmp___4->tx_fifo_errors + 1UL; goto ldv_19245; case 32: ; goto ldv_19245; case 33: card->state = 7U; goto ldv_19245; default: printk("<3>fst: intr: unknown card event %d. ignored\n", event); goto ldv_19245; } ldv_19245: rdidx = rdidx + 1; if (rdidx > 31) { rdidx = 0; } else { } ldv_19262: ; if (rdidx != wridx) { goto ldv_19261; } else { } __writeb((int )((__u8 )rdidx), (void volatile *)card->mem + 18784U); return (1); } } static void check_started_ok(struct fst_card_info *card ) { int i ; __u16 tmp ; __u16 tmp___0 ; __u32 tmp___1 ; __u8 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; { tmp___0 = __readw((void const volatile *)card->mem + 18754U); if ((unsigned int )tmp___0 != 24U) { tmp = __readw((void const volatile *)card->mem + 18754U); printk("<3>fst: Bad shared memory version %d expected %d\n", (int )tmp, 24); card->state = 5U; return; } else { } tmp___1 = __readl((void const volatile *)card->mem + 19344U); if (tmp___1 != 305419896U) { printk("<3>fst: Missing shared memory signature\n"); card->state = 5U; return; } else { } tmp___2 = __readb((void const volatile *)card->mem + 18752U); i = (int )tmp___2; if (i == 1) { card->state = 4U; } else if (i == 255) { printk("<3>fst: Firmware initialisation failed. Card halted\n"); card->state = 6U; return; } else if (i != 0) { printk("<3>fst: Unknown firmware status 0x%x\n", i); card->state = 6U; return; } else { } tmp___4 = __readl((void const volatile *)card->mem + 19080U); if (tmp___4 != card->nports) { tmp___3 = __readl((void const volatile *)card->mem + 19080U); printk("<4>fst: Port count mismatch on card %d. Firmware thinks %d we say %d\n", card->card_no, tmp___3, card->nports); } else { } return; } } static int set_conf_from_info(struct fst_card_info *card , struct fst_port_info *port , struct fstioc_info *info ) { int err ; unsigned char my_framing ; { err = 0; if ((info->valid & 512U) != 0U) { if ((unsigned int )info->proto == 4U) { port->mode = 4; } else { port->mode = 5; } } else { } if ((info->valid & 64U) != 0U) { err = -22; } else { } if ((info->valid & 32U) != 0U) { err = -22; } else { } if ((info->valid & 2048U) != 0U) { __writeb((int )info->invertClock, (void volatile *)card->mem + (8192UL + ((unsigned long )port->index * 16UL + 10663UL))); } else { } if ((info->valid & 1024U) != 0U) { __writew((int )info->cardMode, (void volatile *)card->mem + 19212U); } else { } if ((info->valid & 4096U) != 0U) { __writel(info->lineSpeed, (void volatile *)card->mem + 19216U); __writeb((int )info->clockSource, (void volatile *)card->mem + 19220U); my_framing = 0U; if ((unsigned int )info->framing == 6U) { my_framing = 0U; } else { } if ((unsigned int )info->framing == 5U) { my_framing = 2U; } else { } if ((unsigned int )info->framing == 7U) { my_framing = 1U; } else { } __writeb((int )my_framing, (void volatile *)card->mem + 19221U); __writeb((int )info->structure, (void volatile *)card->mem + 19222U); __writeb((int )info->interface, (void volatile *)card->mem + 19223U); __writeb((int )info->coding, (void volatile *)card->mem + 19224U); __writeb((int )info->lineBuildOut, (void volatile *)card->mem + 19225U); __writeb((int )info->equalizer, (void volatile *)card->mem + 19226U); __writeb((int )info->transparentMode, (void volatile *)card->mem + 19227U); __writeb((int )info->loopMode, (void volatile *)card->mem + 19228U); __writeb((int )info->range, (void volatile *)card->mem + 19229U); __writeb((int )info->txBufferMode, (void volatile *)card->mem + 19230U); __writeb((int )info->rxBufferMode, (void volatile *)card->mem + 19231U); __writeb((int )info->startingSlot, (void volatile *)card->mem + 19232U); __writeb((int )info->losThreshold, (void volatile *)card->mem + 19233U); if ((unsigned int )info->idleCode != 0U) { __writeb(1, (void volatile *)card->mem + 19234U); } else { __writeb(0, (void volatile *)card->mem + 19234U); } __writeb((int )info->idleCode, (void volatile *)card->mem + 19235U); } else { } return (err); } } static void gather_conf_info(struct fst_card_info *card , struct fst_port_info *port , struct fstioc_info *info ) { int i ; __u8 tmp ; __u32 tmp___0 ; __u8 tmp___1 ; __u8 tmp___2 ; __u8 tmp___3 ; { memset((void *)info, 0, 104UL); i = port->index; info->kernelVersion = 132633UL; info->nports = card->nports; info->type = card->type; info->state = card->state; info->proto = 5U; info->index = (unsigned int )i; info->valid = card->state == 4U ? 8191U : 256U; info->lineInterface = __readw((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); info->internalClock = __readb((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10661UL))); info->lineSpeed = __readl((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10670UL))); info->invertClock = __readb((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10663UL))); info->v24IpSts = __readl((void const volatile *)card->mem + (18818UL + (unsigned long )i)); info->v24OpSts = __readl((void const volatile *)card->mem + (18834UL + (unsigned long )i)); info->clockStatus = __readw((void const volatile *)card->mem + (18914UL + (unsigned long )i)); info->cableStatus = __readw((void const volatile *)card->mem + 18922U); info->cardMode = __readw((void const volatile *)card->mem + 19212U); info->smcFirmwareVersion = __readl((void const volatile *)card->mem + 18756U); if (card->family == 1) { if (port->index == 0) { info->cableStatus = (unsigned int )info->cableStatus & 1U; } else { info->cableStatus = (int )info->cableStatus >> 1; info->cableStatus = (unsigned int )info->cableStatus & 1U; } } else { } if (card->type == 6U) { info->lineSpeed = __readl((void const volatile *)card->mem + 19216U); info->clockSource = __readb((void const volatile *)card->mem + 19220U); info->framing = __readb((void const volatile *)card->mem + 19221U); info->structure = __readb((void const volatile *)card->mem + 19222U); info->interface = __readb((void const volatile *)card->mem + 19223U); info->coding = __readb((void const volatile *)card->mem + 19224U); info->lineBuildOut = __readb((void const volatile *)card->mem + 19225U); info->equalizer = __readb((void const volatile *)card->mem + 19226U); info->loopMode = __readb((void const volatile *)card->mem + 19228U); info->range = __readb((void const volatile *)card->mem + 19229U); info->txBufferMode = __readb((void const volatile *)card->mem + 19230U); info->rxBufferMode = __readb((void const volatile *)card->mem + 19231U); info->startingSlot = __readb((void const volatile *)card->mem + 19232U); info->losThreshold = __readb((void const volatile *)card->mem + 19233U); tmp = __readb((void const volatile *)card->mem + 19234U); if ((unsigned int )tmp != 0U) { info->idleCode = __readb((void const volatile *)card->mem + 19235U); } else { info->idleCode = 0U; } info->receiveBufferDelay = __readl((void const volatile *)card->mem + 19280U); info->framingErrorCount = __readl((void const volatile *)card->mem + 19284U); info->codeViolationCount = __readl((void const volatile *)card->mem + 19288U); info->crcErrorCount = __readl((void const volatile *)card->mem + 19292U); tmp___0 = __readl((void const volatile *)card->mem + 19296U); info->lineAttenuation = (int )tmp___0; tmp___1 = __readb((void const volatile *)card->mem + 19301U); info->lossOfSignal = (unsigned short )tmp___1; tmp___2 = __readb((void const volatile *)card->mem + 19302U); info->receiveRemoteAlarm = (unsigned short )tmp___2; tmp___3 = __readb((void const volatile *)card->mem + 19303U); info->alarmIndicationSignal = (unsigned short )tmp___3; } else { } return; } } static int fst_set_iface(struct fst_card_info *card , struct fst_port_info *port , struct ifreq *ifr ) { sync_serial_settings sync ; int i ; unsigned long tmp ; { if (ifr->ifr_ifru.ifru_settings.size != 12U) { return (-12); } else { } tmp = copy_from_user((void *)(& sync), (void const *)ifr->ifr_ifru.ifru_settings.ifs_ifsu.sync, 12U); if (tmp != 0UL) { return (-14); } else { } if ((unsigned int )sync.loopback != 0U) { return (-22); } else { } i = port->index; switch (ifr->ifr_ifru.ifru_settings.type) { case 4096U: __writew(3, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 3; goto ldv_19289; case 4097U: __writew(1, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 1; goto ldv_19289; case 4098U: __writew(2, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 2; goto ldv_19289; case 4102U: __writew(4, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 4; goto ldv_19289; case 4099U: __writew(5, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 5; goto ldv_19289; case 4100U: __writew(6, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10658UL))); port->hwif = 6; goto ldv_19289; case 4101U: ; goto ldv_19289; default: ; return (-22); } ldv_19289: ; switch (sync.clock_type) { case 1U: __writeb(0, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10661UL))); goto ldv_19298; case 2U: __writeb(1, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10661UL))); goto ldv_19298; default: ; return (-22); } ldv_19298: __writel(sync.clock_rate, (void volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10670UL))); return (0); } } static int fst_get_iface(struct fst_card_info *card , struct fst_port_info *port , struct ifreq *ifr ) { sync_serial_settings sync ; int i ; __u8 tmp ; unsigned long tmp___0 ; { switch (port->hwif) { case 6: ifr->ifr_ifru.ifru_settings.type = 4100U; goto ldv_19309; case 5: ifr->ifr_ifru.ifru_settings.type = 4099U; goto ldv_19309; case 3: ifr->ifr_ifru.ifru_settings.type = 4096U; goto ldv_19309; case 1: ifr->ifr_ifru.ifru_settings.type = 4097U; goto ldv_19309; case 4: ifr->ifr_ifru.ifru_settings.type = 4102U; goto ldv_19309; case 2: ; default: ifr->ifr_ifru.ifru_settings.type = 4098U; goto ldv_19309; } ldv_19309: ; if (ifr->ifr_ifru.ifru_settings.size == 0U) { return (0); } else { } if (ifr->ifr_ifru.ifru_settings.size <= 11U) { return (-12); } else { } i = port->index; sync.clock_rate = __readl((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10670UL))); tmp = __readb((void const volatile *)card->mem + (8192UL + ((unsigned long )i * 16UL + 10661UL))); sync.clock_type = (unsigned int )tmp == 1U ? 2U : 1U; sync.loopback = 0U; tmp___0 = copy_to_user((void *)ifr->ifr_ifru.ifru_settings.ifs_ifsu.sync, (void const *)(& sync), 12U); if (tmp___0 != 0UL) { return (-14); } else { } ifr->ifr_ifru.ifru_settings.size = 12U; return (0); } } static int fst_ioctl(struct net_device *dev , struct ifreq *ifr , int cmd ) { struct fst_card_info *card ; struct fst_port_info *port ; struct fstioc_write wrthdr ; struct fstioc_info info ; void *buf ; struct hdlc_device *tmp ; int tmp___0 ; unsigned long tmp___1 ; unsigned long tmp___2 ; unsigned long tmp___3 ; unsigned long tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; { tmp = dev_to_hdlc(dev); port = (struct fst_port_info *)tmp->priv; card = port->card; tmp___0 = capable(12); if (tmp___0 == 0) { return (-1); } else { } switch (cmd) { case 35323: fst_cpureset(card); card->state = 1U; return (0); case 35324: fst_cpurelease(card); card->state = 3U; return (0); case 35322: ; if ((unsigned long )ifr->ifr_ifru.ifru_data == (unsigned long )((void *)0)) { return (-22); } else { } tmp___1 = copy_from_user((void *)(& wrthdr), (void const *)ifr->ifr_ifru.ifru_data, 8U); if (tmp___1 != 0UL) { return (-14); } else { } if ((wrthdr.size > 1048576U || wrthdr.offset > 1048576U) || wrthdr.size + wrthdr.offset > 1048576U) { return (-6); } else { } buf = kmalloc((size_t )wrthdr.size, 208U); if ((unsigned long )buf == (unsigned long )((void *)0)) { return (-12); } else { } tmp___2 = copy_from_user(buf, (void const *)ifr->ifr_ifru.ifru_data + 8U, wrthdr.size); if (tmp___2 != 0UL) { kfree((void const *)buf); return (-14); } else { } memcpy_toio((void volatile *)card->mem + (unsigned long )wrthdr.offset, (void const *)buf, wrthdr.size); kfree((void const *)buf); if (card->state == 1U) { card->state = 2U; } else { } return (0); case 35325: ; if (card->state == 3U) { check_started_ok(card); if (card->state == 4U) { ldv_spin_lock(); fst_enable_intr(card); __writeb(238, (void volatile *)card->mem + 18753U); ldv_spin_unlock(); } else { } } else { } if ((unsigned long )ifr->ifr_ifru.ifru_data == (unsigned long )((void *)0)) { return (-22); } else { } gather_conf_info(card, port, & info); tmp___3 = copy_to_user(ifr->ifr_ifru.ifru_data, (void const *)(& info), 104U); if (tmp___3 != 0UL) { return (-14); } else { } return (0); case 35326: ; if (card->state != 4U) { printk("<3>fst: Attempt to configure card %d in non-running state (%d)\n", card->card_no, card->state); return (-5); } else { } tmp___4 = copy_from_user((void *)(& info), (void const *)ifr->ifr_ifru.ifru_data, 104U); if (tmp___4 != 0UL) { return (-14); } else { } tmp___5 = set_conf_from_info(card, port, & info); return (tmp___5); case 35146: ; switch (ifr->ifr_ifru.ifru_settings.type) { case 1U: tmp___6 = fst_get_iface(card, port, ifr); return (tmp___6); case 4101U: ; case 4096U: ; case 4097U: ; case 4098U: ; case 4102U: ; case 4099U: ; case 4100U: tmp___7 = fst_set_iface(card, port, ifr); return (tmp___7); case 8204U: port->mode = 4; return (0); case 2U: ; if (port->mode == 4) { ifr->ifr_ifru.ifru_settings.type = 8204U; return (0); } else { } tmp___8 = hdlc_ioctl(dev, ifr, cmd); return (tmp___8); default: port->mode = 5; tmp___9 = hdlc_ioctl(dev, ifr, cmd); return (tmp___9); } default: tmp___10 = hdlc_ioctl(dev, ifr, cmd); return (tmp___10); } } } static void fst_openport(struct fst_port_info *port ) { int signals ; int txq_length ; __u32 tmp ; { if ((port->card)->state == 4U) { if (port->run != 0) { fst_issue_cmd(port, 4); port->run = 0; } else { } fst_rx_config(port); fst_tx_config(port); fst_op_raise(port, 3U); fst_issue_cmd(port, 3); port->run = 1; tmp = __readl((void const volatile *)(port->card)->mem + (19000UL + (unsigned long )port->index)); signals = (int )tmp; if (((port->hwif == 2 || port->hwif == 4 ? 1 : 4) & signals) != 0) { netif_carrier_on(port->dev); } else { netif_carrier_off(port->dev); } txq_length = port->txqe - port->txqs; port->txqe = 0; port->txqs = 0; } else { } return; } } static void fst_closeport(struct fst_port_info *port ) { { if ((port->card)->state == 4U) { if (port->run != 0) { port->run = 0; fst_op_lower(port, 3U); fst_issue_cmd(port, 4); } else { } } else { } return; } } static int fst_open(struct net_device *dev ) { int err ; struct fst_port_info *port ; struct hdlc_device *tmp ; int tmp___0 ; { tmp = dev_to_hdlc(dev); port = (struct fst_port_info *)tmp->priv; tmp___0 = try_module_get(& __this_module); if (tmp___0 == 0) { return (-16); } else { } if (port->mode != 4) { err = hdlc_open(dev); if (err != 0) { return (err); } else { } } else { } fst_openport(port); netif_wake_queue(dev); return (0); } } static int fst_close(struct net_device *dev ) { struct fst_port_info *port ; struct fst_card_info *card ; unsigned char tx_dma_done ; unsigned char rx_dma_done ; struct hdlc_device *tmp ; struct hdlc_device *tmp___0 ; { tmp = dev_to_hdlc(dev); port = (struct fst_port_info *)tmp->priv; card = port->card; tx_dma_done = inb((int )((unsigned int )card->pci_conf + 169U)); rx_dma_done = inb((int )((unsigned int )card->pci_conf + 168U)); netif_stop_queue(dev); tmp___0 = dev_to_hdlc(dev); fst_closeport((struct fst_port_info *)tmp___0->priv); if (port->mode != 4) { hdlc_close(dev); } else { } module_put(& __this_module); return (0); } } static int fst_attach(struct net_device *dev , unsigned short encoding , unsigned short parity ) { { if ((unsigned int )encoding != 1U || (unsigned int )parity != 5U) { return (-22); } else { } return (0); } } static void fst_tx_timeout(struct net_device *dev ) { struct fst_port_info *port ; struct fst_card_info *card ; struct net_device_stats *stats ; struct net_device_stats *tmp ; struct hdlc_device *tmp___0 ; { tmp = hdlc_stats(dev); stats = tmp; tmp___0 = dev_to_hdlc(dev); port = (struct fst_port_info *)tmp___0->priv; card = port->card; stats->tx_errors = stats->tx_errors + 1UL; stats->tx_aborted_errors = stats->tx_aborted_errors + 1UL; fst_issue_cmd(port, 5); dev->trans_start = jiffies; netif_wake_queue(dev); port->start = 0; return; } } static int fst_start_xmit(struct sk_buff *skb , struct net_device *dev ) { struct fst_card_info *card ; struct fst_port_info *port ; struct net_device_stats *stats ; struct net_device_stats *tmp ; int txq_length ; struct hdlc_device *tmp___0 ; int tmp___1 ; { tmp = hdlc_stats(dev); stats = tmp; tmp___0 = dev_to_hdlc(dev); port = (struct fst_port_info *)tmp___0->priv; card = port->card; tmp___1 = netif_carrier_ok((struct net_device const *)dev); if (tmp___1 == 0) { kfree_skb(skb); stats->tx_errors = stats->tx_errors + 1UL; stats->tx_carrier_errors = stats->tx_carrier_errors + 1UL; return (0); } else { } if (skb->len > 8192U) { kfree_skb(skb); stats->tx_errors = stats->tx_errors + 1UL; return (0); } else { } ldv_spin_lock(); txq_length = port->txqe - port->txqs; if (txq_length < 0) { txq_length = txq_length + 16; } else { } ldv_spin_unlock(); if (txq_length > fst_txq_high) { netif_stop_queue(dev); port->start = 1; } else { } if (txq_length == 15) { kfree_skb(skb); stats->tx_errors = stats->tx_errors + 1UL; return (0); } else { } ldv_spin_lock(); port->txq[port->txqe] = skb; port->txqe = port->txqe + 1; if (port->txqe == 16) { port->txqe = 0; } else { } ldv_spin_unlock(); fst_q_work_item(& fst_work_txq, card->card_no); tasklet_schedule(& fst_tx_task); return (0); } } static char *type_strings[7U] = { (char *)"no hardware", (char *)"FarSync T2P", (char *)"FarSync T4P", (char *)"FarSync T1U", (char *)"FarSync T2U", (char *)"FarSync T4U", (char *)"FarSync TE1"}; static void fst_init_card(struct fst_card_info *card ) { int i ; int err ; int j ; { i = 0; goto ldv_19397; ldv_19396: err = register_netdev(card->ports[i].dev); if (err < 0) { printk("<3>fst: Cannot register HDLC device for port %d (errno %d)\n", i, - err); j = i; goto ldv_19393; ldv_19392: free_netdev(card->ports[j].dev); card->ports[j].dev = 0; j = j + 1; ldv_19393: ; if ((unsigned int )j < card->nports) { goto ldv_19392; } else { } card->nports = (unsigned int )i; goto ldv_19395; } else { } i = i + 1; ldv_19397: ; if ((unsigned int )i < card->nports) { goto ldv_19396; } else { } ldv_19395: printk("<6>fst: %s-%s: %s IRQ%d, %d ports\n", (char *)(& (((struct fst_port_info *)(& card->ports))->dev)->name), (char *)(& (((struct fst_port_info *)(& card->ports) + (unsigned long )(card->nports - 1U))->dev)->name), type_strings[card->type], card->irq, card->nports); return; } } static int fst_add_one(struct pci_dev *pdev , struct pci_device_id const *ent ) { int firsttime_done ; int no_of_cards_added ; struct fst_card_info *card ; int err ; int i ; void *tmp ; char *tmp___0 ; void *tmp___1 ; char *tmp___2 ; void *tmp___3 ; int tmp___4 ; struct lock_class_key __key ; struct net_device *dev ; struct net_device *tmp___5 ; hdlc_device *hdlc ; int tmp___6 ; struct hdlc_device *tmp___7 ; int tmp___8 ; { firsttime_done = 0; no_of_cards_added = 0; err = 0; if (firsttime_done == 0) { printk("<6>fst: FarSync WAN driver 1.04 (c) 2001-2004 FarSite Communications Ltd.\n"); firsttime_done = 1; } else { } if (fst_excluded_cards != 0) { i = 0; goto ldv_19408; ldv_19407: ; if (pdev->devfn >> 3 == (unsigned int )fst_excluded_list[i]) { printk("<6>fst: FarSync PCI device %d not assigned\n", pdev->devfn >> 3); return (-16); } else { } i = i + 1; ldv_19408: ; if (i < fst_excluded_cards) { goto ldv_19407; } else { } } else { } tmp = kzalloc(984UL, 208U); card = (struct fst_card_info *)tmp; if ((unsigned long )card == (unsigned long )((struct fst_card_info *)0)) { printk("<3>fst: FarSync card found but insufficient memory for driver storage\n"); return (-12); } else { } err = pci_enable_device(pdev); if (err != 0) { printk("<3>fst: Failed to enable card. Err %d\n", - err); kfree((void const *)card); return (err); } else { } err = pci_request_regions(pdev, "FarSync"); if (err != 0) { printk("<3>fst: Failed to allocate regions. Err %d\n", - err); pci_disable_device(pdev); kfree((void const *)card); return (err); } else { } card->pci_conf = (unsigned short )pdev->resource[1].start; card->phys_mem = (unsigned int )pdev->resource[2].start; card->phys_ctlmem = (unsigned int )pdev->resource[3].start; tmp___1 = ioremap((unsigned long )card->phys_mem, 1048576UL); tmp___0 = (char *)tmp___1; card->mem = tmp___0; if ((unsigned long )tmp___0 == (unsigned long )((char *)0)) { printk("<3>fst: Physical memory remap failed\n"); pci_release_regions(pdev); pci_disable_device(pdev); kfree((void const *)card); return (-19); } else { } tmp___3 = ioremap((unsigned long )card->phys_ctlmem, 16UL); tmp___2 = (char *)tmp___3; card->ctlmem = tmp___2; if ((unsigned long )tmp___2 == (unsigned long )((char *)0)) { printk("<3>fst: Control memory remap failed\n"); pci_release_regions(pdev); pci_disable_device(pdev); kfree((void const *)card); return (-19); } else { } tmp___4 = request_irq(pdev->irq, & fst_intr, 128UL, "farsync", (void *)card); if (tmp___4 != 0) { printk("<3>fst: Unable to register interrupt %d\n", card->irq); pci_release_regions(pdev); pci_disable_device(pdev); iounmap((void volatile *)card->ctlmem); iounmap((void volatile *)card->mem); kfree((void const *)card); return (-19); } else { } card->irq = pdev->irq; card->type = (unsigned int )ent->driver_data; card->family = (unsigned long )ent->driver_data != 1UL && (unsigned long )ent->driver_data != 2UL; if ((unsigned long )ent->driver_data == 3UL || (unsigned long )ent->driver_data == 6UL) { card->nports = 1U; } else { card->nports = (unsigned long )ent->driver_data == 1UL || (unsigned long )ent->driver_data == 4UL ? 2U : 4U; } card->state = 0U; __spin_lock_init(& card->card_lock, "&card->card_lock", & __key); i = 0; goto ldv_19417; ldv_19416: tmp___5 = alloc_hdlcdev((void *)(& card->ports) + (unsigned long )i); dev = tmp___5; if ((unsigned long )dev == (unsigned long )((struct net_device *)0)) { goto ldv_19414; ldv_19413: free_netdev(card->ports[i].dev); ldv_19414: tmp___6 = i; i = i - 1; if (tmp___6 != 0) { goto ldv_19413; } else { } printk("<3>fst: FarSync: out of memory\n"); free_irq(card->irq, (void *)card); pci_release_regions(pdev); pci_disable_device(pdev); iounmap((void volatile *)card->ctlmem); iounmap((void volatile *)card->mem); kfree((void const *)card); return (-19); } else { } card->ports[i].dev = dev; card->ports[i].card = card; card->ports[i].index = i; card->ports[i].run = 0; tmp___7 = dev_to_hdlc(dev); hdlc = tmp___7; dev->mem_start = (unsigned long )card->phys_mem + ((unsigned long )i + 4UL) * 16384UL; dev->mem_end = (unsigned long )card->phys_mem + ((unsigned long )i + 5UL) * 16384UL; dev->base_addr = (unsigned long )card->pci_conf; dev->irq = card->irq; dev->tx_queue_len = 100UL; dev->open = & fst_open; dev->stop = & fst_close; dev->do_ioctl = & fst_ioctl; dev->watchdog_timeo = 500; dev->tx_timeout = & fst_tx_timeout; hdlc->attach = & fst_attach; hdlc->xmit = & fst_start_xmit; i = i + 1; ldv_19417: ; if ((unsigned int )i < card->nports) { goto ldv_19416; } else { } card->device = pdev; fst_cpureset(card); card->state = 1U; fst_init_dma(card); pci_set_drvdata(pdev, (void *)card); fst_card_array[no_of_cards_added] = card; tmp___8 = no_of_cards_added; no_of_cards_added = no_of_cards_added + 1; card->card_no = tmp___8; fst_init_card(card); if (card->family == 1) { card->rx_dma_handle_host = pci_alloc_consistent(card->device, 8000UL, & card->rx_dma_handle_card); if ((unsigned long )card->rx_dma_handle_host == (unsigned long )((void *)0)) { printk("<3>fst: Could not allocate rx dma buffer\n"); fst_disable_intr(card); pci_release_regions(pdev); pci_disable_device(pdev); iounmap((void volatile *)card->ctlmem); iounmap((void volatile *)card->mem); kfree((void const *)card); return (-12); } else { } card->tx_dma_handle_host = pci_alloc_consistent(card->device, 8000UL, & card->tx_dma_handle_card); if ((unsigned long )card->tx_dma_handle_host == (unsigned long )((void *)0)) { printk("<3>fst: Could not allocate tx dma buffer\n"); fst_disable_intr(card); pci_release_regions(pdev); pci_disable_device(pdev); iounmap((void volatile *)card->ctlmem); iounmap((void volatile *)card->mem); kfree((void const *)card); return (-12); } else { } } else { } return (0); } } static void fst_remove_one(struct pci_dev *pdev ) { struct fst_card_info *card ; int i ; void *tmp ; struct net_device *dev ; { tmp = pci_get_drvdata(pdev); card = (struct fst_card_info *)tmp; i = 0; goto ldv_19426; ldv_19425: dev = ((struct fst_port_info *)(& card->ports) + (unsigned long )i)->dev; unregister_hdlc_device(dev); i = i + 1; ldv_19426: ; if ((unsigned int )i < card->nports) { goto ldv_19425; } else { } fst_disable_intr(card); free_irq(card->irq, (void *)card); iounmap((void volatile *)card->ctlmem); iounmap((void volatile *)card->mem); pci_release_regions(pdev); if (card->family == 1) { pci_free_consistent(card->device, 8000UL, card->rx_dma_handle_host, card->rx_dma_handle_card); pci_free_consistent(card->device, 8000UL, card->tx_dma_handle_host, card->tx_dma_handle_card); } else { } fst_card_array[card->card_no] = 0; return; } } static struct pci_driver fst_driver = {{0, 0}, (char *)"fst", (struct pci_device_id const *)(& fst_pci_dev_id), & fst_add_one, & fst_remove_one, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {{{0U}, 0U, 0U, 0, {0, 0, 0, 0}}, {0, 0}, (unsigned char)0}}; static int fst_init(void) { int i ; struct lock_class_key __key ; int tmp ; { i = 0; goto ldv_19434; ldv_19433: fst_card_array[i] = 0; i = i + 1; ldv_19434: ; if (i <= 31) { goto ldv_19433; } else { } __spin_lock_init(& fst_work_q_lock, "&fst_work_q_lock", & __key); tmp = pci_register_driver(& fst_driver); return (tmp); } } static void fst_cleanup_module(void) { { printk("<6>fst: FarSync WAN driver unloading\n"); pci_unregister_driver(& fst_driver); return; } } extern void ldv_check_final_state(void) ; extern void ldv_check_return_value(int ) ; extern void ldv_check_return_value_probe(int ) ; extern void ldv_initialize(void) ; extern void ldv_handler_precall(void) ; extern int nondet_int(void) ; int LDV_IN_INTERRUPT ; int main(void) { struct pci_dev *var_group1 ; struct pci_device_id const *var_fst_add_one_42_p1 ; int res_fst_add_one_42 ; int var_fst_intr_27_p0 ; void *var_fst_intr_27_p1 ; int ldv_s_fst_driver_pci_driver ; int tmp ; int tmp___0 ; int tmp___1 ; { ldv_s_fst_driver_pci_driver = 0; LDV_IN_INTERRUPT = 1; ldv_initialize(); ldv_handler_precall(); tmp = fst_init(); if (tmp != 0) { goto ldv_final; } else { } goto ldv_19480; ldv_19479: tmp___0 = nondet_int(); switch (tmp___0) { case 0: ; if (ldv_s_fst_driver_pci_driver == 0) { res_fst_add_one_42 = fst_add_one(var_group1, var_fst_add_one_42_p1); ldv_check_return_value(res_fst_add_one_42); ldv_check_return_value_probe(res_fst_add_one_42); if (res_fst_add_one_42 != 0) { goto ldv_module_exit; } else { } ldv_s_fst_driver_pci_driver = ldv_s_fst_driver_pci_driver + 1; } else { } goto ldv_19475; case 1: ; if (ldv_s_fst_driver_pci_driver == 1) { ldv_handler_precall(); fst_remove_one(var_group1); ldv_s_fst_driver_pci_driver = 0; } else { } goto ldv_19475; case 2: LDV_IN_INTERRUPT = 2; ldv_handler_precall(); fst_intr(var_fst_intr_27_p0, var_fst_intr_27_p1); LDV_IN_INTERRUPT = 1; goto ldv_19475; default: ; goto ldv_19475; } ldv_19475: ; ldv_19480: tmp___1 = nondet_int(); if (tmp___1 != 0 || ldv_s_fst_driver_pci_driver != 0) { goto ldv_19479; } else { } ldv_module_exit: ldv_handler_precall(); fst_cleanup_module(); ldv_final: ldv_check_final_state(); return 0; } } unsigned long ldv___get_free_pages_2(gfp_t ldv_func_arg1 , unsigned int ldv_func_arg2 ) { unsigned long tmp ; { ldv_check_alloc_flags(ldv_func_arg1); tmp = __get_free_pages(ldv_func_arg1, ldv_func_arg2); return (tmp); } } __inline static void *kmalloc(size_t size , gfp_t flags ) { { ldv_check_alloc_flags(flags); ldv_kmalloc_3(size, flags); return ((void *)0); } } void *ldv_kmem_cache_alloc_4(struct kmem_cache *ldv_func_arg1 , gfp_t ldv_func_arg2 ) { { ldv_check_alloc_flags(ldv_func_arg2); kmem_cache_alloc(ldv_func_arg1, ldv_func_arg2); return ((void *)0); } } void *ldv_kmem_cache_alloc_8(struct kmem_cache *ldv_func_arg1 , gfp_t ldv_func_arg2 ) { { ldv_check_alloc_flags(ldv_func_arg2); kmem_cache_alloc(ldv_func_arg1, ldv_func_arg2); return ((void *)0); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { { ldv_check_alloc_flags(flags); return ((void *)0); } } __inline static struct sk_buff *alloc_skb(unsigned int size , gfp_t priority ) { struct sk_buff *tmp ; { ldv_check_alloc_flags(priority); tmp = ldv_alloc_skb_10(size, priority); return (tmp); } } struct sk_buff *ldv_skb_clone_13(struct sk_buff *ldv_func_arg1 , gfp_t ldv_func_arg2 ) { struct sk_buff *tmp ; { ldv_check_alloc_flags(ldv_func_arg2); tmp = skb_clone(ldv_func_arg1, ldv_func_arg2); return (tmp); } } struct sk_buff *ldv_skb_copy_15(struct sk_buff const *ldv_func_arg1 , gfp_t ldv_func_arg2 ) { struct sk_buff *tmp ; { ldv_check_alloc_flags(ldv_func_arg2); tmp = skb_copy(ldv_func_arg1, ldv_func_arg2); return (tmp); } } struct sk_buff *ldv___netdev_alloc_skb_16(struct net_device *ldv_func_arg1 , unsigned int ldv_func_arg2 , gfp_t ldv_func_arg3 ) { struct sk_buff *tmp ; { ldv_check_alloc_flags(ldv_func_arg3); tmp = __netdev_alloc_skb(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); return (tmp); } } int ldv_pskb_expand_head_17(struct sk_buff *ldv_func_arg1 , int ldv_func_arg2 , int ldv_func_arg3 , gfp_t ldv_func_arg4 ) { int tmp ; { ldv_check_alloc_flags(ldv_func_arg4); tmp = pskb_expand_head(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); return (tmp); } } __inline static void ( __attribute__((__always_inline__)) ldv_error)(void) { { LDV_ERROR: {reach_error();abort();} } } extern int ldv_undef_int(void) ; long ldv__builtin_expect(long exp , long c ) { { return (exp); } } int ldv_spin = LDV_SPIN_UNLOCKED; void ldv_check_alloc_flags(gfp_t flags ) { { if (ldv_spin == LDV_SPIN_UNLOCKED || flags == 32U) { } else { ldv_error(); } return; } } extern struct page *ldv_some_page(void) ; struct page *ldv_check_alloc_flags_and_return_some_page(gfp_t flags ) { struct page *tmp ; { if (ldv_spin == LDV_SPIN_UNLOCKED || flags == 32U) { } else { ldv_error(); } tmp = ldv_some_page(); return (tmp); } } void ldv_check_alloc_nonatomic(void) { { if (ldv_spin == LDV_SPIN_UNLOCKED) { } else { ldv_error(); } return; } } void ldv_spin_lock(void) { { ldv_spin = LDV_SPIN_LOCKED; return; } } void ldv_spin_unlock(void) { { ldv_spin = LDV_SPIN_UNLOCKED; return; } } int ldv_spin_trylock(void) { int is_lock ; { is_lock = ldv_undef_int(); if (is_lock) { return (0); } else { ldv_spin = LDV_SPIN_LOCKED; return (1); } } }