Error Trace

[Home]

Bug # 105

Show/hide error trace
Error trace
Function bodies
Blocks
  • Others...
    Function bodies without model function calls
    Initialization function calls
    Initialization function bodies
    Entry point
    Entry point body
    Function calls
    Skipped function calls
    Formal parameter names
    Declarations
    Assumes
    Assume conditions
    Returns
    Return values
    DEG initialization
    DEG function calls
    Model function calls
    Model function bodies
    Model asserts
    Model state changes
    Model function function calls
    Model function function bodies
    Model returns
    Model others
    Identation
    Line numbers
    Expand signs
-__CPAchecker_initialize()
{
19 typedef signed char __s8;
20 typedef unsigned char __u8;
22 typedef short __s16;
23 typedef unsigned short __u16;
25 typedef int __s32;
26 typedef unsigned int __u32;
30 typedef unsigned long long __u64;
15 typedef signed char s8;
16 typedef unsigned char u8;
18 typedef short s16;
19 typedef unsigned short u16;
21 typedef int s32;
22 typedef unsigned int u32;
24 typedef long long s64;
25 typedef unsigned long long u64;
14 typedef long __kernel_long_t;
15 typedef unsigned long __kernel_ulong_t;
27 typedef int __kernel_pid_t;
48 typedef unsigned int __kernel_uid32_t;
49 typedef unsigned int __kernel_gid32_t;
71 typedef __kernel_ulong_t __kernel_size_t;
72 typedef __kernel_long_t __kernel_ssize_t;
87 typedef long long __kernel_loff_t;
88 typedef __kernel_long_t __kernel_time_t;
89 typedef __kernel_long_t __kernel_clock_t;
90 typedef int __kernel_timer_t;
91 typedef int __kernel_clockid_t;
33 typedef __u16 __be16;
35 typedef __u32 __be32;
40 typedef __u32 __wsum;
12 typedef __u32 __kernel_dev_t;
15 typedef __kernel_dev_t dev_t;
18 typedef unsigned short umode_t;
21 typedef __kernel_pid_t pid_t;
26 typedef __kernel_clockid_t clockid_t;
29 typedef _Bool bool;
31 typedef __kernel_uid32_t uid_t;
32 typedef __kernel_gid32_t gid_t;
45 typedef __kernel_loff_t loff_t;
54 typedef __kernel_size_t size_t;
59 typedef __kernel_ssize_t ssize_t;
69 typedef __kernel_time_t time_t;
91 typedef unsigned int uint;
102 typedef __s32 int32_t;
106 typedef __u8 uint8_t;
107 typedef __u16 uint16_t;
108 typedef __u32 uint32_t;
111 typedef __u64 uint64_t;
133 typedef unsigned long sector_t;
134 typedef unsigned long blkcnt_t;
146 typedef u64 dma_addr_t;
157 typedef unsigned int gfp_t;
158 typedef unsigned int fmode_t;
159 typedef unsigned int oom_flags_t;
162 typedef u64 phys_addr_t;
167 typedef phys_addr_t resource_size_t;
177 struct __anonstruct_atomic_t_6 { int counter; } ;
177 typedef struct __anonstruct_atomic_t_6 atomic_t;
182 struct __anonstruct_atomic64_t_7 { long counter; } ;
182 typedef struct __anonstruct_atomic64_t_7 atomic64_t;
183 struct list_head { struct list_head *next; struct list_head *prev; } ;
188 struct hlist_node ;
188 struct hlist_head { struct hlist_node *first; } ;
192 struct hlist_node { struct hlist_node *next; struct hlist_node **pprev; } ;
203 struct callback_head { struct callback_head *next; void (*func)(struct callback_head *); } ;
213 enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ;
5 struct device ;
5 struct page ;
7 struct dma_attrs ;
686 struct kernel_symbol { unsigned long value; const char *name; } ;
33 struct module ;
65 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; } ;
59 struct __anonstruct____missing_field_name_9 { unsigned int a; unsigned int b; } ;
59 struct __anonstruct____missing_field_name_10 { u16 limit0; u16 base0; unsigned char base1; unsigned char type; unsigned char s; unsigned char dpl; unsigned char p; unsigned char limit; unsigned char avl; unsigned char l; unsigned char d; unsigned char g; unsigned char base2; } ;
59 union __anonunion____missing_field_name_8 { struct __anonstruct____missing_field_name_9 __annonCompField4; struct __anonstruct____missing_field_name_10 __annonCompField5; } ;
59 struct desc_struct { union __anonunion____missing_field_name_8 __annonCompField6; } ;
15 typedef unsigned long pgdval_t;
16 typedef unsigned long pgprotval_t;
20 struct pgprot { pgprotval_t pgprot; } ;
243 typedef struct pgprot pgprot_t;
245 struct __anonstruct_pgd_t_12 { pgdval_t pgd; } ;
245 typedef struct __anonstruct_pgd_t_12 pgd_t;
333 typedef struct page *pgtable_t;
341 struct file ;
354 struct seq_file ;
389 struct thread_struct ;
391 struct mm_struct ;
392 struct task_struct ;
393 struct cpumask ;
394 struct paravirt_callee_save { void *func; } ;
196 struct pv_irq_ops { struct paravirt_callee_save save_fl; struct paravirt_callee_save restore_fl; struct paravirt_callee_save irq_disable; struct paravirt_callee_save irq_enable; void (*safe_halt)(); void (*halt)(); void (*adjust_exception_frame)(); } ;
327 struct arch_spinlock ;
18 typedef u16 __ticket_t;
19 typedef u32 __ticketpair_t;
20 struct __raw_tickets { __ticket_t head; __ticket_t tail; } ;
32 union __anonunion____missing_field_name_15 { __ticketpair_t head_tail; struct __raw_tickets tickets; } ;
32 struct arch_spinlock { union __anonunion____missing_field_name_15 __annonCompField7; } ;
33 typedef struct arch_spinlock arch_spinlock_t;
33 struct __anonstruct____missing_field_name_17 { u32 read; s32 write; } ;
33 union __anonunion_arch_rwlock_t_16 { s64 lock; struct __anonstruct____missing_field_name_17 __annonCompField8; } ;
33 typedef union __anonunion_arch_rwlock_t_16 arch_rwlock_t;
142 typedef void (*ctor_fn_t)();
54 struct net_device ;
376 struct file_operations ;
388 struct completion ;
416 struct pid ;
527 struct bug_entry { int bug_addr_disp; int file_disp; unsigned short line; unsigned short flags; } ;
102 struct timespec ;
127 struct kernel_vm86_regs { struct pt_regs pt; unsigned short es; unsigned short __esh; unsigned short ds; unsigned short __dsh; unsigned short fs; unsigned short __fsh; unsigned short gs; unsigned short __gsh; } ;
79 union __anonunion____missing_field_name_22 { struct pt_regs *regs; struct kernel_vm86_regs *vm86; } ;
79 struct math_emu_info { long ___orig_eip; union __anonunion____missing_field_name_22 __annonCompField10; } ;
306 struct cpumask { unsigned long bits[128U]; } ;
14 typedef struct cpumask cpumask_t;
663 typedef struct cpumask *cpumask_var_t;
195 struct static_key ;
162 struct seq_operations ;
294 struct i387_fsave_struct { u32 cwd; u32 swd; u32 twd; u32 fip; u32 fcs; u32 foo; u32 fos; u32 st_space[20U]; u32 status; } ;
312 struct __anonstruct____missing_field_name_27 { u64 rip; u64 rdp; } ;
312 struct __anonstruct____missing_field_name_28 { u32 fip; u32 fcs; u32 foo; u32 fos; } ;
312 union __anonunion____missing_field_name_26 { struct __anonstruct____missing_field_name_27 __annonCompField14; struct __anonstruct____missing_field_name_28 __annonCompField15; } ;
312 union __anonunion____missing_field_name_29 { u32 padding1[12U]; u32 sw_reserved[12U]; } ;
312 struct i387_fxsave_struct { u16 cwd; u16 swd; u16 twd; u16 fop; union __anonunion____missing_field_name_26 __annonCompField16; u32 mxcsr; u32 mxcsr_mask; u32 st_space[32U]; u32 xmm_space[64U]; u32 padding[12U]; union __anonunion____missing_field_name_29 __annonCompField17; } ;
346 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 math_emu_info *info; u32 entry_eip; } ;
367 struct ymmh_struct { u32 ymmh_space[64U]; } ;
372 struct lwp_struct { u8 reserved[128U]; } ;
377 struct bndregs_struct { u64 bndregs[8U]; } ;
381 struct bndcsr_struct { u64 cfg_reg_u; u64 status_reg; } ;
386 struct xsave_hdr_struct { u64 xstate_bv; u64 reserved1[2U]; u64 reserved2[5U]; } ;
392 struct xsave_struct { struct i387_fxsave_struct i387; struct xsave_hdr_struct xsave_hdr; struct ymmh_struct ymmh; struct lwp_struct lwp; struct bndregs_struct bndregs; struct bndcsr_struct bndcsr; } ;
401 union thread_xstate { struct i387_fsave_struct fsave; struct i387_fxsave_struct fxsave; struct i387_soft_struct soft; struct xsave_struct xsave; } ;
409 struct fpu { unsigned int last_cpu; unsigned int has_fpu; union thread_xstate *state; } ;
456 struct kmem_cache ;
457 struct perf_event ;
458 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 fs; unsigned long gs; struct perf_event *ptrace_bps[4U]; unsigned long debugreg6; unsigned long ptrace_dr7; unsigned long cr2; unsigned long trap_nr; unsigned long error_code; struct fpu fpu; unsigned long *io_bitmap_ptr; unsigned long iopl; unsigned int io_bitmap_max; unsigned char fpu_counter; } ;
23 typedef atomic64_t atomic_long_t;
152 struct lockdep_map ;
55 struct stack_trace { unsigned int nr_entries; unsigned int max_entries; unsigned long *entries; int skip; } ;
26 struct lockdep_subclass_key { char __one_byte; } ;
53 struct lock_class_key { struct lockdep_subclass_key subkeys[8U]; } ;
59 struct lock_class { struct list_head hash_entry; struct list_head lock_entry; struct lockdep_subclass_key *key; unsigned int subclass; unsigned int dep_gen_id; unsigned long usage_mask; struct stack_trace usage_traces[13U]; struct list_head locks_after; struct list_head locks_before; unsigned int version; unsigned long ops; const char *name; int name_version; unsigned long contention_point[4U]; unsigned long contending_point[4U]; } ;
144 struct lockdep_map { struct lock_class_key *key; struct lock_class *class_cache[2U]; const char *name; int cpu; unsigned long ip; } ;
205 struct held_lock { u64 prev_chain_key; unsigned long acquire_ip; struct lockdep_map *instance; struct lockdep_map *nest_lock; u64 waittime_stamp; u64 holdtime_stamp; unsigned short class_idx; unsigned char irq_context; unsigned char trylock; unsigned char read; unsigned char check; unsigned char hardirqs_off; unsigned short references; } ;
537 struct raw_spinlock { arch_spinlock_t raw_lock; unsigned int magic; unsigned int owner_cpu; void *owner; struct lockdep_map dep_map; } ;
32 typedef struct raw_spinlock raw_spinlock_t;
33 struct __anonstruct____missing_field_name_33 { u8 __padding[24U]; struct lockdep_map dep_map; } ;
33 union __anonunion____missing_field_name_32 { struct raw_spinlock rlock; struct __anonstruct____missing_field_name_33 __annonCompField19; } ;
33 struct spinlock { union __anonunion____missing_field_name_32 __annonCompField20; } ;
76 typedef struct spinlock spinlock_t;
23 struct __anonstruct_rwlock_t_34 { arch_rwlock_t raw_lock; unsigned int magic; unsigned int owner_cpu; void *owner; struct lockdep_map dep_map; } ;
23 typedef struct __anonstruct_rwlock_t_34 rwlock_t;
59 struct static_key { atomic_t enabled; } ;
34 struct __wait_queue_head { spinlock_t lock; struct list_head task_list; } ;
39 typedef struct __wait_queue_head wait_queue_head_t;
919 struct mutex { atomic_t count; spinlock_t wait_lock; struct list_head wait_list; struct task_struct *owner; const char *name; void *magic; struct lockdep_map dep_map; } ;
67 struct mutex_waiter { struct list_head list; struct task_struct *task; void *magic; } ;
177 struct seqcount { unsigned int sequence; struct lockdep_map dep_map; } ;
51 typedef struct seqcount seqcount_t;
259 struct __anonstruct_seqlock_t_35 { struct seqcount seqcount; spinlock_t lock; } ;
259 typedef struct __anonstruct_seqlock_t_35 seqlock_t;
433 struct timespec { __kernel_time_t tv_sec; long tv_nsec; } ;
323 union ktime { s64 tv64; } ;
59 typedef union ktime ktime_t;
105 struct tvec_base ;
106 struct timer_list { struct list_head entry; unsigned long expires; struct tvec_base *base; void (*function)(unsigned long); unsigned long data; int slack; int start_pid; void *start_site; char start_comm[16U]; struct lockdep_map lockdep_map; } ;
254 struct hrtimer ;
255 enum hrtimer_restart ;
266 struct workqueue_struct ;
267 struct work_struct ;
54 struct work_struct { atomic_long_t data; struct list_head entry; void (*func)(struct work_struct *); struct lockdep_map lockdep_map; } ;
107 struct delayed_work { struct work_struct work; struct timer_list timer; struct workqueue_struct *wq; int cpu; } ;
141 struct execute_work { struct work_struct work; } ;
98 struct __anonstruct_nodemask_t_36 { unsigned long bits[16U]; } ;
98 typedef struct __anonstruct_nodemask_t_36 nodemask_t;
799 struct rw_semaphore ;
800 struct rw_semaphore { long count; raw_spinlock_t wait_lock; struct list_head wait_list; struct lockdep_map dep_map; } ;
155 struct completion { unsigned int done; wait_queue_head_t wait; } ;
223 struct notifier_block ;
51 struct notifier_block { int (*notifier_call)(struct notifier_block *, unsigned long, void *); struct notifier_block *next; int priority; } ;
63 struct blocking_notifier_head { struct rw_semaphore rwsem; struct notifier_block *head; } ;
891 struct ctl_table ;
72 struct resource { resource_size_t start; resource_size_t end; const char *name; unsigned long flags; struct resource *parent; struct resource *sibling; struct resource *child; } ;
172 struct pci_dev ;
58 struct pm_message { int event; } ;
64 typedef struct pm_message pm_message_t;
65 struct dev_pm_ops { int (*prepare)(struct device *); void (*complete)(struct device *); int (*suspend)(struct device *); int (*resume)(struct device *); int (*freeze)(struct device *); int (*thaw)(struct device *); int (*poweroff)(struct device *); int (*restore)(struct device *); int (*suspend_late)(struct device *); int (*resume_early)(struct device *); int (*freeze_late)(struct device *); int (*thaw_early)(struct device *); int (*poweroff_late)(struct device *); int (*restore_early)(struct device *); int (*suspend_noirq)(struct device *); int (*resume_noirq)(struct device *); int (*freeze_noirq)(struct device *); int (*thaw_noirq)(struct device *); int (*poweroff_noirq)(struct device *); int (*restore_noirq)(struct device *); int (*runtime_suspend)(struct device *); int (*runtime_resume)(struct device *); int (*runtime_idle)(struct device *); } ;
301 enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ;
308 enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ;
316 struct wakeup_source ;
527 struct pm_subsys_data { spinlock_t lock; unsigned int refcount; struct list_head clock_list; } ;
534 struct dev_pm_qos ;
534 struct dev_pm_info { pm_message_t power_state; unsigned char can_wakeup; unsigned char async_suspend; bool is_prepared; bool is_suspended; bool ignore_children; bool early_init; spinlock_t lock; struct list_head entry; struct completion completion; struct wakeup_source *wakeup; bool wakeup_path; bool syscore; struct timer_list suspend_timer; unsigned long timer_expires; struct work_struct work; wait_queue_head_t wait_queue; atomic_t usage_count; atomic_t child_count; unsigned char disable_depth; unsigned char idle_notification; unsigned char request_pending; unsigned char deferred_resume; unsigned char run_wake; unsigned char runtime_auto; unsigned char no_callbacks; unsigned char irq_safe; unsigned char use_autosuspend; unsigned char timer_autosuspends; unsigned char memalloc_noio; enum rpm_request request; enum rpm_status runtime_status; int runtime_error; int autosuspend_delay; unsigned long last_busy; unsigned long active_jiffies; unsigned long suspended_jiffies; unsigned long accounting_timestamp; struct pm_subsys_data *subsys_data; struct dev_pm_qos *qos; } ;
591 struct dev_pm_domain { struct dev_pm_ops ops; } ;
133 struct pci_bus ;
22 struct __anonstruct_mm_context_t_101 { void *ldt; int size; unsigned short ia32_compat; struct mutex lock; void *vdso; } ;
22 typedef struct __anonstruct_mm_context_t_101 mm_context_t;
18 struct rb_node { unsigned long __rb_parent_color; struct rb_node *rb_right; struct rb_node *rb_left; } ;
40 struct rb_root { struct rb_node *rb_node; } ;
87 struct vm_area_struct ;
22 struct bio_vec ;
341 struct device_node ;
1276 struct llist_node ;
64 struct llist_node { struct llist_node *next; } ;
19 union __anonunion____missing_field_name_128 { struct list_head list; struct llist_node llist; } ;
19 struct call_single_data { union __anonunion____missing_field_name_128 __annonCompField31; void (*func)(void *); void *info; u16 flags; } ;
424 struct inode ;
45 struct arch_uprobe_task { unsigned long saved_scratch_register; unsigned int saved_trap_nr; unsigned int saved_tf; } ;
54 enum uprobe_task_state { UTASK_RUNNING = 0, UTASK_SSTEP = 1, UTASK_SSTEP_ACK = 2, UTASK_SSTEP_TRAPPED = 3 } ;
61 struct __anonstruct____missing_field_name_131 { struct arch_uprobe_task autask; unsigned long vaddr; } ;
61 struct __anonstruct____missing_field_name_132 { struct callback_head dup_xol_work; unsigned long dup_xol_addr; } ;
61 union __anonunion____missing_field_name_130 { struct __anonstruct____missing_field_name_131 __annonCompField33; struct __anonstruct____missing_field_name_132 __annonCompField34; } ;
61 struct uprobe ;
61 struct return_instance ;
61 struct uprobe_task { enum uprobe_task_state state; union __anonunion____missing_field_name_130 __annonCompField35; struct uprobe *active_uprobe; unsigned long xol_vaddr; struct return_instance *return_instances; unsigned int depth; } ;
93 struct xol_area ;
94 struct uprobes_state { struct xol_area *xol_area; } ;
129 struct address_space ;
130 union __anonunion____missing_field_name_133 { struct address_space *mapping; void *s_mem; } ;
130 union __anonunion____missing_field_name_135 { unsigned long index; void *freelist; bool pfmemalloc; } ;
130 struct __anonstruct____missing_field_name_139 { unsigned short inuse; unsigned short objects; unsigned char frozen; } ;
130 union __anonunion____missing_field_name_138 { atomic_t _mapcount; struct __anonstruct____missing_field_name_139 __annonCompField38; int units; } ;
130 struct __anonstruct____missing_field_name_137 { union __anonunion____missing_field_name_138 __annonCompField39; atomic_t _count; } ;
130 union __anonunion____missing_field_name_136 { unsigned long counters; struct __anonstruct____missing_field_name_137 __annonCompField40; unsigned int active; } ;
130 struct __anonstruct____missing_field_name_134 { union __anonunion____missing_field_name_135 __annonCompField37; union __anonunion____missing_field_name_136 __annonCompField41; } ;
130 struct __anonstruct____missing_field_name_141 { struct page *next; int pages; int pobjects; } ;
130 struct slab ;
130 union __anonunion____missing_field_name_140 { struct list_head lru; struct __anonstruct____missing_field_name_141 __annonCompField43; struct list_head list; struct slab *slab_page; struct callback_head callback_head; pgtable_t pmd_huge_pte; } ;
130 union __anonunion____missing_field_name_142 { unsigned long private; spinlock_t *ptl; struct kmem_cache *slab_cache; struct page *first_page; } ;
130 struct page { unsigned long flags; union __anonunion____missing_field_name_133 __annonCompField36; struct __anonstruct____missing_field_name_134 __annonCompField42; union __anonunion____missing_field_name_140 __annonCompField44; union __anonunion____missing_field_name_142 __annonCompField45; unsigned long debug_flags; } ;
186 struct page_frag { struct page *page; __u32 offset; __u32 size; } ;
238 struct __anonstruct_linear_144 { struct rb_node rb; unsigned long rb_subtree_last; } ;
238 union __anonunion_shared_143 { struct __anonstruct_linear_144 linear; struct list_head nonlinear; } ;
238 struct anon_vma ;
238 struct vm_operations_struct ;
238 struct mempolicy ;
238 struct vm_area_struct { unsigned long vm_start; unsigned long vm_end; struct vm_area_struct *vm_next; struct vm_area_struct *vm_prev; struct rb_node vm_rb; unsigned long rb_subtree_gap; struct mm_struct *vm_mm; pgprot_t vm_page_prot; unsigned long vm_flags; union __anonunion_shared_143 shared; struct list_head anon_vma_chain; struct anon_vma *anon_vma; const struct vm_operations_struct *vm_ops; unsigned long vm_pgoff; struct file *vm_file; void *vm_private_data; struct mempolicy *vm_policy; } ;
310 struct core_thread { struct task_struct *task; struct core_thread *next; } ;
316 struct core_state { atomic_t nr_threads; struct core_thread dumper; struct completion startup; } ;
329 struct task_rss_stat { int events; int count[3U]; } ;
337 struct mm_rss_stat { atomic_long_t count[3U]; } ;
342 struct kioctx_table ;
343 struct linux_binfmt ;
343 struct mmu_notifier_mm ;
343 struct mm_struct { struct vm_area_struct *mmap; struct rb_root mm_rb; struct vm_area_struct *mmap_cache; unsigned long int (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); unsigned long mmap_base; unsigned long mmap_legacy_base; unsigned long task_size; unsigned long highest_vm_end; pgd_t *pgd; atomic_t mm_users; atomic_t mm_count; atomic_long_t nr_ptes; int map_count; spinlock_t page_table_lock; struct rw_semaphore mmap_sem; struct list_head mmlist; unsigned long hiwater_rss; unsigned long hiwater_vm; unsigned long total_vm; unsigned long locked_vm; unsigned long pinned_vm; unsigned long shared_vm; unsigned long exec_vm; unsigned long stack_vm; unsigned long def_flags; unsigned long start_code; unsigned long end_code; unsigned long start_data; unsigned long end_data; unsigned long start_brk; unsigned long brk; unsigned long start_stack; unsigned long arg_start; unsigned long arg_end; unsigned long env_start; unsigned long env_end; unsigned long saved_auxv[46U]; struct mm_rss_stat rss_stat; struct linux_binfmt *binfmt; cpumask_var_t cpu_vm_mask_var; mm_context_t context; unsigned long flags; struct core_state *core_state; spinlock_t ioctx_lock; struct kioctx_table *ioctx_table; struct task_struct *owner; struct file *exe_file; struct mmu_notifier_mm *mmu_notifier_mm; struct cpumask cpumask_allocation; unsigned long numa_next_scan; unsigned long numa_scan_offset; int numa_scan_seq; bool tlb_flush_pending; struct uprobes_state uprobes_state; } ;
93 struct shrink_control { gfp_t gfp_mask; unsigned long nr_to_scan; nodemask_t nodes_to_scan; int nid; } ;
26 struct shrinker { unsigned long int (*count_objects)(struct shrinker *, struct shrink_control *); unsigned long int (*scan_objects)(struct shrinker *, struct shrink_control *); int seeks; long batch; unsigned long flags; struct list_head list; atomic_long_t *nr_deferred; } ;
71 struct file_ra_state ;
72 struct user_struct ;
73 struct writeback_control ;
185 struct vm_fault { unsigned int flags; unsigned long pgoff; void *virtual_address; struct page *page; } ;
210 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 *); int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); int (*access)(struct vm_area_struct *, unsigned long, void *, int, int); 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 *, const nodemask_t *, const nodemask_t *, unsigned long); int (*remap_pages)(struct vm_area_struct *, unsigned long, unsigned long, unsigned long); } ;
2071 struct scatterlist { unsigned long sg_magic; unsigned long page_link; unsigned int offset; unsigned int length; dma_addr_t dma_address; unsigned int dma_length; } ;
17 struct sg_table { struct scatterlist *sgl; unsigned int nents; unsigned int orig_nents; } ;
351 struct __kfifo { unsigned int in; unsigned int out; unsigned int mask; unsigned int esize; void *data; } ;
65 union __anonunion____missing_field_name_145 { struct __kfifo kfifo; unsigned char *type; const unsigned char *const_type; char (*rectype)[0U]; void *ptr; const void *ptr_const; } ;
65 struct kfifo { union __anonunion____missing_field_name_145 __annonCompField46; unsigned char buf[0U]; } ;
832 struct scsi_cmnd ;
372 struct scsi_lun { __u8 scsi_lun[8U]; } ;
77 typedef uint32_t itt_t;
78 struct iscsi_hdr { uint8_t opcode; uint8_t flags; uint8_t rsvd2[2U]; uint8_t hlength; uint8_t dlength[3U]; struct scsi_lun lun; itt_t itt; __be32 ttt; __be32 statsn; __be32 exp_statsn; __be32 max_statsn; uint8_t other[12U]; } ;
143 struct iscsi_scsi_req { uint8_t opcode; uint8_t flags; __be16 rsvd2; uint8_t hlength; uint8_t dlength[3U]; struct scsi_lun lun; itt_t itt; __be32 data_length; __be32 cmdsn; __be32 exp_statsn; uint8_t cdb[16U]; } ;
282 struct iscsi_tm { uint8_t opcode; uint8_t flags; uint8_t rsvd1[2U]; uint8_t hlength; uint8_t dlength[3U]; struct scsi_lun lun; itt_t itt; itt_t rtt; __be32 cmdsn; __be32 exp_statsn; __be32 refcmdsn; __be32 exp_datasn; uint8_t rsvd2[8U]; } ;
627 struct iovec { void *iov_base; __kernel_size_t iov_len; } ;
11 typedef unsigned short __kernel_sa_family_t;
18 struct cred ;
23 typedef __kernel_sa_family_t sa_family_t;
24 struct sockaddr { sa_family_t sa_family; char sa_data[14U]; } ;
359 struct in_addr { __be32 s_addr; } ;
104 union __anonunion_in6_u_148 { __u8 u6_addr8[16U]; __be16 u6_addr16[8U]; __be32 u6_addr32[4U]; } ;
104 struct in6_addr { union __anonunion_in6_u_148 in6_u; } ;
93 enum iscsi_tgt_dscvr { ISCSI_TGT_DSCVR_SEND_TARGETS = 1, ISCSI_TGT_DSCVR_ISNS = 2, ISCSI_TGT_DSCVR_SLP = 3 } ;
311 enum iscsi_param_type { ISCSI_PARAM = 0, ISCSI_HOST_PARAM = 1, ISCSI_NET_PARAM = 2, ISCSI_FLASHNODE_PARAM = 3, ISCSI_CHAP_PARAM = 4, ISCSI_IFACE_PARAM = 5 } ;
327 struct iscsi_iface_param_info { uint32_t iface_num; uint32_t len; uint16_t param; uint8_t iface_type; uint8_t param_type; uint8_t value[0U]; } ;
336 union __anonunion_src_151 { struct in_addr v4_addr; struct in6_addr v6_addr; } ;
336 union __anonunion_dst_152 { struct in_addr v4_addr; struct in6_addr v6_addr; } ;
336 struct iscsi_path { uint64_t handle; uint8_t mac_addr[6U]; uint8_t mac_addr_old[6U]; uint32_t ip_addr_len; union __anonunion_src_151 src; union __anonunion_dst_152 dst; uint16_t vlan_id; uint16_t pmtu; } ;
490 enum iscsi_param { ISCSI_PARAM_MAX_RECV_DLENGTH = 0, ISCSI_PARAM_MAX_XMIT_DLENGTH = 1, ISCSI_PARAM_HDRDGST_EN = 2, ISCSI_PARAM_DATADGST_EN = 3, ISCSI_PARAM_INITIAL_R2T_EN = 4, ISCSI_PARAM_MAX_R2T = 5, ISCSI_PARAM_IMM_DATA_EN = 6, ISCSI_PARAM_FIRST_BURST = 7, ISCSI_PARAM_MAX_BURST = 8, ISCSI_PARAM_PDU_INORDER_EN = 9, ISCSI_PARAM_DATASEQ_INORDER_EN = 10, ISCSI_PARAM_ERL = 11, ISCSI_PARAM_IFMARKER_EN = 12, ISCSI_PARAM_OFMARKER_EN = 13, ISCSI_PARAM_EXP_STATSN = 14, ISCSI_PARAM_TARGET_NAME = 15, ISCSI_PARAM_TPGT = 16, ISCSI_PARAM_PERSISTENT_ADDRESS = 17, ISCSI_PARAM_PERSISTENT_PORT = 18, ISCSI_PARAM_SESS_RECOVERY_TMO = 19, ISCSI_PARAM_CONN_PORT = 20, ISCSI_PARAM_CONN_ADDRESS = 21, ISCSI_PARAM_USERNAME = 22, ISCSI_PARAM_USERNAME_IN = 23, ISCSI_PARAM_PASSWORD = 24, ISCSI_PARAM_PASSWORD_IN = 25, ISCSI_PARAM_FAST_ABORT = 26, ISCSI_PARAM_ABORT_TMO = 27, ISCSI_PARAM_LU_RESET_TMO = 28, ISCSI_PARAM_HOST_RESET_TMO = 29, ISCSI_PARAM_PING_TMO = 30, ISCSI_PARAM_RECV_TMO = 31, ISCSI_PARAM_IFACE_NAME = 32, ISCSI_PARAM_ISID = 33, ISCSI_PARAM_INITIATOR_NAME = 34, ISCSI_PARAM_TGT_RESET_TMO = 35, ISCSI_PARAM_TARGET_ALIAS = 36, ISCSI_PARAM_CHAP_IN_IDX = 37, ISCSI_PARAM_CHAP_OUT_IDX = 38, ISCSI_PARAM_BOOT_ROOT = 39, ISCSI_PARAM_BOOT_NIC = 40, ISCSI_PARAM_BOOT_TARGET = 41, ISCSI_PARAM_AUTO_SND_TGT_DISABLE = 42, ISCSI_PARAM_DISCOVERY_SESS = 43, ISCSI_PARAM_PORTAL_TYPE = 44, ISCSI_PARAM_CHAP_AUTH_EN = 45, ISCSI_PARAM_DISCOVERY_LOGOUT_EN = 46, ISCSI_PARAM_BIDI_CHAP_EN = 47, ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL = 48, ISCSI_PARAM_DEF_TIME2WAIT = 49, ISCSI_PARAM_DEF_TIME2RETAIN = 50, ISCSI_PARAM_MAX_SEGMENT_SIZE = 51, ISCSI_PARAM_STATSN = 52, ISCSI_PARAM_KEEPALIVE_TMO = 53, ISCSI_PARAM_LOCAL_PORT = 54, ISCSI_PARAM_TSID = 55, ISCSI_PARAM_DEF_TASKMGMT_TMO = 56, ISCSI_PARAM_TCP_TIMESTAMP_STAT = 57, ISCSI_PARAM_TCP_WSF_DISABLE = 58, ISCSI_PARAM_TCP_NAGLE_DISABLE = 59, ISCSI_PARAM_TCP_TIMER_SCALE = 60, ISCSI_PARAM_TCP_TIMESTAMP_EN = 61, ISCSI_PARAM_TCP_XMIT_WSF = 62, ISCSI_PARAM_TCP_RECV_WSF = 63, ISCSI_PARAM_IP_FRAGMENT_DISABLE = 64, ISCSI_PARAM_IPV4_TOS = 65, ISCSI_PARAM_IPV6_TC = 66, ISCSI_PARAM_IPV6_FLOW_LABEL = 67, ISCSI_PARAM_IS_FW_ASSIGNED_IPV6 = 68, ISCSI_PARAM_DISCOVERY_PARENT_IDX = 69, ISCSI_PARAM_DISCOVERY_PARENT_TYPE = 70, ISCSI_PARAM_LOCAL_IPADDR = 71, ISCSI_PARAM_MAX = 72 } ;
566 enum iscsi_host_param { ISCSI_HOST_PARAM_HWADDRESS = 0, ISCSI_HOST_PARAM_INITIATOR_NAME = 1, ISCSI_HOST_PARAM_NETDEV_NAME = 2, ISCSI_HOST_PARAM_IPADDRESS = 3, ISCSI_HOST_PARAM_PORT_STATE = 4, ISCSI_HOST_PARAM_PORT_SPEED = 5, ISCSI_HOST_PARAM_MAX = 6 } ;
744 struct iscsi_stats_custom { char desc[64U]; uint64_t value; } ;
784 struct iscsi_stats { uint64_t txdata_octets; uint64_t rxdata_octets; uint32_t noptx_pdus; uint32_t scsicmd_pdus; uint32_t tmfcmd_pdus; uint32_t login_pdus; uint32_t text_pdus; uint32_t dataout_pdus; uint32_t logout_pdus; uint32_t snack_pdus; uint32_t noprx_pdus; uint32_t scsirsp_pdus; uint32_t tmfrsp_pdus; uint32_t textrsp_pdus; uint32_t datain_pdus; uint32_t logoutrsp_pdus; uint32_t r2t_pdus; uint32_t async_pdus; uint32_t rjt_pdus; uint32_t digest_err; uint32_t timeout_err; uint32_t custom_length; struct iscsi_stats_custom custom[0U]; } ;
959 struct idr_layer { int prefix; unsigned long bitmap[4U]; struct idr_layer *ary[256U]; int count; int layer; struct callback_head callback_head; } ;
38 struct idr { struct idr_layer *hint; struct idr_layer *top; struct idr_layer *id_free; int layers; int id_free_cnt; int cur; spinlock_t lock; } ;
197 struct ida_bitmap { long nr_busy; unsigned long bitmap[15U]; } ;
213 struct ida { struct idr idr; struct ida_bitmap *free_bitmap; } ;
245 struct dentry ;
246 struct iattr ;
247 struct super_block ;
248 struct file_system_type ;
249 struct kernfs_open_node ;
250 struct kernfs_iattrs ;
266 struct kernfs_root ;
266 struct kernfs_elem_dir { unsigned long subdirs; struct rb_root children; struct kernfs_root *root; } ;
62 struct kernfs_node ;
62 struct kernfs_elem_symlink { struct kernfs_node *target_kn; } ;
66 struct kernfs_ops ;
66 struct kernfs_elem_attr { const struct kernfs_ops *ops; struct kernfs_open_node *open; loff_t size; } ;
72 union __anonunion_u_153 { struct completion *completion; struct kernfs_node *removed_list; } ;
72 union __anonunion____missing_field_name_154 { struct kernfs_elem_dir dir; struct kernfs_elem_symlink symlink; struct kernfs_elem_attr attr; } ;
72 struct kernfs_node { atomic_t count; atomic_t active; struct lockdep_map dep_map; struct kernfs_node *parent; const char *name; struct rb_node rb; union __anonunion_u_153 u; const void *ns; unsigned int hash; union __anonunion____missing_field_name_154 __annonCompField49; void *priv; unsigned short flags; umode_t mode; unsigned int ino; struct kernfs_iattrs *iattr; } ;
114 struct kernfs_dir_ops { int (*mkdir)(struct kernfs_node *, const char *, umode_t ); int (*rmdir)(struct kernfs_node *); int (*rename)(struct kernfs_node *, struct kernfs_node *, const char *); } ;
127 struct kernfs_root { struct kernfs_node *kn; struct ida ino_ida; struct kernfs_dir_ops *dir_ops; } ;
137 struct kernfs_open_file { struct kernfs_node *kn; struct file *file; struct mutex mutex; int event; struct list_head list; bool mmapped; const struct vm_operations_struct *vm_ops; } ;
151 struct kernfs_ops { int (*seq_show)(struct seq_file *, void *); void * (*seq_start)(struct seq_file *, loff_t *); void * (*seq_next)(struct seq_file *, void *, loff_t *); void (*seq_stop)(struct seq_file *, void *); ssize_t (*read)(struct kernfs_open_file *, char *, size_t , loff_t ); ssize_t (*write)(struct kernfs_open_file *, char *, size_t , loff_t ); int (*mmap)(struct kernfs_open_file *, struct vm_area_struct *); struct lock_class_key lockdep_key; } ;
376 struct sock ;
377 struct kobject ;
378 enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ;
384 struct kobj_ns_type_operations { enum kobj_ns_type type; bool (*current_may_mount)(); void * (*grab_current_ns)(); const void * (*netlink_ns)(struct sock *); const void * (*initial_ns)(); void (*drop_ns)(void *); } ;
83 struct user_namespace ;
22 struct __anonstruct_kuid_t_155 { uid_t val; } ;
22 typedef struct __anonstruct_kuid_t_155 kuid_t;
27 struct __anonstruct_kgid_t_156 { gid_t val; } ;
27 typedef struct __anonstruct_kgid_t_156 kgid_t;
127 struct kstat { u64 ino; dev_t dev; umode_t mode; unsigned int nlink; kuid_t uid; kgid_t gid; dev_t rdev; loff_t size; struct timespec atime; struct timespec mtime; struct timespec ctime; unsigned long blksize; unsigned long long blocks; } ;
36 struct bin_attribute ;
37 struct attribute { const char *name; umode_t mode; bool ignore_lockdep; struct lock_class_key *key; struct lock_class_key skey; } ;
37 struct attribute_group { const char *name; umode_t (*is_visible)(struct kobject *, struct attribute *, int); struct attribute **attrs; struct bin_attribute **bin_attrs; } ;
67 struct bin_attribute { struct attribute attr; size_t size; void *private; ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t , size_t ); ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t , size_t ); int (*mmap)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *); } ;
130 struct sysfs_ops { ssize_t (*show)(struct kobject *, struct attribute *, char *); ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t ); } ;
462 struct kref { atomic_t refcount; } ;
50 struct kset ;
50 struct kobj_type ;
50 struct kobject { const char *name; struct list_head entry; struct kobject *parent; struct kset *kset; struct kobj_type *ktype; struct kernfs_node *sd; struct kref kref; struct delayed_work release; unsigned char state_initialized; unsigned char state_in_sysfs; unsigned char state_add_uevent_sent; unsigned char state_remove_uevent_sent; unsigned char uevent_suppress; } ;
112 struct kobj_type { void (*release)(struct kobject *); const struct sysfs_ops *sysfs_ops; struct attribute **default_attrs; const struct kobj_ns_type_operations * (*child_ns_type)(struct kobject *); const void * (*namespace)(struct kobject *); } ;
120 struct kobj_uevent_env { char *envp[32U]; int envp_idx; char buf[2048U]; int buflen; } ;
127 struct kset_uevent_ops { const int (*filter)(struct kset *, struct kobject *); const const char * (*name)(struct kset *, struct kobject *); const int (*uevent)(struct kset *, struct kobject *, struct kobj_uevent_env *); } ;
144 struct kset { struct list_head list; spinlock_t list_lock; struct kobject kobj; const struct kset_uevent_ops *uevent_ops; } ;
219 struct klist_node ;
220 struct klist { spinlock_t k_lock; struct list_head k_list; void (*get)(struct klist_node *); void (*put)(struct klist_node *); } ;
37 struct klist_node { void *n_klist; struct list_head n_node; struct kref n_ref; } ;
67 struct path ;
68 struct seq_file { char *buf; size_t size; size_t from; size_t count; size_t pad_until; loff_t index; loff_t read_pos; u64 version; struct mutex lock; const struct seq_operations *op; int poll_event; struct user_namespace *user_ns; void *private; } ;
35 struct seq_operations { void * (*start)(struct seq_file *, loff_t *); void (*stop)(struct seq_file *, void *); void * (*next)(struct seq_file *, void *, loff_t *); int (*show)(struct seq_file *, void *); } ;
196 struct pinctrl ;
197 struct pinctrl_state ;
194 struct dev_pin_info { struct pinctrl *p; struct pinctrl_state *default_state; struct pinctrl_state *sleep_state; struct pinctrl_state *idle_state; } ;
42 struct dma_map_ops ;
42 struct dev_archdata { struct dma_map_ops *dma_ops; void *iommu; } ;
14 struct device_private ;
15 struct device_driver ;
16 struct driver_private ;
17 struct class ;
18 struct subsys_private ;
19 struct bus_type ;
20 struct iommu_ops ;
21 struct iommu_group ;
60 struct device_attribute ;
60 struct bus_type { const char *name; const char *dev_name; struct device *dev_root; struct device_attribute *dev_attrs; const struct attribute_group **bus_groups; const struct attribute_group **dev_groups; const struct attribute_group **drv_groups; int (*match)(struct device *, struct device_driver *); int (*uevent)(struct device *, struct kobj_uevent_env *); int (*probe)(struct device *); int (*remove)(struct device *); void (*shutdown)(struct device *); int (*online)(struct device *); int (*offline)(struct device *); int (*suspend)(struct device *, pm_message_t ); int (*resume)(struct device *); const struct dev_pm_ops *pm; struct iommu_ops *iommu_ops; struct subsys_private *p; struct lock_class_key lock_key; } ;
138 struct device_type ;
195 struct of_device_id ;
195 struct acpi_device_id ;
195 struct device_driver { const char *name; struct bus_type *bus; struct module *owner; const char *mod_name; bool suppress_bind_attrs; const struct of_device_id *of_match_table; const struct acpi_device_id *acpi_match_table; int (*probe)(struct device *); int (*remove)(struct device *); void (*shutdown)(struct device *); int (*suspend)(struct device *, pm_message_t ); int (*resume)(struct device *); const struct attribute_group **groups; const struct dev_pm_ops *pm; struct driver_private *p; } ;
321 struct class_attribute ;
321 struct class { const char *name; struct module *owner; struct class_attribute *class_attrs; const struct attribute_group **dev_groups; struct kobject *dev_kobj; int (*dev_uevent)(struct device *, struct kobj_uevent_env *); char * (*devnode)(struct device *, umode_t *); void (*class_release)(struct class *); void (*dev_release)(struct device *); int (*suspend)(struct device *, pm_message_t ); int (*resume)(struct device *); const struct kobj_ns_type_operations *ns_type; const void * (*namespace)(struct device *); const struct dev_pm_ops *pm; struct subsys_private *p; } ;
414 struct class_attribute { struct attribute attr; ssize_t (*show)(struct class *, struct class_attribute *, char *); ssize_t (*store)(struct class *, struct class_attribute *, const char *, size_t ); } ;
482 struct device_type { const char *name; const struct attribute_group **groups; int (*uevent)(struct device *, struct kobj_uevent_env *); char * (*devnode)(struct device *, umode_t *, kuid_t *, kgid_t *); void (*release)(struct device *); const struct dev_pm_ops *pm; } ;
510 struct device_attribute { struct attribute attr; ssize_t (*show)(struct device *, struct device_attribute *, char *); ssize_t (*store)(struct device *, struct device_attribute *, const char *, size_t ); } ;
637 struct device_dma_parameters { unsigned int max_segment_size; unsigned long segment_boundary_mask; } ;
646 struct acpi_device ;
647 struct acpi_dev_node { struct acpi_device *companion; } ;
653 struct dma_coherent_mem ;
653 struct device { struct device *parent; struct device_private *p; struct kobject kobj; const char *init_name; const struct device_type *type; struct mutex mutex; struct bus_type *bus; struct device_driver *driver; void *platform_data; struct dev_pm_info power; struct dev_pm_domain *pm_domain; struct dev_pin_info *pins; int numa_node; u64 *dma_mask; u64 coherent_dma_mask; struct device_dma_parameters *dma_parms; struct list_head dma_pools; struct dma_coherent_mem *dma_mem; struct dev_archdata archdata; struct device_node *of_node; struct acpi_dev_node acpi_node; dev_t devt; u32 id; spinlock_t devres_lock; struct list_head devres_head; struct klist_node knode_class; struct class *class; const struct attribute_group **groups; void (*release)(struct device *); struct iommu_group *iommu_group; bool offline_disabled; bool offline; } ;
795 struct wakeup_source { const char *name; struct list_head entry; spinlock_t lock; struct timer_list timer; unsigned long timer_expires; ktime_t total_time; ktime_t max_time; ktime_t last_time; ktime_t start_prevent_time; ktime_t prevent_sleep_time; unsigned long event_count; unsigned long active_count; unsigned long relax_count; unsigned long expire_count; unsigned long wakeup_count; bool active; bool autosleep_enabled; } ;
1185 struct scsi_transport_template ;
1186 struct iscsi_transport ;
1187 struct iscsi_endpoint ;
1188 struct Scsi_Host ;
1189 struct iscsi_cls_conn ;
1190 struct iscsi_conn ;
1191 struct iscsi_task ;
1192 struct iscsi_iface ;
1193 struct bsg_job ;
1194 struct iscsi_bus_flash_session ;
1195 struct iscsi_bus_flash_conn ;
1196 struct iscsi_cls_session ;
1196 struct iscsi_transport { struct module *owner; char *name; unsigned int caps; struct iscsi_cls_session * (*create_session)(struct iscsi_endpoint *, uint16_t , uint16_t , uint32_t ); void (*destroy_session)(struct iscsi_cls_session *); struct iscsi_cls_conn * (*create_conn)(struct iscsi_cls_session *, uint32_t ); int (*bind_conn)(struct iscsi_cls_session *, struct iscsi_cls_conn *, uint64_t , int); int (*start_conn)(struct iscsi_cls_conn *); void (*stop_conn)(struct iscsi_cls_conn *, int); void (*destroy_conn)(struct iscsi_cls_conn *); int (*set_param)(struct iscsi_cls_conn *, enum iscsi_param , char *, int); int (*get_ep_param)(struct iscsi_endpoint *, enum iscsi_param , char *); int (*get_conn_param)(struct iscsi_cls_conn *, enum iscsi_param , char *); int (*get_session_param)(struct iscsi_cls_session *, enum iscsi_param , char *); int (*get_host_param)(struct Scsi_Host *, enum iscsi_host_param , char *); int (*set_host_param)(struct Scsi_Host *, enum iscsi_host_param , char *, int); int (*send_pdu)(struct iscsi_cls_conn *, struct iscsi_hdr *, char *, uint32_t ); void (*get_stats)(struct iscsi_cls_conn *, struct iscsi_stats *); int (*init_task)(struct iscsi_task *); int (*xmit_task)(struct iscsi_task *); void (*cleanup_task)(struct iscsi_task *); int (*alloc_pdu)(struct iscsi_task *, uint8_t ); int (*xmit_pdu)(struct iscsi_task *); int (*init_pdu)(struct iscsi_task *, unsigned int, unsigned int); void (*parse_pdu_itt)(struct iscsi_conn *, itt_t , int *, int *); void (*session_recovery_timedout)(struct iscsi_cls_session *); struct iscsi_endpoint * (*ep_connect)(struct Scsi_Host *, struct sockaddr *, int); int (*ep_poll)(struct iscsi_endpoint *, int); void (*ep_disconnect)(struct iscsi_endpoint *); int (*tgt_dscvr)(struct Scsi_Host *, enum iscsi_tgt_dscvr , uint32_t , struct sockaddr *); int (*set_path)(struct Scsi_Host *, struct iscsi_path *); int (*set_iface_param)(struct Scsi_Host *, void *, uint32_t ); int (*get_iface_param)(struct iscsi_iface *, enum iscsi_param_type , int, char *); umode_t (*attr_is_visible)(int, int); int (*bsg_request)(struct bsg_job *); int (*send_ping)(struct Scsi_Host *, uint32_t , uint32_t , uint32_t , uint32_t , struct sockaddr *); int (*get_chap)(struct Scsi_Host *, uint16_t , uint32_t *, char *); int (*delete_chap)(struct Scsi_Host *, uint16_t ); int (*set_chap)(struct Scsi_Host *, void *, int); int (*get_flashnode_param)(struct iscsi_bus_flash_session *, int, char *); int (*set_flashnode_param)(struct iscsi_bus_flash_session *, struct iscsi_bus_flash_conn *, void *, int); int (*new_flashnode)(struct Scsi_Host *, const char *, int); int (*del_flashnode)(struct iscsi_bus_flash_session *); int (*login_flashnode)(struct iscsi_bus_flash_session *, struct iscsi_bus_flash_conn *); int (*logout_flashnode)(struct iscsi_bus_flash_session *, struct iscsi_bus_flash_conn *); int (*logout_flashnode_sid)(struct iscsi_cls_session *); int (*get_host_stats)(struct Scsi_Host *, char *, int); } ;
199 struct iscsi_cls_conn { struct list_head conn_list; void *dd_data; struct iscsi_transport *transport; uint32_t cid; struct mutex ep_mutex; struct iscsi_endpoint *ep; struct device dev; } ;
219 struct iscsi_cls_session { struct list_head sess_list; struct iscsi_transport *transport; spinlock_t lock; struct work_struct block_work; struct work_struct unblock_work; struct work_struct scan_work; struct work_struct unbind_work; int recovery_tmo; struct delayed_work recovery_work; unsigned int target_id; bool ida_used; pid_t creator; int state; int sid; void *dd_data; struct device dev; } ;
258 struct request_queue ;
258 struct iscsi_cls_host { atomic_t nr_scans; struct mutex mutex; struct request_queue *bsg_q; uint32_t port_speed; uint32_t port_state; } ;
283 struct iscsi_endpoint { void *dd_data; struct device dev; uint64_t id; struct iscsi_cls_conn *conn; } ;
291 struct iscsi_iface { struct device dev; struct iscsi_transport *transport; uint32_t iface_type; uint32_t iface_num; void *dd_data; } ;
299 struct iscsi_bus_flash_conn { struct list_head conn_list; void *dd_data; struct iscsi_transport *transport; struct device dev; uint32_t exp_statsn; uint32_t statsn; unsigned int max_recv_dlength; unsigned int max_xmit_dlength; unsigned int max_segment_size; unsigned int tcp_xmit_wsf; unsigned int tcp_recv_wsf; int hdrdgst_en; int datadgst_en; int port; char *ipaddress; char *link_local_ipv6_addr; char *redirect_ipaddr; uint16_t keepalive_timeout; uint16_t local_port; uint8_t snack_req_en; uint8_t tcp_timestamp_stat; uint8_t tcp_nagle_disable; uint8_t tcp_wsf_disable; uint8_t tcp_timer_scale; uint8_t tcp_timestamp_en; uint8_t ipv4_tos; uint8_t ipv6_traffic_class; uint8_t ipv6_flow_label; uint8_t fragment_disable; uint8_t is_fw_assigned_ipv6; } ;
343 struct iscsi_bus_flash_session { struct list_head sess_list; struct iscsi_transport *transport; unsigned int target_id; int flash_state; void *dd_data; struct device dev; unsigned int first_burst; unsigned int max_burst; unsigned short max_r2t; int default_taskmgmt_timeout; int initial_r2t_en; int imm_data_en; int time2wait; int time2retain; int pdu_inorder_en; int dataseq_inorder_en; int erl; int tpgt; char *username; char *username_in; char *password; char *password_in; char *targetname; char *targetalias; char *portal_type; uint16_t tsid; uint16_t chap_in_idx; uint16_t chap_out_idx; uint16_t discovery_parent_idx; uint16_t discovery_parent_type; uint8_t auto_snd_tgt_disable; uint8_t discovery_sess; uint8_t entry_state; uint8_t chap_auth_en; uint8_t discovery_logout_en; uint8_t bidi_chap_en; uint8_t discovery_auth_optional; uint8_t isid[6U]; uint8_t is_boot_target; } ;
485 struct scsi_host_template ;
486 struct scsi_device ;
487 struct scsi_target ;
489 struct iscsi_session ;
514 struct iscsi_r2t_info { __be32 ttt; __be32 exp_statsn; uint32_t data_length; uint32_t data_offset; int data_count; int datasn; int sent; } ;
107 struct iscsi_task { struct iscsi_hdr *hdr; unsigned short hdr_max; unsigned short hdr_len; itt_t hdr_itt; __be32 cmdsn; struct scsi_lun lun; int itt; unsigned int imm_count; struct iscsi_r2t_info unsol_r2t; char *data; unsigned int data_count; struct scsi_cmnd *sc; struct iscsi_conn *conn; unsigned long last_xfer; unsigned long last_timeout; bool have_checked_conn; int state; atomic_t refcount; struct list_head running; void *dd_data; } ;
159 struct iscsi_conn { struct iscsi_cls_conn *cls_conn; void *dd_data; struct iscsi_session *session; int stop_stage; struct timer_list transport_timer; unsigned long last_recv; unsigned long last_ping; int ping_timeout; int recv_timeout; struct iscsi_task *ping_task; uint32_t exp_statsn; uint32_t statsn; int id; int c_stage; char *data; struct iscsi_task *login_task; struct iscsi_task *task; struct list_head mgmtqueue; struct list_head cmdqueue; struct list_head requeue; struct work_struct xmitwork; unsigned long suspend_tx; unsigned long suspend_rx; wait_queue_head_t ehwait; struct iscsi_tm tmhdr; struct timer_list tmf_timer; int tmf_state; unsigned int max_recv_dlength; unsigned int max_xmit_dlength; int hdrdgst_en; int datadgst_en; int ifmarker_en; int ofmarker_en; int persistent_port; char *persistent_address; unsigned int max_segment_size; unsigned int tcp_xmit_wsf; unsigned int tcp_recv_wsf; uint16_t keepalive_tmo; uint16_t local_port; uint8_t tcp_timestamp_stat; uint8_t tcp_nagle_disable; uint8_t tcp_wsf_disable; uint8_t tcp_timer_scale; uint8_t tcp_timestamp_en; uint8_t fragment_disable; uint8_t ipv4_tos; uint8_t ipv6_traffic_class; uint8_t ipv6_flow_label; uint8_t is_fw_assigned_ipv6; char *local_ipaddr; uint64_t txdata_octets; uint64_t rxdata_octets; uint32_t scsicmd_pdus_cnt; uint32_t dataout_pdus_cnt; uint32_t scsirsp_pdus_cnt; uint32_t datain_pdus_cnt; uint32_t r2t_pdus_cnt; uint32_t tmfcmd_pdus_cnt; int32_t tmfrsp_pdus_cnt; uint32_t eh_abort_cnt; uint32_t fmr_unalign_cnt; } ;
251 struct iscsi_pool { struct kfifo queue; void **pool; int max; } ;
267 struct iscsi_session { struct iscsi_cls_session *cls_session; struct mutex eh_mutex; uint32_t cmdsn; uint32_t exp_cmdsn; uint32_t max_cmdsn; uint32_t queued_cmdsn; int abort_timeout; int lu_reset_timeout; int tgt_reset_timeout; int initial_r2t_en; unsigned short max_r2t; int imm_data_en; unsigned int first_burst; unsigned int max_burst; int time2wait; int time2retain; int pdu_inorder_en; int dataseq_inorder_en; int erl; int fast_abort; int tpgt; char *username; char *username_in; char *password; char *password_in; char *targetname; char *targetalias; char *ifacename; char *initiatorname; char *boot_root; char *boot_nic; char *boot_target; char *portal_type; char *discovery_parent_type; uint16_t discovery_parent_idx; uint16_t def_taskmgmt_tmo; uint16_t tsid; uint8_t auto_snd_tgt_disable; uint8_t discovery_sess; uint8_t chap_auth_en; uint8_t discovery_logout_en; uint8_t bidi_chap_en; uint8_t discovery_auth_optional; uint8_t isid[6U]; struct iscsi_transport *tt; struct Scsi_Host *host; struct iscsi_conn *leadconn; spinlock_t lock; int state; int age; int scsi_cmds_max; int cmds_max; struct iscsi_task **cmds; struct iscsi_pool cmdpool; void *dd_data; } ;
485 struct attribute_container { struct list_head node; struct klist containers; struct class *class; const struct attribute_group *grp; struct device_attribute **attrs; int (*match)(struct attribute_container *, struct device *); unsigned long flags; } ;
71 struct transport_container ;
43 struct transport_container { struct attribute_container ac; const struct attribute_group *statistics; } ;
22 struct kernel_cap_struct { __u32 cap[2U]; } ;
25 typedef struct kernel_cap_struct kernel_cap_t;
218 struct plist_head { struct list_head node_list; } ;
84 struct plist_node { int prio; struct list_head prio_list; struct list_head node_list; } ;
4 typedef unsigned long cputime_t;
25 struct sem_undo_list ;
25 struct sysv_sem { struct sem_undo_list *undo_list; } ;
24 struct __anonstruct_sigset_t_158 { unsigned long sig[1U]; } ;
24 typedef struct __anonstruct_sigset_t_158 sigset_t;
25 struct siginfo ;
17 typedef void __signalfn_t(int);
18 typedef __signalfn_t *__sighandler_t;
20 typedef void __restorefn_t();
21 typedef __restorefn_t *__sigrestore_t;
34 union sigval { int sival_int; void *sival_ptr; } ;
10 typedef union sigval sigval_t;
11 struct __anonstruct__kill_160 { __kernel_pid_t _pid; __kernel_uid32_t _uid; } ;
11 struct __anonstruct__timer_161 { __kernel_timer_t _tid; int _overrun; char _pad[0U]; sigval_t _sigval; int _sys_private; } ;
11 struct __anonstruct__rt_162 { __kernel_pid_t _pid; __kernel_uid32_t _uid; sigval_t _sigval; } ;
11 struct __anonstruct__sigchld_163 { __kernel_pid_t _pid; __kernel_uid32_t _uid; int _status; __kernel_clock_t _utime; __kernel_clock_t _stime; } ;
11 struct __anonstruct__sigfault_164 { void *_addr; short _addr_lsb; } ;
11 struct __anonstruct__sigpoll_165 { long _band; int _fd; } ;
11 struct __anonstruct__sigsys_166 { void *_call_addr; int _syscall; unsigned int _arch; } ;
11 union __anonunion__sifields_159 { int _pad[28U]; struct __anonstruct__kill_160 _kill; struct __anonstruct__timer_161 _timer; struct __anonstruct__rt_162 _rt; struct __anonstruct__sigchld_163 _sigchld; struct __anonstruct__sigfault_164 _sigfault; struct __anonstruct__sigpoll_165 _sigpoll; struct __anonstruct__sigsys_166 _sigsys; } ;
11 struct siginfo { int si_signo; int si_errno; int si_code; union __anonunion__sifields_159 _sifields; } ;
109 typedef struct siginfo siginfo_t;
21 struct sigpending { struct list_head list; sigset_t signal; } ;
251 struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; __sigrestore_t sa_restorer; sigset_t sa_mask; } ;
265 struct k_sigaction { struct sigaction sa; } ;
448 enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ;
455 struct pid_namespace ;
455 struct upid { int nr; struct pid_namespace *ns; struct hlist_node pid_chain; } ;
56 struct pid { atomic_t count; unsigned int level; struct hlist_head tasks[3U]; struct callback_head rcu; struct upid numbers[1U]; } ;
68 struct pid_link { struct hlist_node node; struct pid *pid; } ;
174 struct percpu_counter { raw_spinlock_t lock; s64 count; struct list_head list; s32 *counters; } ;
46 struct seccomp_filter ;
47 struct seccomp { int mode; struct seccomp_filter *filter; } ;
40 struct rt_mutex_waiter ;
41 struct rlimit { __kernel_ulong_t rlim_cur; __kernel_ulong_t rlim_max; } ;
11 struct timerqueue_node { struct rb_node node; ktime_t expires; } ;
12 struct timerqueue_head { struct rb_root head; struct timerqueue_node *next; } ;
50 struct hrtimer_clock_base ;
51 struct hrtimer_cpu_base ;
60 enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ;
65 struct hrtimer { struct timerqueue_node node; ktime_t _softexpires; enum hrtimer_restart (*function)(struct hrtimer *); struct hrtimer_clock_base *base; unsigned long state; int start_pid; void *start_site; char start_comm[16U]; } ;
132 struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base; int index; clockid_t clockid; struct timerqueue_head active; ktime_t resolution; ktime_t (*get_time)(); ktime_t softirq_time; ktime_t offset; } ;
163 struct hrtimer_cpu_base { raw_spinlock_t lock; unsigned int active_bases; unsigned int clock_was_set; ktime_t expires_next; int hres_active; int hang_detected; unsigned long nr_events; unsigned long nr_retries; unsigned long nr_hangs; ktime_t max_hang_time; struct hrtimer_clock_base clock_base[4U]; } ;
463 struct task_io_accounting { u64 rchar; u64 wchar; u64 syscr; u64 syscw; u64 read_bytes; u64 write_bytes; u64 cancelled_write_bytes; } ;
45 struct latency_record { unsigned long backtrace[12U]; unsigned int count; unsigned long time; unsigned long max; } ;
835 struct nsproxy ;
836 struct ctl_table_root ;
837 struct ctl_table_header ;
838 struct ctl_dir ;
39 typedef int proc_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
59 struct ctl_table_poll { atomic_t event; wait_queue_head_t wait; } ;
98 struct ctl_table { const char *procname; void *data; int maxlen; umode_t mode; struct ctl_table *child; proc_handler *proc_handler; struct ctl_table_poll *poll; void *extra1; void *extra2; } ;
119 struct ctl_node { struct rb_node node; struct ctl_table_header *header; } ;
124 struct __anonstruct____missing_field_name_170 { struct ctl_table *ctl_table; int used; int count; int nreg; } ;
124 union __anonunion____missing_field_name_169 { struct __anonstruct____missing_field_name_170 __annonCompField50; struct callback_head rcu; } ;
124 struct ctl_table_set ;
124 struct ctl_table_header { union __anonunion____missing_field_name_169 __annonCompField51; struct completion *unregistering; struct ctl_table *ctl_table_arg; struct ctl_table_root *root; struct ctl_table_set *set; struct ctl_dir *parent; struct ctl_node *node; } ;
145 struct ctl_dir { struct ctl_table_header header; struct rb_root root; } ;
151 struct ctl_table_set { int (*is_seen)(struct ctl_table_set *); struct ctl_dir dir; } ;
156 struct ctl_table_root { struct ctl_table_set default_set; struct ctl_table_set * (*lookup)(struct ctl_table_root *, struct nsproxy *); int (*permissions)(struct ctl_table_header *, struct ctl_table *); } ;
193 struct assoc_array_ptr ;
193 struct assoc_array { struct assoc_array_ptr *root; unsigned long nr_leaves_on_tree; } ;
31 typedef int32_t key_serial_t;
34 typedef uint32_t key_perm_t;
35 struct key ;
36 struct signal_struct ;
37 struct key_type ;
41 struct keyring_index_key { struct key_type *type; const char *description; size_t desc_len; } ;
123 union __anonunion____missing_field_name_171 { struct list_head graveyard_link; struct rb_node serial_node; } ;
123 struct key_user ;
123 union __anonunion____missing_field_name_172 { time_t expiry; time_t revoked_at; } ;
123 struct __anonstruct____missing_field_name_174 { struct key_type *type; char *description; } ;
123 union __anonunion____missing_field_name_173 { struct keyring_index_key index_key; struct __anonstruct____missing_field_name_174 __annonCompField54; } ;
123 union __anonunion_type_data_175 { struct list_head link; unsigned long x[2U]; void *p[2U]; int reject_error; } ;
123 union __anonunion_payload_177 { unsigned long value; void *rcudata; void *data; void *data2[2U]; } ;
123 union __anonunion____missing_field_name_176 { union __anonunion_payload_177 payload; struct assoc_array keys; } ;
123 struct key { atomic_t usage; key_serial_t serial; union __anonunion____missing_field_name_171 __annonCompField52; struct rw_semaphore sem; struct key_user *user; void *security; union __anonunion____missing_field_name_172 __annonCompField53; time_t last_used_at; kuid_t uid; kgid_t gid; key_perm_t perm; unsigned short quotalen; unsigned short datalen; unsigned long flags; union __anonunion____missing_field_name_173 __annonCompField55; union __anonunion_type_data_175 type_data; union __anonunion____missing_field_name_176 __annonCompField56; } ;
345 struct audit_context ;
27 struct group_info { atomic_t usage; int ngroups; int nblocks; kgid_t small_block[32U]; kgid_t *blocks[0U]; } ;
78 struct cred { atomic_t usage; atomic_t subscribers; void *put_addr; unsigned int magic; kuid_t uid; kgid_t gid; kuid_t suid; kgid_t sgid; kuid_t euid; kgid_t egid; kuid_t fsuid; kgid_t fsgid; unsigned int securebits; kernel_cap_t cap_inheritable; kernel_cap_t cap_permitted; kernel_cap_t cap_effective; kernel_cap_t cap_bset; unsigned char jit_keyring; struct key *session_keyring; struct key *process_keyring; struct key *thread_keyring; struct key *request_key_auth; void *security; struct user_struct *user; struct user_namespace *user_ns; struct group_info *group_info; struct callback_head rcu; } ;
123 struct futex_pi_state ;
124 struct robust_list_head ;
125 struct bio_list ;
126 struct fs_struct ;
127 struct perf_event_context ;
128 struct blk_plug ;
180 struct cfs_rq ;
181 struct task_group ;
421 struct sighand_struct { atomic_t count; struct k_sigaction action[64U]; spinlock_t siglock; wait_queue_head_t signalfd_wqh; } ;
460 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; } ;
468 struct cpu_itimer { cputime_t expires; cputime_t incr; u32 error; u32 incr_error; } ;
475 struct cputime { cputime_t utime; cputime_t stime; } ;
487 struct task_cputime { cputime_t utime; cputime_t stime; unsigned long long sum_exec_runtime; } ;
507 struct thread_group_cputimer { struct task_cputime cputime; int running; raw_spinlock_t lock; } ;
549 struct autogroup ;
550 struct tty_struct ;
550 struct taskstats ;
550 struct tty_audit_buf ;
550 struct signal_struct { atomic_t sigcnt; atomic_t live; int nr_threads; struct list_head thread_head; wait_queue_head_t wait_chldexit; struct task_struct *curr_target; struct sigpending shared_pending; int group_exit_code; int notify_count; struct task_struct *group_exit_task; int group_stop_count; unsigned int flags; unsigned char is_child_subreaper; unsigned char has_child_subreaper; int posix_timer_id; struct list_head posix_timers; struct hrtimer real_timer; struct pid *leader_pid; ktime_t it_real_incr; struct cpu_itimer it[2U]; struct thread_group_cputimer cputimer; struct task_cputime cputime_expires; struct list_head cpu_timers[3U]; struct pid *tty_old_pgrp; int leader; struct tty_struct *tty; struct autogroup *autogroup; cputime_t utime; cputime_t stime; cputime_t cutime; cputime_t cstime; cputime_t gtime; cputime_t cgtime; struct cputime prev_cputime; unsigned long nvcsw; unsigned long nivcsw; unsigned long cnvcsw; unsigned long cnivcsw; unsigned long min_flt; unsigned long maj_flt; unsigned long cmin_flt; unsigned long cmaj_flt; unsigned long inblock; unsigned long oublock; unsigned long cinblock; unsigned long coublock; unsigned long maxrss; unsigned long cmaxrss; struct task_io_accounting ioac; unsigned long long sum_sched_runtime; struct rlimit rlim[16U]; struct pacct_struct pacct; struct taskstats *stats; unsigned int audit_tty; unsigned int audit_tty_log_passwd; struct tty_audit_buf *tty_audit_buf; struct rw_semaphore group_rwsem; oom_flags_t oom_flags; short oom_score_adj; short oom_score_adj_min; struct mutex cred_guard_mutex; } ;
730 struct user_struct { atomic_t __count; atomic_t processes; atomic_t files; atomic_t sigpending; atomic_t inotify_watches; atomic_t inotify_devs; atomic_t fanotify_listeners; atomic_long_t epoll_watches; unsigned long mq_bytes; unsigned long locked_shm; struct key *uid_keyring; struct key *session_keyring; struct hlist_node uidhash_node; kuid_t uid; atomic_long_t locked_vm; } ;
774 struct backing_dev_info ;
775 struct reclaim_state ;
776 struct sched_info { unsigned long pcount; unsigned long long run_delay; unsigned long long last_arrival; unsigned long long last_queued; } ;
790 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; struct timespec freepages_start; struct timespec freepages_end; u64 freepages_delay; u32 freepages_count; } ;
976 struct io_context ;
1004 struct pipe_inode_info ;
1005 struct uts_namespace ;
1006 struct load_weight { unsigned long weight; u32 inv_weight; } ;
1013 struct sched_avg { u32 runnable_avg_sum; u32 runnable_avg_period; u64 last_runnable_update; s64 decay_count; unsigned long load_avg_contrib; } ;
1025 struct sched_statistics { u64 wait_start; u64 wait_max; u64 wait_count; u64 wait_sum; u64 iowait_count; u64 iowait_sum; u64 sleep_start; u64 sleep_max; s64 sum_sleep_runtime; u64 block_start; u64 block_max; u64 exec_max; u64 slice_max; u64 nr_migrations_cold; u64 nr_failed_migrations_affine; u64 nr_failed_migrations_running; u64 nr_failed_migrations_hot; u64 nr_forced_migrations; u64 nr_wakeups; u64 nr_wakeups_sync; u64 nr_wakeups_migrate; u64 nr_wakeups_local; u64 nr_wakeups_remote; u64 nr_wakeups_affine; u64 nr_wakeups_affine_attempts; u64 nr_wakeups_passive; u64 nr_wakeups_idle; } ;
1060 struct sched_entity { struct load_weight load; struct rb_node run_node; struct list_head group_node; unsigned int on_rq; u64 exec_start; u64 sum_exec_runtime; u64 vruntime; u64 prev_sum_exec_runtime; u64 nr_migrations; struct sched_statistics statistics; struct sched_entity *parent; struct cfs_rq *cfs_rq; struct cfs_rq *my_q; struct sched_avg avg; } ;
1091 struct rt_rq ;
1091 struct sched_rt_entity { struct list_head run_list; unsigned long timeout; unsigned long watchdog_stamp; unsigned int time_slice; struct sched_rt_entity *back; struct sched_rt_entity *parent; struct rt_rq *rt_rq; struct rt_rq *my_q; } ;
1107 struct sched_dl_entity { struct rb_node rb_node; u64 dl_runtime; u64 dl_deadline; u64 dl_period; u64 dl_bw; s64 runtime; u64 deadline; unsigned int flags; int dl_throttled; int dl_new; int dl_boosted; struct hrtimer dl_timer; } ;
1162 struct mem_cgroup ;
1162 struct memcg_batch_info { int do_batch; struct mem_cgroup *memcg; unsigned long nr_pages; unsigned long memsw_nr_pages; } ;
1569 struct memcg_oom_info { struct mem_cgroup *memcg; gfp_t gfp_mask; int order; unsigned char may_oom; } ;
1576 struct sched_class ;
1576 struct files_struct ;
1576 struct css_set ;
1576 struct compat_robust_list_head ;
1576 struct numa_group ;
1576 struct task_struct { volatile long state; void *stack; atomic_t usage; unsigned int flags; unsigned int ptrace; struct llist_node wake_entry; int on_cpu; struct task_struct *last_wakee; unsigned long wakee_flips; unsigned long wakee_flip_decay_ts; int wake_cpu; int on_rq; int prio; int static_prio; int normal_prio; unsigned int rt_priority; const struct sched_class *sched_class; struct sched_entity se; struct sched_rt_entity rt; struct task_group *sched_task_group; struct sched_dl_entity dl; struct hlist_head preempt_notifiers; unsigned int policy; int nr_cpus_allowed; cpumask_t cpus_allowed; struct sched_info sched_info; struct list_head tasks; struct plist_node pushable_tasks; struct rb_node pushable_dl_tasks; struct mm_struct *mm; struct mm_struct *active_mm; unsigned char brk_randomized; struct task_rss_stat rss_stat; int exit_state; int exit_code; int exit_signal; int pdeath_signal; unsigned int jobctl; unsigned int personality; unsigned char in_execve; unsigned char in_iowait; unsigned char no_new_privs; unsigned char sched_reset_on_fork; unsigned char sched_contributes_to_load; pid_t pid; pid_t tgid; struct task_struct *real_parent; struct task_struct *parent; struct list_head children; struct list_head sibling; struct task_struct *group_leader; struct list_head ptraced; struct list_head ptrace_entry; struct pid_link pids[3U]; struct list_head thread_group; struct list_head thread_node; struct completion *vfork_done; int *set_child_tid; int *clear_child_tid; cputime_t utime; cputime_t stime; cputime_t utimescaled; cputime_t stimescaled; cputime_t gtime; struct cputime prev_cputime; unsigned long nvcsw; unsigned long nivcsw; struct timespec start_time; struct timespec real_start_time; unsigned long min_flt; unsigned long maj_flt; struct task_cputime cputime_expires; struct list_head cpu_timers[3U]; const struct cred *real_cred; const struct cred *cred; char comm[16U]; int link_count; int total_link_count; struct sysv_sem sysvsem; unsigned long last_switch_count; struct thread_struct thread; struct fs_struct *fs; struct files_struct *files; struct nsproxy *nsproxy; struct signal_struct *signal; struct sighand_struct *sighand; sigset_t blocked; sigset_t real_blocked; sigset_t saved_sigmask; struct sigpending pending; unsigned long sas_ss_sp; size_t sas_ss_size; int (*notifier)(void *); void *notifier_data; sigset_t *notifier_mask; struct callback_head *task_works; struct audit_context *audit_context; kuid_t loginuid; unsigned int sessionid; struct seccomp seccomp; u32 parent_exec_id; u32 self_exec_id; spinlock_t alloc_lock; raw_spinlock_t pi_lock; struct rb_root pi_waiters; struct rb_node *pi_waiters_leftmost; struct rt_mutex_waiter *pi_blocked_on; struct task_struct *pi_top_task; struct mutex_waiter *blocked_on; unsigned int irq_events; unsigned long hardirq_enable_ip; unsigned long hardirq_disable_ip; unsigned int hardirq_enable_event; unsigned int hardirq_disable_event; int hardirqs_enabled; int hardirq_context; unsigned long softirq_disable_ip; unsigned long softirq_enable_ip; unsigned int softirq_disable_event; unsigned int softirq_enable_event; int softirqs_enabled; int softirq_context; u64 curr_chain_key; int lockdep_depth; unsigned int lockdep_recursion; struct held_lock held_locks[48U]; gfp_t lockdep_reclaim_gfp; void *journal_info; struct bio_list *bio_list; struct blk_plug *plug; struct reclaim_state *reclaim_state; struct backing_dev_info *backing_dev_info; struct io_context *io_context; unsigned long ptrace_message; siginfo_t *last_siginfo; struct task_io_accounting ioac; u64 acct_rss_mem1; u64 acct_vm_mem1; cputime_t acct_timexpd; nodemask_t mems_allowed; seqcount_t mems_allowed_seq; int cpuset_mem_spread_rotor; int cpuset_slab_spread_rotor; struct css_set *cgroups; struct list_head cg_list; struct robust_list_head *robust_list; struct compat_robust_list_head *compat_robust_list; struct list_head pi_state_list; struct futex_pi_state *pi_state_cache; struct perf_event_context *perf_event_ctxp[2U]; struct mutex perf_event_mutex; struct list_head perf_event_list; struct mempolicy *mempolicy; short il_next; short pref_node_fork; int numa_scan_seq; unsigned int numa_scan_period; unsigned int numa_scan_period_max; int numa_preferred_nid; int numa_migrate_deferred; unsigned long numa_migrate_retry; u64 node_stamp; struct callback_head numa_work; struct list_head numa_entry; struct numa_group *numa_group; unsigned long *numa_faults; unsigned long total_numa_faults; unsigned long *numa_faults_buffer; unsigned long numa_faults_locality[2U]; unsigned long numa_pages_migrated; struct callback_head rcu; struct pipe_inode_info *splice_pipe; struct page_frag task_frag; struct task_delay_info *delays; int make_it_fail; int nr_dirtied; int nr_dirtied_pause; unsigned long dirty_paused_when; int latency_record_count; struct latency_record latency_record[32U]; unsigned long timer_slack_ns; unsigned long default_timer_slack_ns; unsigned long trace; unsigned long trace_recursion; struct memcg_batch_info memcg_batch; unsigned int memcg_kmem_skip_account; struct memcg_oom_info memcg_oom; struct uprobe_task *utask; unsigned int sequential_io; unsigned int sequential_io_avg; } ;
355 struct kmem_cache_cpu { void **freelist; unsigned long tid; struct page *page; struct page *partial; unsigned int stat[26U]; } ;
48 struct kmem_cache_order_objects { unsigned long x; } ;
58 struct memcg_cache_params ;
58 struct kmem_cache_node ;
58 struct kmem_cache { struct kmem_cache_cpu *cpu_slab; unsigned long flags; unsigned long min_partial; int size; int object_size; int offset; int cpu_partial; struct kmem_cache_order_objects oo; struct kmem_cache_order_objects max; struct kmem_cache_order_objects min; gfp_t allocflags; int refcount; void (*ctor)(void *); int inuse; int align; int reserved; const char *name; struct list_head list; struct kobject kobj; struct memcg_cache_params *memcg_params; int max_attr_size; int remote_node_defrag_ratio; struct kmem_cache_node *node[1024U]; } ;
497 struct __anonstruct____missing_field_name_180 { struct callback_head callback_head; struct kmem_cache *memcg_caches[0U]; } ;
497 struct __anonstruct____missing_field_name_181 { struct mem_cgroup *memcg; struct list_head list; struct kmem_cache *root_cache; bool dead; atomic_t nr_pages; struct work_struct destroy; } ;
497 union __anonunion____missing_field_name_179 { struct __anonstruct____missing_field_name_180 __annonCompField58; struct __anonstruct____missing_field_name_181 __annonCompField59; } ;
497 struct memcg_cache_params { bool is_root_cache; union __anonunion____missing_field_name_179 __annonCompField60; } ;
50 struct hlist_bl_node ;
50 struct hlist_bl_head { struct hlist_bl_node *first; } ;
36 struct hlist_bl_node { struct hlist_bl_node *next; struct hlist_bl_node **pprev; } ;
114 struct __anonstruct____missing_field_name_183 { spinlock_t lock; unsigned int count; } ;
114 union __anonunion____missing_field_name_182 { struct __anonstruct____missing_field_name_183 __annonCompField61; } ;
114 struct lockref { union __anonunion____missing_field_name_182 __annonCompField62; } ;
49 struct nameidata ;
50 struct vfsmount ;
51 struct __anonstruct____missing_field_name_185 { u32 hash; u32 len; } ;
51 union __anonunion____missing_field_name_184 { struct __anonstruct____missing_field_name_185 __annonCompField63; u64 hash_len; } ;
51 struct qstr { union __anonunion____missing_field_name_184 __annonCompField64; const unsigned char *name; } ;
90 struct dentry_operations ;
90 union __anonunion_d_u_186 { struct list_head d_child; struct callback_head d_rcu; } ;
90 struct dentry { unsigned int d_flags; seqcount_t d_seq; struct hlist_bl_node d_hash; struct dentry *d_parent; struct qstr d_name; struct inode *d_inode; unsigned char d_iname[32U]; struct lockref d_lockref; const struct dentry_operations *d_op; struct super_block *d_sb; unsigned long d_time; void *d_fsdata; struct list_head d_lru; union __anonunion_d_u_186 d_u; struct list_head d_subdirs; struct hlist_node d_alias; } ;
142 struct dentry_operations { int (*d_revalidate)(struct dentry *, unsigned int); int (*d_weak_revalidate)(struct dentry *, unsigned int); int (*d_hash)(const struct dentry *, struct qstr *); int (*d_compare)(const struct dentry *, const struct dentry *, unsigned int, const char *, const struct qstr *); int (*d_delete)(const struct dentry *); void (*d_release)(struct dentry *); void (*d_prune)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char * (*d_dname)(struct dentry *, char *, int); struct vfsmount * (*d_automount)(struct path *); int (*d_manage)(struct dentry *, bool ); } ;
469 struct path { struct vfsmount *mnt; struct dentry *dentry; } ;
26 struct list_lru_node { spinlock_t lock; struct list_head list; long nr_items; } ;
28 struct list_lru { struct list_lru_node *node; nodemask_t active_nodes; } ;
58 struct radix_tree_node ;
58 struct radix_tree_root { unsigned int height; gfp_t gfp_mask; struct radix_tree_node *rnode; } ;
45 struct fiemap_extent { __u64 fe_logical; __u64 fe_physical; __u64 fe_length; __u64 fe_reserved64[2U]; __u32 fe_flags; __u32 fe_reserved[3U]; } ;
38 enum migrate_mode { MIGRATE_ASYNC = 0, MIGRATE_SYNC_LIGHT = 1, MIGRATE_SYNC = 2 } ;
27 struct bio_set ;
28 struct bio ;
29 struct bio_integrity_payload ;
30 struct block_device ;
31 struct cgroup_subsys_state ;
19 typedef void bio_end_io_t(struct bio *, int);
21 struct bio_vec { struct page *bv_page; unsigned int bv_len; unsigned int bv_offset; } ;
30 struct bvec_iter { sector_t bi_sector; unsigned int bi_size; unsigned int bi_idx; unsigned int bi_bvec_done; } ;
40 struct bio { struct bio *bi_next; struct block_device *bi_bdev; unsigned long bi_flags; unsigned long bi_rw; struct bvec_iter bi_iter; unsigned int bi_phys_segments; unsigned int bi_seg_front_size; unsigned int bi_seg_back_size; atomic_t bi_remaining; bio_end_io_t *bi_end_io; void *bi_private; struct io_context *bi_ioc; struct cgroup_subsys_state *bi_css; struct bio_integrity_payload *bi_integrity; unsigned short bi_vcnt; unsigned short bi_max_vecs; atomic_t bi_cnt; struct bio_vec *bi_io_vec; struct bio_set *bi_pool; struct bio_vec bi_inline_vecs[0U]; } ;
56 struct export_operations ;
57 struct hd_geometry ;
58 struct kiocb ;
59 struct poll_table_struct ;
60 struct kstatfs ;
61 struct swap_info_struct ;
68 struct iattr { unsigned int ia_valid; umode_t ia_mode; kuid_t ia_uid; kgid_t ia_gid; loff_t ia_size; struct timespec ia_atime; struct timespec ia_mtime; struct timespec ia_ctime; struct file *ia_file; } ;
246 struct fs_disk_quota { __s8 d_version; __s8 d_flags; __u16 d_fieldmask; __u32 d_id; __u64 d_blk_hardlimit; __u64 d_blk_softlimit; __u64 d_ino_hardlimit; __u64 d_ino_softlimit; __u64 d_bcount; __u64 d_icount; __s32 d_itimer; __s32 d_btimer; __u16 d_iwarns; __u16 d_bwarns; __s32 d_padding2; __u64 d_rtb_hardlimit; __u64 d_rtb_softlimit; __u64 d_rtbcount; __s32 d_rtbtimer; __u16 d_rtbwarns; __s16 d_padding3; char d_padding4[8U]; } ;
76 struct fs_qfilestat { __u64 qfs_ino; __u64 qfs_nblks; __u32 qfs_nextents; } ;
151 typedef struct fs_qfilestat fs_qfilestat_t;
152 struct fs_quota_stat { __s8 qs_version; __u16 qs_flags; __s8 qs_pad; fs_qfilestat_t qs_uquota; fs_qfilestat_t qs_gquota; __u32 qs_incoredqs; __s32 qs_btimelimit; __s32 qs_itimelimit; __s32 qs_rtbtimelimit; __u16 qs_bwarnlimit; __u16 qs_iwarnlimit; } ;
166 struct fs_qfilestatv { __u64 qfs_ino; __u64 qfs_nblks; __u32 qfs_nextents; __u32 qfs_pad; } ;
196 struct fs_quota_statv { __s8 qs_version; __u8 qs_pad1; __u16 qs_flags; __u32 qs_incoredqs; struct fs_qfilestatv qs_uquota; struct fs_qfilestatv qs_gquota; struct fs_qfilestatv qs_pquota; __s32 qs_btimelimit; __s32 qs_itimelimit; __s32 qs_rtbtimelimit; __u16 qs_bwarnlimit; __u16 qs_iwarnlimit; __u64 qs_pad2[8U]; } ;
212 struct dquot ;
19 typedef __kernel_uid32_t projid_t;
23 struct __anonstruct_kprojid_t_187 { projid_t val; } ;
23 typedef struct __anonstruct_kprojid_t_187 kprojid_t;
119 struct if_dqinfo { __u64 dqi_bgrace; __u64 dqi_igrace; __u32 dqi_flags; __u32 dqi_valid; } ;
152 enum quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 } ;
60 typedef long long qsize_t;
61 union __anonunion____missing_field_name_188 { kuid_t uid; kgid_t gid; kprojid_t projid; } ;
61 struct kqid { union __anonunion____missing_field_name_188 __annonCompField65; enum quota_type type; } ;
178 struct mem_dqblk { qsize_t dqb_bhardlimit; qsize_t dqb_bsoftlimit; qsize_t dqb_curspace; qsize_t dqb_rsvspace; qsize_t dqb_ihardlimit; qsize_t dqb_isoftlimit; qsize_t dqb_curinodes; time_t dqb_btime; time_t dqb_itime; } ;
200 struct quota_format_type ;
201 struct mem_dqinfo { struct quota_format_type *dqi_format; int dqi_fmt_id; struct list_head dqi_dirty_list; unsigned long dqi_flags; unsigned int dqi_bgrace; unsigned int dqi_igrace; qsize_t dqi_maxblimit; qsize_t dqi_maxilimit; void *dqi_priv; } ;
264 struct dquot { struct hlist_node dq_hash; struct list_head dq_inuse; struct list_head dq_free; struct list_head dq_dirty; struct mutex dq_lock; atomic_t dq_count; wait_queue_head_t dq_wait_unused; struct super_block *dq_sb; struct kqid dq_id; loff_t dq_off; unsigned long dq_flags; struct mem_dqblk dq_dqb; } ;
291 struct quota_format_ops { int (*check_quota_file)(struct super_block *, int); int (*read_file_info)(struct super_block *, int); int (*write_file_info)(struct super_block *, int); int (*free_file_info)(struct super_block *, int); int (*read_dqblk)(struct dquot *); int (*commit_dqblk)(struct dquot *); int (*release_dqblk)(struct dquot *); } ;
302 struct dquot_operations { int (*write_dquot)(struct dquot *); struct dquot * (*alloc_dquot)(struct super_block *, int); void (*destroy_dquot)(struct dquot *); int (*acquire_dquot)(struct dquot *); int (*release_dquot)(struct dquot *); int (*mark_dirty)(struct dquot *); int (*write_info)(struct super_block *, int); qsize_t * (*get_reserved_space)(struct inode *); } ;
316 struct quotactl_ops { int (*quota_on)(struct super_block *, int, int, struct path *); int (*quota_on_meta)(struct super_block *, int, int); int (*quota_off)(struct super_block *, int); int (*quota_sync)(struct super_block *, int); int (*get_info)(struct super_block *, int, struct if_dqinfo *); int (*set_info)(struct super_block *, int, struct if_dqinfo *); int (*get_dqblk)(struct super_block *, struct kqid , struct fs_disk_quota *); int (*set_dqblk)(struct super_block *, struct kqid , struct fs_disk_quota *); int (*get_xstate)(struct super_block *, struct fs_quota_stat *); int (*set_xstate)(struct super_block *, unsigned int, int); int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); } ;
333 struct quota_format_type { int qf_fmt_id; const struct quota_format_ops *qf_ops; struct module *qf_owner; struct quota_format_type *qf_next; } ;
379 struct quota_info { unsigned int flags; struct mutex dqio_mutex; struct mutex dqonoff_mutex; struct rw_semaphore dqptr_sem; struct inode *files[2U]; struct mem_dqinfo info[2U]; const struct quota_format_ops *ops[2U]; } ;
345 union __anonunion_arg_190 { char *buf; void *data; } ;
345 struct __anonstruct_read_descriptor_t_189 { size_t written; size_t count; union __anonunion_arg_190 arg; int error; } ;
345 typedef struct __anonstruct_read_descriptor_t_189 read_descriptor_t;
348 struct address_space_operations { int (*writepage)(struct page *, struct writeback_control *); int (*readpage)(struct file *, struct page *); int (*writepages)(struct address_space *, struct writeback_control *); int (*set_page_dirty)(struct page *); int (*readpages)(struct file *, struct address_space *, struct list_head *, unsigned int); int (*write_begin)(struct file *, struct address_space *, loff_t , unsigned int, unsigned int, struct page **, void **); int (*write_end)(struct file *, struct address_space *, loff_t , unsigned int, unsigned int, struct page *, void *); sector_t (*bmap)(struct address_space *, sector_t ); void (*invalidatepage)(struct page *, unsigned int, unsigned int); int (*releasepage)(struct page *, gfp_t ); void (*freepage)(struct page *); ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *, loff_t , unsigned long); int (*get_xip_mem)(struct address_space *, unsigned long, int, void **, unsigned long *); int (*migratepage)(struct address_space *, struct page *, struct page *, enum migrate_mode ); int (*launder_page)(struct page *); int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); void (*is_dirty_writeback)(struct page *, bool *, bool *); int (*error_remove_page)(struct address_space *, struct page *); int (*swap_activate)(struct swap_info_struct *, struct file *, sector_t *); void (*swap_deactivate)(struct file *); } ;
408 struct address_space { struct inode *host; struct radix_tree_root page_tree; spinlock_t tree_lock; unsigned int i_mmap_writable; struct rb_root i_mmap; struct list_head i_mmap_nonlinear; struct mutex i_mmap_mutex; unsigned long nrpages; unsigned long writeback_index; const struct address_space_operations *a_ops; unsigned long flags; struct backing_dev_info *backing_dev_info; spinlock_t private_lock; struct list_head private_list; void *private_data; } ;
430 struct hd_struct ;
430 struct gendisk ;
430 struct block_device { dev_t bd_dev; int bd_openers; struct inode *bd_inode; struct super_block *bd_super; struct mutex bd_mutex; struct list_head bd_inodes; void *bd_claiming; void *bd_holder; int bd_holders; bool bd_write_holder; struct list_head bd_holder_disks; struct block_device *bd_contains; unsigned int bd_block_size; struct hd_struct *bd_part; unsigned int bd_part_count; int bd_invalidated; struct gendisk *bd_disk; struct request_queue *bd_queue; struct list_head bd_list; unsigned long bd_private; int bd_fsfreeze_count; struct mutex bd_fsfreeze_mutex; } ;
503 struct posix_acl ;
504 struct inode_operations ;
504 union __anonunion____missing_field_name_191 { const unsigned int i_nlink; unsigned int __i_nlink; } ;
504 union __anonunion____missing_field_name_192 { struct hlist_head i_dentry; struct callback_head i_rcu; } ;
504 struct file_lock ;
504 struct cdev ;
504 union __anonunion____missing_field_name_193 { struct pipe_inode_info *i_pipe; struct block_device *i_bdev; struct cdev *i_cdev; } ;
504 struct inode { umode_t i_mode; unsigned short i_opflags; kuid_t i_uid; kgid_t i_gid; unsigned int i_flags; struct posix_acl *i_acl; struct posix_acl *i_default_acl; const struct inode_operations *i_op; struct super_block *i_sb; struct address_space *i_mapping; void *i_security; unsigned long i_ino; union __anonunion____missing_field_name_191 __annonCompField66; dev_t i_rdev; loff_t i_size; struct timespec i_atime; struct timespec i_mtime; struct timespec i_ctime; spinlock_t i_lock; unsigned short i_bytes; unsigned int i_blkbits; blkcnt_t i_blocks; unsigned long i_state; struct mutex i_mutex; unsigned long dirtied_when; struct hlist_node i_hash; struct list_head i_wb_list; struct list_head i_lru; struct list_head i_sb_list; union __anonunion____missing_field_name_192 __annonCompField67; u64 i_version; atomic_t i_count; atomic_t i_dio_count; atomic_t i_writecount; const struct file_operations *i_fop; struct file_lock *i_flock; struct address_space i_data; struct dquot *i_dquot[2U]; struct list_head i_devices; union __anonunion____missing_field_name_193 __annonCompField68; __u32 i_generation; __u32 i_fsnotify_mask; struct hlist_head i_fsnotify_marks; atomic_t i_readcount; void *i_private; } ;
740 struct fown_struct { rwlock_t lock; struct pid *pid; enum pid_type pid_type; kuid_t uid; kuid_t euid; int signum; } ;
748 struct file_ra_state { unsigned long start; unsigned int size; unsigned int async_size; unsigned int ra_pages; unsigned int mmap_miss; loff_t prev_pos; } ;
771 union __anonunion_f_u_194 { struct llist_node fu_llist; struct callback_head fu_rcuhead; } ;
771 struct file { union __anonunion_f_u_194 f_u; struct path f_path; struct inode *f_inode; const struct file_operations *f_op; spinlock_t f_lock; atomic_long_t f_count; unsigned int f_flags; fmode_t f_mode; struct mutex f_pos_lock; loff_t f_pos; struct fown_struct f_owner; const struct cred *f_cred; struct file_ra_state f_ra; u64 f_version; void *f_security; void *private_data; struct list_head f_ep_links; struct list_head f_tfile_llink; struct address_space *f_mapping; unsigned long f_mnt_write_state; } ;
909 typedef struct files_struct *fl_owner_t;
910 struct file_lock_operations { void (*fl_copy_lock)(struct file_lock *, struct file_lock *); void (*fl_release_private)(struct file_lock *); } ;
915 struct lock_manager_operations { int (*lm_compare_owner)(struct file_lock *, struct file_lock *); unsigned long int (*lm_owner_key)(struct file_lock *); void (*lm_notify)(struct file_lock *); int (*lm_grant)(struct file_lock *, struct file_lock *, int); void (*lm_break)(struct file_lock *); int (*lm_change)(struct file_lock **, int); } ;
928 struct net ;
933 struct nlm_lockowner ;
934 struct nfs_lock_info { u32 state; struct nlm_lockowner *owner; struct list_head list; } ;
14 struct nfs4_lock_state ;
15 struct nfs4_lock_info { struct nfs4_lock_state *owner; } ;
19 struct fasync_struct ;
19 struct __anonstruct_afs_196 { struct list_head link; int state; } ;
19 union __anonunion_fl_u_195 { struct nfs_lock_info nfs_fl; struct nfs4_lock_info nfs4_fl; struct __anonstruct_afs_196 afs; } ;
19 struct file_lock { struct file_lock *fl_next; struct hlist_node fl_link; struct list_head fl_block; fl_owner_t fl_owner; unsigned int fl_flags; unsigned char fl_type; unsigned int fl_pid; int fl_link_cpu; struct pid *fl_nspid; wait_queue_head_t fl_wait; struct file *fl_file; loff_t fl_start; loff_t fl_end; struct fasync_struct *fl_fasync; unsigned long fl_break_time; unsigned long fl_downgrade_time; const struct file_lock_operations *fl_ops; const struct lock_manager_operations *fl_lmops; union __anonunion_fl_u_195 fl_u; } ;
1036 struct fasync_struct { spinlock_t fa_lock; int magic; int fa_fd; struct fasync_struct *fa_next; struct file *fa_file; struct callback_head fa_rcu; } ;
1228 struct sb_writers { struct percpu_counter counter[3U]; wait_queue_head_t wait; int frozen; wait_queue_head_t wait_unfrozen; struct lockdep_map lock_map[3U]; } ;
1244 struct super_operations ;
1244 struct xattr_handler ;
1244 struct mtd_info ;
1244 struct super_block { struct list_head s_list; dev_t s_dev; unsigned char s_blocksize_bits; unsigned long s_blocksize; loff_t s_maxbytes; struct file_system_type *s_type; const struct super_operations *s_op; const struct dquot_operations *dq_op; const struct quotactl_ops *s_qcop; const struct export_operations *s_export_op; unsigned long s_flags; unsigned long s_magic; struct dentry *s_root; struct rw_semaphore s_umount; int s_count; atomic_t s_active; void *s_security; const struct xattr_handler **s_xattr; struct list_head s_inodes; struct hlist_bl_head s_anon; struct list_head s_mounts; struct block_device *s_bdev; struct backing_dev_info *s_bdi; struct mtd_info *s_mtd; struct hlist_node s_instances; struct quota_info s_dquot; struct sb_writers s_writers; char s_id[32U]; u8 s_uuid[16U]; void *s_fs_info; unsigned int s_max_links; fmode_t s_mode; u32 s_time_gran; struct mutex s_vfs_rename_mutex; char *s_subtype; char *s_options; const struct dentry_operations *s_d_op; int cleancache_poolid; struct shrinker s_shrink; atomic_long_t s_remove_count; int s_readonly_remount; struct workqueue_struct *s_dio_done_wq; struct list_lru s_dentry_lru; struct list_lru s_inode_lru; struct callback_head rcu; } ;
1474 struct fiemap_extent_info { unsigned int fi_flags; unsigned int fi_extents_mapped; unsigned int fi_extents_max; struct fiemap_extent *fi_extents_start; } ;
1512 struct dir_context { int (*actor)(void *, const char *, int, loff_t , u64 , unsigned int); loff_t pos; } ;
1516 struct block_device_operations ;
1517 struct file_operations { struct module *owner; loff_t (*llseek)(struct file *, loff_t , int); ssize_t (*read)(struct file *, char *, size_t , loff_t *); ssize_t (*write)(struct file *, const char *, size_t , loff_t *); ssize_t (*aio_read)(struct kiocb *, const struct iovec *, unsigned long, loff_t ); ssize_t (*aio_write)(struct kiocb *, const struct iovec *, unsigned long, loff_t ); int (*iterate)(struct file *, struct dir_context *); unsigned int (*poll)(struct file *, struct poll_table_struct *); long int (*unlocked_ioctl)(struct file *, unsigned int, unsigned long); long int (*compat_ioctl)(struct file *, unsigned int, unsigned long); int (*mmap)(struct file *, struct vm_area_struct *); int (*open)(struct inode *, struct file *); int (*flush)(struct file *, fl_owner_t ); int (*release)(struct inode *, struct file *); int (*fsync)(struct file *, loff_t , loff_t , int); int (*aio_fsync)(struct kiocb *, int); int (*fasync)(int, struct file *, int); int (*lock)(struct file *, int, struct file_lock *); ssize_t (*sendpage)(struct file *, struct page *, int, size_t , loff_t *, int); unsigned long int (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); int (*flock)(struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t , unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t , unsigned int); int (*setlease)(struct file *, long, struct file_lock **); long int (*fallocate)(struct file *, int, loff_t , loff_t ); int (*show_fdinfo)(struct seq_file *, struct file *); } ;
1555 struct inode_operations { struct dentry * (*lookup)(struct inode *, struct dentry *, unsigned int); void * (*follow_link)(struct dentry *, struct nameidata *); int (*permission)(struct inode *, int); struct posix_acl * (*get_acl)(struct inode *, int); int (*readlink)(struct dentry *, char *, int); void (*put_link)(struct dentry *, struct nameidata *, void *); int (*create)(struct inode *, struct dentry *, umode_t , bool ); int (*link)(struct dentry *, struct inode *, struct dentry *); int (*unlink)(struct inode *, struct dentry *); int (*symlink)(struct inode *, struct dentry *, const char *); int (*mkdir)(struct inode *, struct dentry *, umode_t ); int (*rmdir)(struct inode *, struct dentry *); int (*mknod)(struct inode *, struct dentry *, umode_t , dev_t ); int (*rename)(struct inode *, struct dentry *, struct inode *, struct dentry *); int (*setattr)(struct dentry *, struct iattr *); int (*getattr)(struct vfsmount *, struct dentry *, struct kstat *); int (*setxattr)(struct dentry *, const char *, const void *, size_t , int); ssize_t (*getxattr)(struct dentry *, const char *, void *, size_t ); ssize_t (*listxattr)(struct dentry *, char *, size_t ); int (*removexattr)(struct dentry *, const char *); int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 , u64 ); int (*update_time)(struct inode *, struct timespec *, int); int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned int, umode_t , int *); int (*tmpfile)(struct inode *, struct dentry *, umode_t ); int (*set_acl)(struct inode *, struct posix_acl *, int); } ;
1600 struct super_operations { struct inode * (*alloc_inode)(struct super_block *); void (*destroy_inode)(struct inode *); void (*dirty_inode)(struct inode *, int); int (*write_inode)(struct inode *, struct writeback_control *); int (*drop_inode)(struct inode *); void (*evict_inode)(struct inode *); void (*put_super)(struct super_block *); int (*sync_fs)(struct super_block *, int); int (*freeze_fs)(struct super_block *); int (*unfreeze_fs)(struct super_block *); int (*statfs)(struct dentry *, struct kstatfs *); int (*remount_fs)(struct super_block *, int *, char *); void (*umount_begin)(struct super_block *); int (*show_options)(struct seq_file *, struct dentry *); int (*show_devname)(struct seq_file *, struct dentry *); int (*show_path)(struct seq_file *, struct dentry *); int (*show_stats)(struct seq_file *, struct dentry *); ssize_t (*quota_read)(struct super_block *, int, char *, size_t , loff_t ); ssize_t (*quota_write)(struct super_block *, int, const char *, size_t , loff_t ); int (*bdev_try_to_free_page)(struct super_block *, struct page *, gfp_t ); long int (*nr_cached_objects)(struct super_block *, int); long int (*free_cached_objects)(struct super_block *, long, int); } ;
1814 struct file_system_type { const char *name; int fs_flags; struct dentry * (*mount)(struct file_system_type *, int, const char *, void *); void (*kill_sb)(struct super_block *); struct module *owner; struct file_system_type *next; struct hlist_head fs_supers; struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; struct lock_class_key s_vfs_rename_key; struct lock_class_key s_writers_key[3U]; struct lock_class_key i_lock_key; struct lock_class_key i_mutex_key; struct lock_class_key i_mutex_dir_key; } ;
80 struct disk_stats { unsigned long sectors[2U]; unsigned long ios[2U]; unsigned long merges[2U]; unsigned long ticks[2U]; unsigned long io_ticks; unsigned long time_in_queue; } ;
89 struct partition_meta_info { char uuid[37U]; u8 volname[64U]; } ;
101 struct hd_struct { sector_t start_sect; sector_t nr_sects; seqcount_t nr_sects_seq; sector_t alignment_offset; unsigned int discard_alignment; struct device __dev; struct kobject *holder_dir; int policy; int partno; struct partition_meta_info *info; int make_it_fail; unsigned long stamp; atomic_t in_flight[2U]; struct disk_stats *dkstats; atomic_t ref; struct callback_head callback_head; } ;
155 struct disk_part_tbl { struct callback_head callback_head; int len; struct hd_struct *last_lookup; struct hd_struct *part[]; } ;
162 struct disk_events ;
163 struct timer_rand_state ;
163 struct blk_integrity ;
163 struct gendisk { int major; int first_minor; int minors; char disk_name[32U]; char * (*devnode)(struct gendisk *, umode_t *); unsigned int events; unsigned int async_events; struct disk_part_tbl *part_tbl; struct hd_struct part0; const struct block_device_operations *fops; struct request_queue *queue; void *private_data; int flags; struct device *driverfs_dev; struct kobject *slave_dir; struct timer_rand_state *random; atomic_t sync_io; struct disk_events *ev; struct blk_integrity *integrity; int node_id; } ;
62 struct exception_table_entry { int insn; int fixup; } ;
352 struct proc_dir_entry ;
71 struct fprop_local_percpu { struct percpu_counter events; unsigned int period; raw_spinlock_t lock; } ;
12 enum writeback_sync_modes { WB_SYNC_NONE = 0, WB_SYNC_ALL = 1 } ;
29 struct writeback_control { long nr_to_write; long pages_skipped; loff_t range_start; loff_t range_end; enum writeback_sync_modes sync_mode; unsigned char for_kupdate; unsigned char for_background; unsigned char tagged_writepages; unsigned char for_reclaim; unsigned char range_cyclic; unsigned char for_sync; } ;
88 struct bdi_writeback ;
39 typedef int congested_fn(void *, int);
48 struct bdi_writeback { struct backing_dev_info *bdi; unsigned int nr; unsigned long last_old_flush; struct delayed_work dwork; struct list_head b_dirty; struct list_head b_io; struct list_head b_more_io; spinlock_t list_lock; } ;
63 struct backing_dev_info { struct list_head bdi_list; unsigned long ra_pages; unsigned long state; unsigned int capabilities; congested_fn *congested_fn; void *congested_data; char *name; struct percpu_counter bdi_stat[4U]; unsigned long bw_time_stamp; unsigned long dirtied_stamp; unsigned long written_stamp; unsigned long write_bandwidth; unsigned long avg_write_bandwidth; unsigned long dirty_ratelimit; unsigned long balanced_dirty_ratelimit; struct fprop_local_percpu completions; int dirty_exceeded; unsigned int min_ratio; unsigned int max_ratio; unsigned int max_prop_frac; struct bdi_writeback wb; spinlock_t wb_lock; struct list_head work_list; struct device *dev; struct timer_list laptop_mode_wb_timer; struct dentry *debug_dir; struct dentry *debug_stats; } ;
11 typedef void * mempool_alloc_t(gfp_t , void *);
12 typedef void mempool_free_t(void *, void *);
13 struct mempool_s { spinlock_t lock; int min_nr; int curr_nr; void **elements; void *pool_data; mempool_alloc_t *alloc; mempool_free_t *free; wait_queue_head_t wait; } ;
24 typedef struct mempool_s mempool_t;
77 union __anonunion____missing_field_name_199 { struct list_head q_node; struct kmem_cache *__rcu_icq_cache; } ;
77 union __anonunion____missing_field_name_200 { struct hlist_node ioc_node; struct callback_head __rcu_head; } ;
77 struct io_cq { struct request_queue *q; struct io_context *ioc; union __anonunion____missing_field_name_199 __annonCompField70; union __anonunion____missing_field_name_200 __annonCompField71; unsigned int flags; } ;
92 struct io_context { atomic_long_t refcount; atomic_t active_ref; atomic_t nr_tasks; spinlock_t lock; unsigned short ioprio; int nr_batch_requests; unsigned long last_waited; struct radix_tree_root icq_tree; struct io_cq *icq_hint; struct hlist_head icq_list; struct work_struct release_work; } ;
269 struct bio_integrity_payload { struct bio *bip_bio; struct bvec_iter bip_iter; void *bip_buf; bio_end_io_t *bip_end_io; unsigned short bip_slab; unsigned short bip_vcnt; unsigned char bip_owns_buf; struct work_struct bip_work; struct bio_vec *bip_vec; struct bio_vec bip_inline_vecs[0U]; } ;
479 struct bio_list { struct bio *head; struct bio *tail; } ;
600 struct bio_set { struct kmem_cache *bio_slab; unsigned int front_pad; mempool_t *bio_pool; mempool_t *bvec_pool; mempool_t *bio_integrity_pool; mempool_t *bvec_integrity_pool; spinlock_t rescue_lock; struct bio_list rescue_list; struct work_struct rescue_work; struct workqueue_struct *rescue_workqueue; } ;
63 struct bsg_class_device { struct device *class_dev; struct device *parent; int minor; struct request_queue *queue; struct kref ref; void (*release)(struct device *); } ;
22 struct elevator_queue ;
25 struct request ;
27 struct blkcg_gq ;
49 typedef void rq_end_io_fn(struct request *, int);
50 struct request_list { struct request_queue *q; struct blkcg_gq *blkg; int count[2U]; int starved[2U]; mempool_t *rq_pool; wait_queue_head_t wait[2U]; unsigned int flags; } ;
69 enum rq_cmd_type_bits { REQ_TYPE_FS = 1, REQ_TYPE_BLOCK_PC = 2, REQ_TYPE_SENSE = 3, REQ_TYPE_PM_SUSPEND = 4, REQ_TYPE_PM_RESUME = 5, REQ_TYPE_PM_SHUTDOWN = 6, REQ_TYPE_SPECIAL = 7, REQ_TYPE_ATA_TASKFILE = 8, REQ_TYPE_ATA_PC = 9 } ;
81 union __anonunion____missing_field_name_201 { struct call_single_data csd; struct work_struct mq_flush_work; } ;
81 struct blk_mq_ctx ;
81 union __anonunion____missing_field_name_202 { struct rb_node rb_node; void *completion_data; } ;
81 struct __anonstruct_elv_204 { struct io_cq *icq; void *priv[2U]; } ;
81 struct __anonstruct_flush_205 { unsigned int seq; struct list_head list; rq_end_io_fn *saved_end_io; } ;
81 union __anonunion____missing_field_name_203 { struct __anonstruct_elv_204 elv; struct __anonstruct_flush_205 flush; } ;
81 struct request { struct list_head queuelist; union __anonunion____missing_field_name_201 __annonCompField72; struct request_queue *q; struct blk_mq_ctx *mq_ctx; u64 cmd_flags; enum rq_cmd_type_bits cmd_type; unsigned long atomic_flags; int cpu; unsigned int __data_len; sector_t __sector; struct bio *bio; struct bio *biotail; struct hlist_node hash; union __anonunion____missing_field_name_202 __annonCompField73; union __anonunion____missing_field_name_203 __annonCompField74; struct gendisk *rq_disk; struct hd_struct *part; unsigned long start_time; struct request_list *rl; unsigned long long start_time_ns; unsigned long long io_start_time_ns; unsigned short nr_phys_segments; unsigned short nr_integrity_segments; unsigned short ioprio; void *special; char *buffer; int tag; int errors; unsigned char __cmd[16U]; unsigned char *cmd; unsigned short cmd_len; unsigned int extra_len; unsigned int sense_len; unsigned int resid_len; void *sense; unsigned long deadline; struct list_head timeout_list; unsigned int timeout; int retries; rq_end_io_fn *end_io; void *end_io_data; struct request *next_rq; } ;
113 struct elevator_type ;
12 typedef int elevator_merge_fn(struct request_queue *, struct request **, struct bio *);
15 typedef void elevator_merge_req_fn(struct request_queue *, struct request *, struct request *);
17 typedef void elevator_merged_fn(struct request_queue *, struct request *, int);
19 typedef int elevator_allow_merge_fn(struct request_queue *, struct request *, struct bio *);
21 typedef void elevator_bio_merged_fn(struct request_queue *, struct request *, struct bio *);
24 typedef int elevator_dispatch_fn(struct request_queue *, int);
26 typedef void elevator_add_req_fn(struct request_queue *, struct request *);
27 typedef struct request * elevator_request_list_fn(struct request_queue *, struct request *);
28 typedef void elevator_completed_req_fn(struct request_queue *, struct request *);
29 typedef int elevator_may_queue_fn(struct request_queue *, int);
31 typedef void elevator_init_icq_fn(struct io_cq *);
32 typedef void elevator_exit_icq_fn(struct io_cq *);
33 typedef int elevator_set_req_fn(struct request_queue *, struct request *, struct bio *, gfp_t );
35 typedef void elevator_put_req_fn(struct request *);
36 typedef void elevator_activate_req_fn(struct request_queue *, struct request *);
37 typedef void elevator_deactivate_req_fn(struct request_queue *, struct request *);
39 typedef int elevator_init_fn(struct request_queue *, struct elevator_type *);
41 typedef void elevator_exit_fn(struct elevator_queue *);
42 struct elevator_ops { elevator_merge_fn *elevator_merge_fn; elevator_merged_fn *elevator_merged_fn; elevator_merge_req_fn *elevator_merge_req_fn; elevator_allow_merge_fn *elevator_allow_merge_fn; elevator_bio_merged_fn *elevator_bio_merged_fn; elevator_dispatch_fn *elevator_dispatch_fn; elevator_add_req_fn *elevator_add_req_fn; elevator_activate_req_fn *elevator_activate_req_fn; elevator_deactivate_req_fn *elevator_deactivate_req_fn; elevator_completed_req_fn *elevator_completed_req_fn; elevator_request_list_fn *elevator_former_req_fn; elevator_request_list_fn *elevator_latter_req_fn; elevator_init_icq_fn *elevator_init_icq_fn; elevator_exit_icq_fn *elevator_exit_icq_fn; elevator_set_req_fn *elevator_set_req_fn; elevator_put_req_fn *elevator_put_req_fn; elevator_may_queue_fn *elevator_may_queue_fn; elevator_init_fn *elevator_init_fn; elevator_exit_fn *elevator_exit_fn; } ;
72 struct elv_fs_entry { struct attribute attr; ssize_t (*show)(struct elevator_queue *, char *); ssize_t (*store)(struct elevator_queue *, const char *, size_t ); } ;
80 struct elevator_type { struct kmem_cache *icq_cache; struct elevator_ops ops; size_t icq_size; size_t icq_align; struct elv_fs_entry *elevator_attrs; char elevator_name[16U]; struct module *elevator_owner; char icq_cache_name[21U]; struct list_head list; } ;
101 struct elevator_queue { struct elevator_type *type; void *elevator_data; struct kobject kobj; struct mutex sysfs_lock; unsigned char registered; struct hlist_head hash[64U]; } ;
223 typedef void request_fn_proc(struct request_queue *);
224 typedef void make_request_fn(struct request_queue *, struct bio *);
225 typedef int prep_rq_fn(struct request_queue *, struct request *);
226 typedef void unprep_rq_fn(struct request_queue *, struct request *);
227 struct bvec_merge_data { struct block_device *bi_bdev; sector_t bi_sector; unsigned int bi_size; unsigned long bi_rw; } ;
235 typedef int merge_bvec_fn(struct request_queue *, struct bvec_merge_data *, struct bio_vec *);
237 typedef void softirq_done_fn(struct request *);
238 typedef int dma_drain_needed_fn(struct request *);
239 typedef int lld_busy_fn(struct request_queue *);
240 typedef int bsg_job_fn(struct bsg_job *);
241 enum blk_eh_timer_return { BLK_EH_NOT_HANDLED = 0, BLK_EH_HANDLED = 1, BLK_EH_RESET_TIMER = 2 } ;
248 typedef enum blk_eh_timer_return rq_timed_out_fn(struct request *);
254 struct blk_queue_tag { struct request **tag_index; unsigned long *tag_map; int busy; int max_depth; int real_max_depth; atomic_t refcnt; } ;
263 struct queue_limits { unsigned long bounce_pfn; unsigned long seg_boundary_mask; unsigned int max_hw_sectors; unsigned int max_sectors; unsigned int max_segment_size; unsigned int physical_block_size; unsigned int alignment_offset; unsigned int io_min; unsigned int io_opt; unsigned int max_discard_sectors; unsigned int max_write_same_sectors; unsigned int discard_granularity; unsigned int discard_alignment; unsigned short logical_block_size; unsigned short max_segments; unsigned short max_integrity_segments; unsigned char misaligned; unsigned char discard_misaligned; unsigned char cluster; unsigned char discard_zeroes_data; unsigned char raid_partial_stripes_expensive; } ;
293 struct blk_mq_ops ;
293 struct blk_mq_hw_ctx ;
293 struct throtl_data ;
293 struct request_queue { struct list_head queue_head; struct request *last_merge; struct elevator_queue *elevator; int nr_rqs[2U]; int nr_rqs_elvpriv; struct request_list root_rl; request_fn_proc *request_fn; make_request_fn *make_request_fn; prep_rq_fn *prep_rq_fn; unprep_rq_fn *unprep_rq_fn; merge_bvec_fn *merge_bvec_fn; softirq_done_fn *softirq_done_fn; rq_timed_out_fn *rq_timed_out_fn; dma_drain_needed_fn *dma_drain_needed; lld_busy_fn *lld_busy_fn; struct blk_mq_ops *mq_ops; unsigned int *mq_map; struct blk_mq_ctx *queue_ctx; unsigned int nr_queues; struct blk_mq_hw_ctx **queue_hw_ctx; unsigned int nr_hw_queues; sector_t end_sector; struct request *boundary_rq; struct delayed_work delay_work; struct backing_dev_info backing_dev_info; void *queuedata; unsigned long queue_flags; int id; gfp_t bounce_gfp; spinlock_t __queue_lock; spinlock_t *queue_lock; struct kobject kobj; struct kobject mq_kobj; struct device *dev; int rpm_status; unsigned int nr_pending; unsigned long nr_requests; unsigned int nr_congestion_on; unsigned int nr_congestion_off; unsigned int nr_batching; unsigned int dma_drain_size; void *dma_drain_buffer; unsigned int dma_pad_mask; unsigned int dma_alignment; struct blk_queue_tag *queue_tags; struct list_head tag_busy_list; unsigned int nr_sorted; unsigned int in_flight[2U]; unsigned int request_fn_active; unsigned int rq_timeout; struct timer_list timeout; struct list_head timeout_list; struct list_head icq_list; unsigned long blkcg_pols[1U]; struct blkcg_gq *root_blkg; struct list_head blkg_list; struct queue_limits limits; unsigned int sg_timeout; unsigned int sg_reserved_size; int node; unsigned int flush_flags; unsigned char flush_not_queueable; unsigned char flush_queue_delayed; unsigned char flush_pending_idx; unsigned char flush_running_idx; unsigned long flush_pending_since; struct list_head flush_queue[2U]; struct list_head flush_data_in_flight; struct request *flush_rq; spinlock_t mq_flush_lock; struct mutex sysfs_lock; int bypass_depth; bsg_job_fn *bsg_job_fn; int bsg_job_size; struct bsg_class_device bsg_dev; struct throtl_data *td; struct callback_head callback_head; wait_queue_head_t mq_freeze_wq; struct percpu_counter mq_usage_counter; struct list_head all_q_node; } ;
1019 struct blk_plug { unsigned long magic; struct list_head list; struct list_head mq_list; struct list_head cb_list; } ;
1393 struct blk_integrity_exchg { void *prot_buf; void *data_buf; sector_t sector; unsigned int data_size; unsigned short sector_size; const char *disk_name; } ;
1425 typedef void integrity_gen_fn(struct blk_integrity_exchg *);
1426 typedef int integrity_vrfy_fn(struct blk_integrity_exchg *);
1427 typedef void integrity_set_tag_fn(void *, void *, unsigned int);
1428 typedef void integrity_get_tag_fn(void *, void *, unsigned int);
1429 struct blk_integrity { integrity_gen_fn *generate_fn; integrity_vrfy_fn *verify_fn; integrity_set_tag_fn *set_tag_fn; integrity_get_tag_fn *get_tag_fn; unsigned short flags; unsigned short tuple_size; unsigned short sector_size; unsigned short tag_size; const char *name; struct kobject kobj; } ;
1488 struct block_device_operations { int (*open)(struct block_device *, fmode_t ); void (*release)(struct gendisk *, fmode_t ); int (*ioctl)(struct block_device *, fmode_t , unsigned int, unsigned long); int (*compat_ioctl)(struct block_device *, fmode_t , unsigned int, unsigned long); int (*direct_access)(struct block_device *, sector_t , void **, unsigned long *); unsigned int (*check_events)(struct gendisk *, unsigned int); int (*media_changed)(struct gendisk *); void (*unlock_native_capacity)(struct gendisk *); int (*revalidate_disk)(struct gendisk *); int (*getgeo)(struct block_device *, struct hd_geometry *); void (*swap_slot_free_notify)(struct block_device *, unsigned long); struct module *owner; } ;
1578 struct scsi_host_cmd_pool ;
1586 struct scsi_host_template { struct module *module; const char *name; int (*detect)(struct scsi_host_template *); int (*release)(struct Scsi_Host *); const char * (*info)(struct Scsi_Host *); int (*ioctl)(struct scsi_device *, int, void *); int (*compat_ioctl)(struct scsi_device *, int, void *); int (*queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); int (*transfer_response)(struct scsi_cmnd *, void (*)(struct scsi_cmnd *)); int (*eh_abort_handler)(struct scsi_cmnd *); int (*eh_device_reset_handler)(struct scsi_cmnd *); int (*eh_target_reset_handler)(struct scsi_cmnd *); int (*eh_bus_reset_handler)(struct scsi_cmnd *); int (*eh_host_reset_handler)(struct scsi_cmnd *); int (*slave_alloc)(struct scsi_device *); int (*slave_configure)(struct scsi_device *); void (*slave_destroy)(struct scsi_device *); int (*target_alloc)(struct scsi_target *); void (*target_destroy)(struct scsi_target *); int (*scan_finished)(struct Scsi_Host *, unsigned long); void (*scan_start)(struct Scsi_Host *); int (*change_queue_depth)(struct scsi_device *, int, int); int (*change_queue_type)(struct scsi_device *, int); int (*bios_param)(struct scsi_device *, struct block_device *, sector_t , int *); void (*unlock_native_capacity)(struct scsi_device *); int (*show_info)(struct seq_file *, struct Scsi_Host *); int (*write_info)(struct Scsi_Host *, char *, int); enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); int (*host_reset)(struct Scsi_Host *, int); const char *proc_name; struct proc_dir_entry *proc_dir; int can_queue; int this_id; unsigned short sg_tablesize; unsigned short sg_prot_tablesize; unsigned short max_sectors; unsigned long dma_boundary; short cmd_per_lun; unsigned char present; unsigned char supported_mode; unsigned char unchecked_isa_dma; unsigned char use_clustering; unsigned char emulated; unsigned char skip_settle_delay; unsigned char ordered_tag; unsigned char no_write_same; unsigned char no_async_abort; unsigned int max_host_blocked; struct device_attribute **shost_attrs; struct device_attribute **sdev_attrs; struct list_head legacy_hosts; u64 vendor_id; } ;
528 enum scsi_host_state { SHOST_CREATED = 1, SHOST_RUNNING = 2, SHOST_CANCEL = 3, SHOST_DEL = 4, SHOST_RECOVERY = 5, SHOST_CANCEL_RECOVERY = 6, SHOST_DEL_RECOVERY = 7 } ;
538 struct Scsi_Host { struct list_head __devices; struct list_head __targets; struct scsi_host_cmd_pool *cmd_pool; spinlock_t free_list_lock; struct list_head free_list; struct list_head starved_list; spinlock_t default_lock; spinlock_t *host_lock; struct mutex scan_mutex; struct list_head eh_cmd_q; struct task_struct *ehandler; struct completion *eh_action; wait_queue_head_t host_wait; struct scsi_host_template *hostt; struct scsi_transport_template *transportt; struct blk_queue_tag *bqt; unsigned int host_busy; unsigned int host_failed; unsigned int host_eh_scheduled; unsigned int host_no; int eh_deadline; unsigned long last_reset; unsigned int max_id; unsigned int max_lun; unsigned int max_channel; unsigned int unique_id; unsigned short max_cmd_len; int this_id; int can_queue; short cmd_per_lun; unsigned short sg_tablesize; unsigned short sg_prot_tablesize; unsigned short max_sectors; unsigned long dma_boundary; unsigned long cmd_serial_number; unsigned char active_mode; unsigned char unchecked_isa_dma; unsigned char use_clustering; unsigned char use_blk_tcq; unsigned char host_self_blocked; unsigned char reverse_ordering; unsigned char ordered_tag; unsigned char tmf_in_progress; unsigned char async_scan; unsigned char eh_noresume; unsigned char no_write_same; char work_q_name[20U]; struct workqueue_struct *work_q; struct workqueue_struct *tmf_work_q; unsigned int host_blocked; unsigned int max_host_blocked; unsigned int prot_capabilities; unsigned char prot_guard_type; struct request_queue *uspace_req_q; unsigned long base; unsigned long io_port; unsigned char n_io_port; unsigned char dma_channel; unsigned int irq; enum scsi_host_state shost_state; struct device shost_gendev; struct device shost_dev; struct list_head sht_legacy_list; void *shost_data; struct device *dma_dev; unsigned long hostdata[0U]; } ;
947 struct scsi_sense_hdr ;
25 enum scsi_device_state { SDEV_CREATED = 1, SDEV_RUNNING = 2, SDEV_CANCEL = 3, SDEV_DEL = 4, SDEV_QUIESCE = 5, SDEV_OFFLINE = 6, SDEV_TRANSPORT_OFFLINE = 7, SDEV_BLOCK = 8, SDEV_CREATED_BLOCK = 9 } ;
71 struct scsi_dh_data ;
71 struct scsi_device { struct Scsi_Host *host; struct request_queue *request_queue; struct list_head siblings; struct list_head same_target_siblings; unsigned int device_busy; spinlock_t list_lock; struct list_head cmd_list; struct list_head starved_entry; struct scsi_cmnd *current_cmnd; unsigned short queue_depth; unsigned short max_queue_depth; unsigned short last_queue_full_depth; unsigned short last_queue_full_count; unsigned long last_queue_full_time; unsigned long queue_ramp_up_period; unsigned long last_queue_ramp_up; unsigned int id; unsigned int lun; unsigned int channel; unsigned int manufacturer; unsigned int sector_size; void *hostdata; char type; char scsi_level; char inq_periph_qual; unsigned char inquiry_len; unsigned char *inquiry; const char *vendor; const char *model; const char *rev; unsigned char current_tag; struct scsi_target *sdev_target; unsigned int sdev_bflags; unsigned int eh_timeout; unsigned char writeable; unsigned char removable; unsigned char changed; unsigned char busy; unsigned char lockable; unsigned char locked; unsigned char borken; unsigned char disconnect; unsigned char soft_reset; unsigned char sdtr; unsigned char wdtr; unsigned char ppr; unsigned char tagged_supported; unsigned char simple_tags; unsigned char ordered_tags; unsigned char was_reset; unsigned char expecting_cc_ua; unsigned char use_10_for_rw; unsigned char use_10_for_ms; unsigned char no_report_opcodes; unsigned char no_write_same; unsigned char use_16_for_rw; unsigned char skip_ms_page_8; unsigned char skip_ms_page_3f; unsigned char skip_vpd_pages; unsigned char use_192_bytes_for_3f; unsigned char no_start_on_add; unsigned char allow_restart; unsigned char manage_start_stop; unsigned char start_stop_pwr_cond; unsigned char no_uld_attach; unsigned char select_no_atn; unsigned char fix_capacity; unsigned char guess_capacity; unsigned char retry_hwerror; unsigned char last_sector_bug; unsigned char no_read_disc_info; unsigned char no_read_capacity_16; unsigned char try_rc_10_first; unsigned char is_visible; unsigned char wce_default_on; unsigned char no_dif; atomic_t disk_events_disable_depth; unsigned long supported_events[1U]; unsigned long pending_events[1U]; struct list_head event_list; struct work_struct event_work; unsigned int device_blocked; unsigned int max_device_blocked; atomic_t iorequest_cnt; atomic_t iodone_cnt; atomic_t ioerr_cnt; struct device sdev_gendev; struct device sdev_dev; struct execute_work ew; struct work_struct requeue_work; struct scsi_dh_data *scsi_dh_data; enum scsi_device_state sdev_state; unsigned long sdev_data[0U]; } ;
197 struct scsi_dh_devlist { char *vendor; char *model; } ;
204 struct scsi_device_handler { struct list_head list; struct module *module; const char *name; const struct scsi_dh_devlist *devlist; int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); int (*attach)(struct scsi_device *); void (*detach)(struct scsi_device *); int (*activate)(struct scsi_device *, void (*)(void *, int), void *); int (*prep_fn)(struct scsi_device *, struct request *); int (*set_params)(struct scsi_device *, const char *); bool (*match)(struct scsi_device *); } ;
220 struct scsi_dh_data { struct scsi_device_handler *scsi_dh; struct scsi_device *sdev; struct kref kref; char buf[0U]; } ;
227 enum scsi_target_state { STARGET_CREATED = 1, STARGET_RUNNING = 2, STARGET_DEL = 3 } ;
233 struct scsi_target { struct scsi_device *starget_sdev_user; struct list_head siblings; struct list_head devices; struct device dev; unsigned int reap_ref; unsigned int channel; unsigned int id; unsigned char create; unsigned char single_lun; unsigned char pdt_1f_for_no_lun; unsigned char no_report_luns; unsigned char expecting_lun_change; unsigned int target_busy; unsigned int can_queue; unsigned int target_blocked; unsigned int max_target_blocked; char scsi_level; struct execute_work ew; enum scsi_target_state state; void *hostdata; unsigned long starget_data[0U]; } ;
518 struct scsi_transport_template { struct transport_container host_attrs; struct transport_container target_attrs; struct transport_container device_attrs; int (*user_scan)(struct Scsi_Host *, uint , uint , uint ); int device_size; int device_private_offset; int target_size; int target_private_offset; int host_size; unsigned char create_work_queue; void (*eh_strategy_handler)(struct Scsi_Host *); enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); int (*it_nexus_response)(struct Scsi_Host *, u64 , int); int (*tsk_mgmt_response)(struct Scsi_Host *, u64 , u64 , int); } ;
132 struct dma_attrs { unsigned long flags[1U]; } ;
70 struct dma_map_ops { void * (*alloc)(struct device *, size_t , dma_addr_t *, gfp_t , struct dma_attrs *); void (*free)(struct device *, size_t , void *, dma_addr_t , struct dma_attrs *); int (*mmap)(struct device *, struct vm_area_struct *, void *, dma_addr_t , size_t , struct dma_attrs *); int (*get_sgtable)(struct device *, struct sg_table *, void *, dma_addr_t , size_t , struct dma_attrs *); dma_addr_t (*map_page)(struct device *, struct page *, unsigned long, size_t , enum dma_data_direction , struct dma_attrs *); void (*unmap_page)(struct device *, dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs *); int (*map_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction , struct dma_attrs *); void (*unmap_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction , struct dma_attrs *); void (*sync_single_for_cpu)(struct device *, dma_addr_t , size_t , enum dma_data_direction ); void (*sync_single_for_device)(struct device *, dma_addr_t , size_t , enum dma_data_direction ); void (*sync_sg_for_cpu)(struct device *, struct scatterlist *, int, enum dma_data_direction ); void (*sync_sg_for_device)(struct device *, struct scatterlist *, int, enum dma_data_direction ); int (*mapping_error)(struct device *, dma_addr_t ); int (*dma_supported)(struct device *, u64 ); int (*set_dma_mask)(struct device *, u64 ); int is_phys; } ;
236 struct scsi_data_buffer { struct sg_table table; unsigned int length; int resid; } ;
37 struct scsi_pointer { char *ptr; int this_residual; struct scatterlist *buffer; int buffers_residual; dma_addr_t dma_handle; volatile int Status; volatile int Message; volatile int have_data_in; volatile int sent_command; volatile int phase; } ;
53 struct scsi_cmnd { struct scsi_device *device; struct list_head list; struct list_head eh_entry; struct delayed_work abort_work; int eh_eflags; unsigned long serial_number; unsigned long jiffies_at_alloc; int retries; int allowed; unsigned char prot_op; unsigned char prot_type; unsigned short cmd_len; enum dma_data_direction sc_data_direction; unsigned char *cmnd; struct scsi_data_buffer sdb; struct scsi_data_buffer *prot_sdb; unsigned int underflow; unsigned int transfersize; struct request *request; unsigned char *sense_buffer; void (*scsi_done)(struct scsi_cmnd *); struct scsi_pointer SCp; unsigned char *host_scribble; int result; unsigned char tag; } ;
119 struct sk_buff ;
38 typedef s32 dma_cookie_t;
15 typedef u64 netdev_features_t;
18 struct nf_conntrack { atomic_t use; } ;
136 struct nf_bridge_info { atomic_t use; unsigned int mask; struct net_device *physindev; struct net_device *physoutdev; unsigned long data[4U]; } ;
146 struct sk_buff_head { struct sk_buff *next; struct sk_buff *prev; __u32 qlen; spinlock_t lock; } ;
354 typedef unsigned int sk_buff_data_t;
355 struct sec_path ;
355 struct __anonstruct____missing_field_name_213 { __u16 csum_start; __u16 csum_offset; } ;
355 union __anonunion____missing_field_name_212 { __wsum csum; struct __anonstruct____missing_field_name_213 __annonCompField76; } ;
355 union __anonunion____missing_field_name_214 { unsigned int napi_id; dma_cookie_t dma_cookie; } ;
355 union __anonunion____missing_field_name_215 { __u32 mark; __u32 dropcount; __u32 reserved_tailroom; } ;
355 struct sk_buff { struct sk_buff *next; struct sk_buff *prev; ktime_t tstamp; struct sock *sk; struct net_device *dev; char cb[48U]; unsigned long _skb_refdst; struct sec_path *sp; unsigned int len; unsigned int data_len; __u16 mac_len; __u16 hdr_len; union __anonunion____missing_field_name_212 __annonCompField77; __u32 priority; unsigned char local_df; unsigned char cloned; unsigned char ip_summed; unsigned char nohdr; unsigned char nfctinfo; unsigned char pkt_type; unsigned char fclone; unsigned char ipvs_property; unsigned char peeked; unsigned char nf_trace; __be16 protocol; void (*destructor)(struct sk_buff *); struct nf_conntrack *nfct; struct nf_bridge_info *nf_bridge; int skb_iif; __u32 rxhash; __be16 vlan_proto; __u16 vlan_tci; __u16 tc_index; __u16 tc_verd; __u16 queue_mapping; unsigned char ndisc_nodetype; unsigned char pfmemalloc; unsigned char ooo_okay; unsigned char l4_rxhash; unsigned char wifi_acked_valid; unsigned char wifi_acked; unsigned char no_fcs; unsigned char head_frag; unsigned char encapsulation; union __anonunion____missing_field_name_214 __annonCompField78; __u32 secmark; union __anonunion____missing_field_name_215 __annonCompField79; __be16 inner_protocol; __u16 inner_transport_header; __u16 inner_network_header; __u16 inner_mac_header; __u16 transport_header; __u16 network_header; __u16 mac_header; sk_buff_data_t tail; sk_buff_data_t end; unsigned char *head; unsigned char *data; unsigned int truesize; atomic_t users; } ;
578 struct dst_entry ;
3157 struct mnt_namespace ;
3158 struct ipc_namespace ;
3159 struct nsproxy { atomic_t count; struct uts_namespace *uts_ns; struct ipc_namespace *ipc_ns; struct mnt_namespace *mnt_ns; struct pid_namespace *pid_ns_for_children; struct net *net_ns; } ;
41 struct nlmsghdr { __u32 nlmsg_len; __u16 nlmsg_type; __u16 nlmsg_flags; __u32 nlmsg_seq; __u32 nlmsg_pid; } ;
145 struct nlattr { __u16 nla_len; __u16 nla_type; } ;
102 struct netlink_callback { struct sk_buff *skb; const struct nlmsghdr *nlh; int (*dump)(struct sk_buff *, struct netlink_callback *); int (*done)(struct netlink_callback *); void *data; struct module *module; u16 family; u16 min_dump_alloc; unsigned int prev_seq; unsigned int seq; long args[6U]; } ;
13 typedef unsigned long kernel_ulong_t;
14 struct pci_device_id { __u32 vendor; __u32 device; __u32 subvendor; __u32 subdevice; __u32 class; __u32 class_mask; kernel_ulong_t driver_data; } ;
186 struct acpi_device_id { __u8 id[9U]; kernel_ulong_t driver_data; } ;
219 struct of_device_id { char name[32U]; char type[32U]; char compatible[128U]; const void *data; } ;
69 struct hotplug_slot ;
69 struct pci_slot { struct pci_bus *bus; struct list_head list; struct hotplug_slot *hotplug; unsigned char number; struct kobject kobj; } ;
110 typedef int pci_power_t;
137 typedef unsigned int pci_channel_state_t;
138 enum pci_channel_state { pci_channel_io_normal = 1, pci_channel_io_frozen = 2, pci_channel_io_perm_failure = 3 } ;
163 typedef unsigned short pci_dev_flags_t;
180 typedef unsigned short pci_bus_flags_t;
237 struct pcie_link_state ;
238 struct pci_vpd ;
239 struct pci_sriov ;
240 struct pci_ats ;
241 struct pci_driver ;
241 union __anonunion____missing_field_name_219 { struct pci_sriov *sriov; struct pci_dev *physfn; } ;
241 struct pci_dev { struct list_head bus_list; struct pci_bus *bus; struct pci_bus *subordinate; void *sysdata; struct proc_dir_entry *procent; struct pci_slot *slot; unsigned int devfn; unsigned short vendor; unsigned short device; unsigned short subsystem_vendor; unsigned short subsystem_device; unsigned int class; u8 revision; u8 hdr_type; u8 pcie_cap; u8 msi_cap; u8 msix_cap; unsigned char pcie_mpss; u8 rom_base_reg; u8 pin; u16 pcie_flags_reg; struct pci_driver *driver; u64 dma_mask; struct device_dma_parameters dma_parms; pci_power_t current_state; u8 pm_cap; unsigned char pme_support; unsigned char pme_interrupt; unsigned char pme_poll; unsigned char d1_support; unsigned char d2_support; unsigned char no_d1d2; unsigned char no_d3cold; unsigned char d3cold_allowed; unsigned char mmio_always_on; unsigned char wakeup_prepared; unsigned char runtime_d3cold; unsigned int d3_delay; unsigned int d3cold_delay; struct pcie_link_state *link_state; pci_channel_state_t error_state; struct device dev; int cfg_size; unsigned int irq; struct resource resource[17U]; bool match_driver; unsigned char transparent; unsigned char multifunction; unsigned char is_added; unsigned char is_busmaster; unsigned char no_msi; unsigned char block_cfg_access; unsigned char broken_parity_status; unsigned char irq_reroute_variant; unsigned char msi_enabled; unsigned char msix_enabled; unsigned char ari_enabled; unsigned char is_managed; unsigned char needs_freset; unsigned char state_saved; unsigned char is_physfn; unsigned char is_virtfn; unsigned char reset_fn; unsigned char is_hotplug_bridge; unsigned char __aer_firmware_first_valid; unsigned char __aer_firmware_first; unsigned char broken_intx_masking; unsigned char io_window_1k; pci_dev_flags_t dev_flags; atomic_t enable_cnt; u32 saved_config_space[16U]; struct hlist_head saved_cap_space; struct bin_attribute *rom_attr; int rom_attr_enabled; struct bin_attribute *res_attr[17U]; struct bin_attribute *res_attr_wc[17U]; struct list_head msi_list; const struct attribute_group **msi_irq_groups; struct pci_vpd *vpd; union __anonunion____missing_field_name_219 __annonCompField80; struct pci_ats *ats; phys_addr_t rom; size_t romlen; } ;
429 struct pci_ops ;
429 struct msi_chip ;
429 struct pci_bus { struct list_head node; struct pci_bus *parent; struct list_head children; struct list_head devices; struct pci_dev *self; struct list_head slots; struct resource *resource[4U]; struct list_head resources; struct resource busn_res; struct pci_ops *ops; struct msi_chip *msi; void *sysdata; struct proc_dir_entry *procdir; unsigned char number; unsigned char primary; unsigned char max_bus_speed; unsigned char cur_bus_speed; char name[48U]; unsigned short bridge_ctl; pci_bus_flags_t bus_flags; struct device *bridge; struct device dev; struct bin_attribute *legacy_io; struct bin_attribute *legacy_mem; unsigned char is_added; } ;
534 struct pci_ops { int (*read)(struct pci_bus *, unsigned int, int, int, u32 *); int (*write)(struct pci_bus *, unsigned int, int, int, u32 ); } ;
555 struct pci_dynids { spinlock_t lock; struct list_head list; } ;
569 typedef unsigned int pci_ers_result_t;
579 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 *); } ;
609 struct pci_driver { struct list_head node; const char *name; const struct pci_device_id *id_table; int (*probe)(struct pci_dev *, const struct pci_device_id *); void (*remove)(struct pci_dev *); int (*suspend)(struct pci_dev *, pm_message_t ); int (*suspend_late)(struct pci_dev *, pm_message_t ); int (*resume_early)(struct pci_dev *); int (*resume)(struct pci_dev *); void (*shutdown)(struct pci_dev *); int (*sriov_configure)(struct pci_dev *, int); const struct pci_error_handlers *err_handler; struct device_driver driver; struct pci_dynids dynids; } ;
17 struct dma_pool ;
39 struct msix_entry { u32 vector; u16 entry; } ;
1809 struct ethhdr { unsigned char h_dest[6U]; unsigned char h_source[6U]; __be16 h_proto; } ;
15 typedef __u64 Elf64_Addr;
16 typedef __u16 Elf64_Half;
20 typedef __u32 Elf64_Word;
21 typedef __u64 Elf64_Xword;
190 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; } ;
198 typedef struct elf64_sym Elf64_Sym;
48 struct kernel_param ;
53 struct kernel_param_ops { unsigned int flags; int (*set)(const char *, const struct kernel_param *); int (*get)(char *, const struct kernel_param *); void (*free)(void *); } ;
58 struct kparam_string ;
58 struct kparam_array ;
58 union __anonunion____missing_field_name_224 { void *arg; const struct kparam_string *str; const struct kparam_array *arr; } ;
58 struct kernel_param { const char *name; const struct kernel_param_ops *ops; u16 perm; s16 level; union __anonunion____missing_field_name_224 __annonCompField81; } ;
70 struct kparam_string { unsigned int maxlen; char *string; } ;
76 struct kparam_array { unsigned int max; unsigned int elemsize; unsigned int *num; const struct kernel_param_ops *ops; void *elem; } ;
463 struct tracepoint ;
464 struct tracepoint_func { void *func; void *data; } ;
29 struct tracepoint { const char *name; struct static_key key; void (*regfunc)(); void (*unregfunc)(); struct tracepoint_func *funcs; } ;
92 struct mod_arch_specific { } ;
36 struct module_param_attrs ;
36 struct module_kobject { struct kobject kobj; struct module *mod; struct kobject *drivers_dir; struct module_param_attrs *mp; struct completion *kobj_completion; } ;
46 struct module_attribute { struct attribute attr; ssize_t (*show)(struct module_attribute *, struct module_kobject *, char *); ssize_t (*store)(struct module_attribute *, struct module_kobject *, const char *, size_t ); void (*setup)(struct module *, const char *); int (*test)(struct module *); void (*free)(struct module *); } ;
208 enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2, MODULE_STATE_UNFORMED = 3 } ;
215 struct module_ref { unsigned long incs; unsigned long decs; } ;
229 struct module_sect_attrs ;
229 struct module_notes_attrs ;
229 struct ftrace_event_call ;
229 struct module { enum module_state state; struct list_head list; char name[56U]; struct module_kobject mkobj; struct module_attribute *modinfo_attrs; const char *version; const char *srcversion; struct kobject *holders_dir; const struct kernel_symbol *syms; const unsigned long *crcs; unsigned int num_syms; struct kernel_param *kp; unsigned int num_kp; unsigned int num_gpl_syms; const struct kernel_symbol *gpl_syms; const unsigned long *gpl_crcs; const struct kernel_symbol *unused_syms; const unsigned long *unused_crcs; unsigned int num_unused_syms; unsigned int num_unused_gpl_syms; const struct kernel_symbol *unused_gpl_syms; const unsigned long *unused_gpl_crcs; bool sig_ok; const struct kernel_symbol *gpl_future_syms; const unsigned long *gpl_future_crcs; unsigned int num_gpl_future_syms; unsigned int num_exentries; struct exception_table_entry *extable; int (*init)(); void *module_init; void *module_core; unsigned int init_size; unsigned int core_size; unsigned int init_text_size; unsigned int core_text_size; unsigned int init_ro_size; unsigned int core_ro_size; struct mod_arch_specific arch; unsigned int taints; unsigned int num_bugs; struct list_head bug_list; struct bug_entry *bug_table; Elf64_Sym *symtab; Elf64_Sym *core_symtab; unsigned int num_symtab; unsigned int core_num_syms; char *strtab; char *core_strtab; struct module_sect_attrs *sect_attrs; struct module_notes_attrs *notes_attrs; char *args; void *percpu; unsigned int percpu_size; unsigned int num_tracepoints; const struct tracepoint **tracepoints_ptrs; unsigned int num_trace_bprintk_fmt; const char **trace_bprintk_fmt_start; struct ftrace_event_call **trace_events; unsigned int num_trace_events; struct list_head source_list; struct list_head target_list; void (*exit)(); struct module_ref *refptr; ctor_fn_t (**ctors)(); unsigned int num_ctors; } ;
86 struct be_bus_address32 { unsigned int address_lo; unsigned int address_hi; } ;
200 struct be_bus_address64 { unsigned long long address; } ;
204 union __anonunion_u_225 { struct be_bus_address32 a32; struct be_bus_address64 a64; } ;
204 struct be_bus_address { union __anonunion_u_225 u; } ;
211 struct mem_array { struct be_bus_address bus_address; void *virtual_address; unsigned int size; } ;
217 struct be_mem_descriptor { unsigned int index; unsigned int category; unsigned int num_elements; unsigned int alignment_mask; unsigned int size_in_bytes; struct mem_array *mem_array; } ;
228 struct iscsi_sge ;
228 struct sgl_handle { unsigned int sgl_index; unsigned int type; unsigned int cid; struct iscsi_task *task; struct iscsi_sge *pfrag; } ;
236 struct hba_parameters { unsigned int ios_per_ctrl; unsigned int cxns_per_ctrl; unsigned int asyncpdus_per_ctrl; unsigned int icds_per_ctrl; unsigned int num_sge_per_io; unsigned int defpdu_hdr_sz; unsigned int defpdu_data_sz; unsigned int num_cq_entries; unsigned int num_eq_entries; unsigned int wrbs_per_cxn; unsigned int crashmode; unsigned int hba_num; unsigned int mgmt_ws_sz; unsigned int hwi_ws_sz; unsigned int eto; unsigned int ldto; unsigned int dbg_flags; unsigned int num_cxn; unsigned int eq_timer; unsigned int num_mcc_pages; unsigned int num_mcc_cq_pages; unsigned int num_cq_pages; unsigned int num_eq_pages; unsigned int num_async_pdu_buf_pages; unsigned int num_async_pdu_buf_sgl_pages; unsigned int num_async_pdu_buf_cq_pages; unsigned int num_async_pdu_hdr_pages; unsigned int num_async_pdu_hdr_sgl_pages; unsigned int num_async_pdu_hdr_cq_pages; unsigned int num_sge; } ;
280 struct invalidate_command_table { unsigned short icd; unsigned short cid; } ;
285 struct wrb_handle ;
285 struct iscsi_wrb ;
285 struct hwi_wrb_context { struct list_head wrb_handle_list; struct list_head wrb_handle_drvr_list; struct wrb_handle **pwrb_handle_base; struct wrb_handle **pwrb_handle_basestd; struct iscsi_wrb *plast_wrb; unsigned short alloc_index; unsigned short free_index; unsigned short wrb_handles_available; unsigned short cid; uint8_t ulp_num; uint16_t register_set; uint16_t doorbell_format; uint32_t doorbell_offset; } ;
303 struct ulp_cid_info { unsigned short *cid_array; unsigned short avlbl_cids; unsigned short cid_alloc; unsigned short cid_free; } ;
83 struct pm_qos_request { struct plist_node node; int pm_qos_class; struct delayed_work work; } ;
45 struct pm_qos_flags_request { struct list_head node; s32 flags; } ;
50 enum dev_pm_qos_req_type { DEV_PM_QOS_LATENCY = 1, DEV_PM_QOS_FLAGS = 2 } ;
55 union __anonunion_data_226 { struct plist_node pnode; struct pm_qos_flags_request flr; } ;
55 struct dev_pm_qos_request { enum dev_pm_qos_req_type type; union __anonunion_data_226 data; struct device *dev; } ;
64 enum pm_qos_type { PM_QOS_UNITIALIZED = 0, PM_QOS_MAX = 1, PM_QOS_MIN = 2 } ;
70 struct pm_qos_constraints { struct plist_head list; s32 target_value; s32 default_value; enum pm_qos_type type; struct blocking_notifier_head *notifiers; } ;
83 struct pm_qos_flags { struct list_head list; s32 effective_flags; } ;
88 struct dev_pm_qos { struct pm_qos_constraints latency; struct pm_qos_flags flags; struct dev_pm_qos_request *latency_req; struct dev_pm_qos_request *flags_req; } ;
54 struct dql { unsigned int num_queued; unsigned int adj_limit; unsigned int last_obj_cnt; unsigned int limit; unsigned int num_completed; unsigned int prev_ovlimit; unsigned int prev_num_queued; unsigned int prev_last_obj_cnt; unsigned int lowest_slack; unsigned long slack_start_time; unsigned int max_limit; unsigned int min_limit; unsigned int slack_hold_time; } ;
43 struct __anonstruct_sync_serial_settings_227 { unsigned int clock_rate; unsigned int clock_type; unsigned short loopback; } ;
43 typedef struct __anonstruct_sync_serial_settings_227 sync_serial_settings;
50 struct __anonstruct_te1_settings_228 { unsigned int clock_rate; unsigned int clock_type; unsigned short loopback; unsigned int slot_map; } ;
50 typedef struct __anonstruct_te1_settings_228 te1_settings;
55 struct __anonstruct_raw_hdlc_proto_229 { unsigned short encoding; unsigned short parity; } ;
55 typedef struct __anonstruct_raw_hdlc_proto_229 raw_hdlc_proto;
65 struct __anonstruct_fr_proto_230 { unsigned int t391; unsigned int t392; unsigned int n391; unsigned int n392; unsigned int n393; unsigned short lmi; unsigned short dce; } ;
65 typedef struct __anonstruct_fr_proto_230 fr_proto;
69 struct __anonstruct_fr_proto_pvc_231 { unsigned int dlci; } ;
69 typedef struct __anonstruct_fr_proto_pvc_231 fr_proto_pvc;
74 struct __anonstruct_fr_proto_pvc_info_232 { unsigned int dlci; char master[16U]; } ;
74 typedef struct __anonstruct_fr_proto_pvc_info_232 fr_proto_pvc_info;
79 struct __anonstruct_cisco_proto_233 { unsigned int interval; unsigned int timeout; } ;
79 typedef struct __anonstruct_cisco_proto_233 cisco_proto;
95 struct ifmap { unsigned long mem_start; unsigned long mem_end; unsigned short base_addr; unsigned char irq; unsigned char dma; unsigned char port; } ;
151 union __anonunion_ifs_ifsu_234 { 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; } ;
151 struct if_settings { unsigned int type; unsigned int size; union __anonunion_ifs_ifsu_234 ifs_ifsu; } ;
169 union __anonunion_ifr_ifrn_235 { char ifrn_name[16U]; } ;
169 union __anonunion_ifr_ifru_236 { 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; } ;
169 struct ifreq { union __anonunion_ifr_ifrn_235 ifr_ifrn; union __anonunion_ifr_ifru_236 ifr_ifru; } ;
39 typedef s32 compat_long_t;
44 typedef u32 compat_uptr_t;
273 struct compat_robust_list { compat_uptr_t next; } ;
277 struct compat_robust_list_head { struct compat_robust_list list; compat_long_t futex_offset; compat_uptr_t list_op_pending; } ;
685 struct ethtool_cmd { __u32 cmd; __u32 supported; __u32 advertising; __u16 speed; __u8 duplex; __u8 port; __u8 phy_address; __u8 transceiver; __u8 autoneg; __u8 mdio_support; __u32 maxtxpkt; __u32 maxrxpkt; __u16 speed_hi; __u8 eth_tp_mdix; __u8 eth_tp_mdix_ctrl; __u32 lp_advertising; __u32 reserved[2U]; } ;
65 struct ethtool_drvinfo { __u32 cmd; char driver[32U]; char version[32U]; char fw_version[32U]; char bus_info[32U]; char reserved1[32U]; char reserved2[12U]; __u32 n_priv_flags; __u32 n_stats; __u32 testinfo_len; __u32 eedump_len; __u32 regdump_len; } ;
105 struct ethtool_wolinfo { __u32 cmd; __u32 supported; __u32 wolopts; __u8 sopass[6U]; } ;
120 struct ethtool_regs { __u32 cmd; __u32 version; __u32 len; __u8 data[0U]; } ;
128 struct ethtool_eeprom { __u32 cmd; __u32 magic; __u32 offset; __u32 len; __u8 data[0U]; } ;
137 struct ethtool_eee { __u32 cmd; __u32 supported; __u32 advertised; __u32 lp_advertised; __u32 eee_active; __u32 eee_enabled; __u32 tx_lpi_enabled; __u32 tx_lpi_timer; __u32 reserved[2U]; } ;
166 struct ethtool_modinfo { __u32 cmd; __u32 type; __u32 eeprom_len; __u32 reserved[8U]; } ;
183 struct ethtool_coalesce { __u32 cmd; __u32 rx_coalesce_usecs; __u32 rx_max_coalesced_frames; __u32 rx_coalesce_usecs_irq; __u32 rx_max_coalesced_frames_irq; __u32 tx_coalesce_usecs; __u32 tx_max_coalesced_frames; __u32 tx_coalesce_usecs_irq; __u32 tx_max_coalesced_frames_irq; __u32 stats_block_coalesce_usecs; __u32 use_adaptive_rx_coalesce; __u32 use_adaptive_tx_coalesce; __u32 pkt_rate_low; __u32 rx_coalesce_usecs_low; __u32 rx_max_coalesced_frames_low; __u32 tx_coalesce_usecs_low; __u32 tx_max_coalesced_frames_low; __u32 pkt_rate_high; __u32 rx_coalesce_usecs_high; __u32 rx_max_coalesced_frames_high; __u32 tx_coalesce_usecs_high; __u32 tx_max_coalesced_frames_high; __u32 rate_sample_interval; } ;
281 struct ethtool_ringparam { __u32 cmd; __u32 rx_max_pending; __u32 rx_mini_max_pending; __u32 rx_jumbo_max_pending; __u32 tx_max_pending; __u32 rx_pending; __u32 rx_mini_pending; __u32 rx_jumbo_pending; __u32 tx_pending; } ;
303 struct ethtool_channels { __u32 cmd; __u32 max_rx; __u32 max_tx; __u32 max_other; __u32 max_combined; __u32 rx_count; __u32 tx_count; __u32 other_count; __u32 combined_count; } ;
331 struct ethtool_pauseparam { __u32 cmd; __u32 autoneg; __u32 rx_pause; __u32 tx_pause; } ;
382 struct ethtool_test { __u32 cmd; __u32 flags; __u32 reserved; __u32 len; __u64 data[0U]; } ;
404 struct ethtool_stats { __u32 cmd; __u32 n_stats; __u64 data[0U]; } ;
425 struct ethtool_tcpip4_spec { __be32 ip4src; __be32 ip4dst; __be16 psrc; __be16 pdst; __u8 tos; } ;
458 struct ethtool_ah_espip4_spec { __be32 ip4src; __be32 ip4dst; __be32 spi; __u8 tos; } ;
474 struct ethtool_usrip4_spec { __be32 ip4src; __be32 ip4dst; __be32 l4_4_bytes; __u8 tos; __u8 ip_ver; __u8 proto; } ;
494 union ethtool_flow_union { struct ethtool_tcpip4_spec tcp_ip4_spec; struct ethtool_tcpip4_spec udp_ip4_spec; struct ethtool_tcpip4_spec sctp_ip4_spec; struct ethtool_ah_espip4_spec ah_ip4_spec; struct ethtool_ah_espip4_spec esp_ip4_spec; struct ethtool_usrip4_spec usr_ip4_spec; struct ethhdr ether_spec; __u8 hdata[52U]; } ;
505 struct ethtool_flow_ext { __u8 padding[2U]; unsigned char h_dest[6U]; __be16 vlan_etype; __be16 vlan_tci; __be32 data[2U]; } ;
524 struct ethtool_rx_flow_spec { __u32 flow_type; union ethtool_flow_union h_u; struct ethtool_flow_ext h_ext; union ethtool_flow_union m_u; struct ethtool_flow_ext m_ext; __u64 ring_cookie; __u32 location; } ;
550 struct ethtool_rxnfc { __u32 cmd; __u32 flow_type; __u64 data; struct ethtool_rx_flow_spec fs; __u32 rule_cnt; __u32 rule_locs[0U]; } ;
684 struct ethtool_flash { __u32 cmd; __u32 region; char data[128U]; } ;
692 struct ethtool_dump { __u32 cmd; __u32 version; __u32 flag; __u32 len; __u8 data[0U]; } ;
768 struct ethtool_ts_info { __u32 cmd; __u32 so_timestamping; __s32 phc_index; __u32 tx_types; __u32 tx_reserved[3U]; __u32 rx_filters; __u32 rx_reserved[3U]; } ;
44 enum ethtool_phys_id_state { ETHTOOL_ID_INACTIVE = 0, ETHTOOL_ID_ACTIVE = 1, ETHTOOL_ID_ON = 2, ETHTOOL_ID_OFF = 3 } ;
79 struct ethtool_ops { int (*get_settings)(struct net_device *, struct ethtool_cmd *); int (*set_settings)(struct net_device *, struct ethtool_cmd *); void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *); int (*get_regs_len)(struct net_device *); void (*get_regs)(struct net_device *, struct ethtool_regs *, void *); void (*get_wol)(struct net_device *, struct ethtool_wolinfo *); int (*set_wol)(struct net_device *, struct ethtool_wolinfo *); u32 (*get_msglevel)(struct net_device *); void (*set_msglevel)(struct net_device *, u32 ); int (*nway_reset)(struct net_device *); u32 (*get_link)(struct net_device *); int (*get_eeprom_len)(struct net_device *); int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam *); int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam *); void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); void (*get_strings)(struct net_device *, u32 , u8 *); int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state ); void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); int (*begin)(struct net_device *); void (*complete)(struct net_device *); u32 (*get_priv_flags)(struct net_device *); int (*set_priv_flags)(struct net_device *, u32 ); int (*get_sset_count)(struct net_device *, int); int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, u32 *); int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); int (*flash_device)(struct net_device *, struct ethtool_flash *); int (*reset)(struct net_device *, u32 *); u32 (*get_rxfh_indir_size)(struct net_device *); int (*get_rxfh_indir)(struct net_device *, u32 *); int (*set_rxfh_indir)(struct net_device *, const u32 *); void (*get_channels)(struct net_device *, struct ethtool_channels *); int (*set_channels)(struct net_device *, struct ethtool_channels *); int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); int (*get_dump_data)(struct net_device *, struct ethtool_dump *, void *); int (*set_dump)(struct net_device *, struct ethtool_dump *); int (*get_ts_info)(struct net_device *, struct ethtool_ts_info *); int (*get_module_info)(struct net_device *, struct ethtool_modinfo *); int (*get_module_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); int (*get_eee)(struct net_device *, struct ethtool_eee *); int (*set_eee)(struct net_device *, struct ethtool_eee *); } ;
249 struct prot_inuse ;
250 struct netns_core { struct ctl_table_header *sysctl_hdr; int sysctl_somaxconn; struct prot_inuse *inuse; } ;
38 struct u64_stats_sync { } ;
145 struct ipstats_mib { u64 mibs[36U]; struct u64_stats_sync syncp; } ;
61 struct icmp_mib { unsigned long mibs[28U]; } ;
67 struct icmpmsg_mib { atomic_long_t mibs[512U]; } ;
72 struct icmpv6_mib { unsigned long mibs[6U]; } ;
83 struct icmpv6msg_mib { atomic_long_t mibs[512U]; } ;
93 struct tcp_mib { unsigned long mibs[16U]; } ;
100 struct udp_mib { unsigned long mibs[8U]; } ;
106 struct linux_mib { unsigned long mibs[97U]; } ;
112 struct linux_xfrm_mib { unsigned long mibs[29U]; } ;
118 struct netns_mib { struct tcp_mib *tcp_statistics[1U]; struct ipstats_mib *ip_statistics[1U]; struct linux_mib *net_statistics[1U]; struct udp_mib *udp_statistics[1U]; struct udp_mib *udplite_statistics[1U]; struct icmp_mib *icmp_statistics[1U]; struct icmpmsg_mib *icmpmsg_statistics; struct proc_dir_entry *proc_net_devsnmp6; struct udp_mib *udp_stats_in6[1U]; struct udp_mib *udplite_stats_in6[1U]; struct ipstats_mib *ipv6_statistics[1U]; struct icmpv6_mib *icmpv6_statistics[1U]; struct icmpv6msg_mib *icmpv6msg_statistics; struct linux_xfrm_mib *xfrm_statistics[1U]; } ;
26 struct netns_unix { int sysctl_max_dgram_qlen; struct ctl_table_header *ctl; } ;
12 struct netns_packet { struct mutex sklist_lock; struct hlist_head sklist; } ;
14 struct netns_frags { int nqueues; struct list_head lru_list; spinlock_t lru_lock; struct percpu_counter mem; int timeout; int high_thresh; int low_thresh; } ;
180 struct tcpm_hash_bucket ;
181 struct ipv4_devconf ;
182 struct fib_rules_ops ;
183 struct fib_table ;
184 struct local_ports { seqlock_t lock; int range[2U]; } ;
22 struct inet_peer_base ;
22 struct xt_table ;
22 struct netns_ipv4 { struct ctl_table_header *forw_hdr; struct ctl_table_header *frags_hdr; struct ctl_table_header *ipv4_hdr; struct ctl_table_header *route_hdr; struct ctl_table_header *xfrm4_hdr; struct ipv4_devconf *devconf_all; struct ipv4_devconf *devconf_dflt; struct fib_rules_ops *rules_ops; bool fib_has_custom_rules; struct fib_table *fib_local; struct fib_table *fib_main; struct fib_table *fib_default; int fib_num_tclassid_users; struct hlist_head *fib_table_hash; struct sock *fibnl; struct sock **icmp_sk; struct inet_peer_base *peers; struct tcpm_hash_bucket *tcp_metrics_hash; unsigned int tcp_metrics_hash_log; struct netns_frags frags; struct xt_table *iptable_filter; struct xt_table *iptable_mangle; struct xt_table *iptable_raw; struct xt_table *arptable_filter; struct xt_table *iptable_security; struct xt_table *nat_table; int sysctl_icmp_echo_ignore_all; int sysctl_icmp_echo_ignore_broadcasts; int sysctl_icmp_ignore_bogus_error_responses; int sysctl_icmp_ratelimit; int sysctl_icmp_ratemask; int sysctl_icmp_errors_use_inbound_ifaddr; struct local_ports sysctl_local_ports; int sysctl_tcp_ecn; int sysctl_ip_no_pmtu_disc; int sysctl_ip_fwd_use_pmtu; kgid_t sysctl_ping_group_range[2U]; atomic_t dev_addr_genid; struct list_head mr_tables; struct fib_rules_ops *mr_rules_ops; atomic_t rt_genid; } ;
90 struct neighbour ;
90 struct dst_ops { unsigned short family; __be16 protocol; unsigned int gc_thresh; int (*gc)(struct dst_ops *); struct dst_entry * (*check)(struct dst_entry *, __u32 ); unsigned int (*default_advmss)(const struct dst_entry *); unsigned int (*mtu)(const struct dst_entry *); u32 * (*cow_metrics)(struct dst_entry *, unsigned long); void (*destroy)(struct dst_entry *); void (*ifdown)(struct dst_entry *, struct net_device *, int); struct dst_entry * (*negative_advice)(struct dst_entry *); void (*link_failure)(struct sk_buff *); void (*update_pmtu)(struct dst_entry *, struct sock *, struct sk_buff *, u32 ); void (*redirect)(struct dst_entry *, struct sock *, struct sk_buff *); int (*local_out)(struct sk_buff *); struct neighbour * (*neigh_lookup)(const struct dst_entry *, struct sk_buff *, const void *); struct kmem_cache *kmem_cachep; struct percpu_counter pcpuc_entries; } ;
73 struct netns_sysctl_ipv6 { struct ctl_table_header *hdr; struct ctl_table_header *route_hdr; struct ctl_table_header *icmp_hdr; struct ctl_table_header *frags_hdr; struct ctl_table_header *xfrm6_hdr; int bindv6only; int flush_delay; int ip6_rt_max_size; int ip6_rt_gc_min_interval; int ip6_rt_gc_timeout; int ip6_rt_gc_interval; int ip6_rt_gc_elasticity; int ip6_rt_mtu_expires; int ip6_rt_min_advmss; int flowlabel_consistency; int icmpv6_time; int anycast_src_echo_reply; } ;
34 struct ipv6_devconf ;
34 struct rt6_info ;
34 struct rt6_statistics ;
34 struct fib6_table ;
34 struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl; struct ipv6_devconf *devconf_all; struct ipv6_devconf *devconf_dflt; struct inet_peer_base *peers; struct netns_frags frags; struct xt_table *ip6table_filter; struct xt_table *ip6table_mangle; struct xt_table *ip6table_raw; struct xt_table *ip6table_security; struct xt_table *ip6table_nat; struct rt6_info *ip6_null_entry; struct rt6_statistics *rt6_stats; struct timer_list ip6_fib_timer; struct hlist_head *fib_table_hash; struct fib6_table *fib6_main_tbl; struct dst_ops ip6_dst_ops; unsigned int ip6_rt_gc_expire; unsigned long ip6_rt_last_gc; struct rt6_info *ip6_prohibit_entry; struct rt6_info *ip6_blk_hole_entry; struct fib6_table *fib6_local_tbl; struct fib_rules_ops *fib6_rules_ops; struct sock **icmp_sk; struct sock *ndisc_sk; struct sock *tcp_sk; struct sock *igmp_sk; struct list_head mr6_tables; struct fib_rules_ops *mr6_rules_ops; atomic_t dev_addr_genid; atomic_t rt_genid; } ;
79 struct netns_nf_frag { struct netns_sysctl_ipv6 sysctl; struct netns_frags frags; } ;
85 struct sctp_mib ;
86 struct netns_sctp { struct sctp_mib *sctp_statistics[1U]; struct proc_dir_entry *proc_net_sctp; struct ctl_table_header *sysctl_header; struct sock *ctl_sock; struct list_head local_addr_list; struct list_head addr_waitq; struct timer_list addr_wq_timer; struct list_head auto_asconf_splist; spinlock_t addr_wq_lock; spinlock_t local_addr_lock; unsigned int rto_initial; unsigned int rto_min; unsigned int rto_max; int rto_alpha; int rto_beta; int max_burst; int cookie_preserve_enable; char *sctp_hmac_alg; unsigned int valid_cookie_life; unsigned int sack_timeout; unsigned int hb_interval; int max_retrans_association; int max_retrans_path; int max_retrans_init; int pf_retrans; int sndbuf_policy; int rcvbuf_policy; int default_auto_asconf; int addip_enable; int addip_noauth; int prsctp_enable; int auth_enable; int scope_policy; int rwnd_upd_shift; unsigned long max_autoclose; } ;
133 struct netns_dccp { struct sock *v4_ctl_sk; struct sock *v6_ctl_sk; } ;
337 struct nf_logger ;
338 struct netns_nf { struct proc_dir_entry *proc_netfilter; const struct nf_logger *nf_loggers[13U]; struct ctl_table_header *nf_log_dir_header; } ;
17 struct ebt_table ;
18 struct netns_xt { struct list_head tables[13U]; bool notrack_deprecated_warning; struct ebt_table *broute_table; struct ebt_table *frame_filter; struct ebt_table *frame_nat; bool ulog_warn_deprecated; bool ebt_ulog_warn_deprecated; } ;
24 struct hlist_nulls_node ;
24 struct hlist_nulls_head { struct hlist_nulls_node *first; } ;
20 struct hlist_nulls_node { struct hlist_nulls_node *next; struct hlist_nulls_node **pprev; } ;
32 struct nf_proto_net { struct ctl_table_header *ctl_table_header; struct ctl_table *ctl_table; struct ctl_table_header *ctl_compat_header; struct ctl_table *ctl_compat_table; unsigned int users; } ;
23 struct nf_generic_net { struct nf_proto_net pn; unsigned int timeout; } ;
28 struct nf_tcp_net { struct nf_proto_net pn; unsigned int timeouts[14U]; unsigned int tcp_loose; unsigned int tcp_be_liberal; unsigned int tcp_max_retrans; } ;
42 struct nf_udp_net { struct nf_proto_net pn; unsigned int timeouts[2U]; } ;
47 struct nf_icmp_net { struct nf_proto_net pn; unsigned int timeout; } ;
52 struct nf_ip_net { struct nf_generic_net generic; struct nf_tcp_net tcp; struct nf_udp_net udp; struct nf_icmp_net icmp; struct nf_icmp_net icmpv6; struct ctl_table_header *ctl_table_header; struct ctl_table *ctl_table; } ;
63 struct ip_conntrack_stat ;
63 struct nf_ct_event_notifier ;
63 struct nf_exp_event_notifier ;
63 struct netns_ct { atomic_t count; unsigned int expect_count; struct ctl_table_header *sysctl_header; struct ctl_table_header *acct_sysctl_header; struct ctl_table_header *tstamp_sysctl_header; struct ctl_table_header *event_sysctl_header; struct ctl_table_header *helper_sysctl_header; char *slabname; unsigned int sysctl_log_invalid; unsigned int sysctl_events_retry_timeout; int sysctl_events; int sysctl_acct; int sysctl_auto_assign_helper; bool auto_assign_helper_warned; int sysctl_tstamp; int sysctl_checksum; unsigned int htable_size; struct kmem_cache *nf_conntrack_cachep; struct hlist_nulls_head *hash; struct hlist_head *expect_hash; struct hlist_nulls_head unconfirmed; struct hlist_nulls_head dying; struct hlist_nulls_head tmpl; struct ip_conntrack_stat *stat; struct nf_ct_event_notifier *nf_conntrack_event_cb; struct nf_exp_event_notifier *nf_expect_event_cb; struct nf_ip_net nf_ct_proto; unsigned int labels_used; u8 label_words; struct hlist_head *nat_bysource; unsigned int nat_htable_size; } ;
104 struct nft_af_info ;
105 struct netns_nftables { struct list_head af_info; struct list_head commit_list; struct nft_af_info *ipv4; struct nft_af_info *ipv6; struct nft_af_info *inet; struct nft_af_info *arp; struct nft_af_info *bridge; u8 gencursor; u8 genctr; } ;
489 struct xfrm_policy_hash { struct hlist_head *table; unsigned int hmask; } ;
16 struct netns_xfrm { struct list_head state_all; struct hlist_head *state_bydst; struct hlist_head *state_bysrc; struct hlist_head *state_byspi; unsigned int state_hmask; unsigned int state_num; struct work_struct state_hash_work; struct hlist_head state_gc_list; struct work_struct state_gc_work; struct list_head policy_all; struct hlist_head *policy_byidx; unsigned int policy_idx_hmask; struct hlist_head policy_inexact[6U]; struct xfrm_policy_hash policy_bydst[6U]; unsigned int policy_count[6U]; struct work_struct policy_hash_work; struct sock *nlsk; struct sock *nlsk_stash; u32 sysctl_aevent_etime; u32 sysctl_aevent_rseqth; int sysctl_larval_drop; u32 sysctl_acq_expires; struct ctl_table_header *sysctl_hdr; struct dst_ops xfrm4_dst_ops; struct dst_ops xfrm6_dst_ops; spinlock_t xfrm_state_lock; spinlock_t xfrm_policy_sk_bundle_lock; rwlock_t xfrm_policy_lock; struct mutex xfrm_cfg_mutex; } ;
65 struct net_generic ;
66 struct netns_ipvs ;
67 struct net { atomic_t passive; atomic_t count; spinlock_t rules_mod_lock; struct list_head list; struct list_head cleanup_list; struct list_head exit_list; struct user_namespace *user_ns; unsigned int proc_inum; struct proc_dir_entry *proc_net; struct proc_dir_entry *proc_net_stat; struct ctl_table_set sysctls; struct sock *rtnl; struct sock *genl_sock; struct list_head dev_base_head; struct hlist_head *dev_name_head; struct hlist_head *dev_index_head; unsigned int dev_base_seq; int ifindex; unsigned int dev_unreg_count; struct list_head rules_ops; struct net_device *loopback_dev; struct netns_core core; struct netns_mib mib; struct netns_packet packet; struct netns_unix unx; struct netns_ipv4 ipv4; struct netns_ipv6 ipv6; struct netns_sctp sctp; struct netns_dccp dccp; struct netns_nf nf; struct netns_xt xt; struct netns_ct ct; struct netns_nftables nft; struct netns_nf_frag nf_frag; struct sock *nfnl; struct sock *nfnl_stash; struct sk_buff_head wext_nlevents; struct net_generic *gen; struct netns_xfrm xfrm; struct netns_ipvs *ipvs; struct sock *diag_nlsk; atomic_t fnhe_genid; } ;
395 struct dsa_chip_data { struct device *mii_bus; int sw_addr; char *port_names[12U]; s8 *rtable; } ;
46 struct dsa_platform_data { struct device *netdev; int nr_chips; struct dsa_chip_data *chip; } ;
61 struct dsa_switch ;
61 struct dsa_switch_tree { struct dsa_platform_data *pd; struct net_device *master_netdev; __be16 tag_protocol; s8 cpu_switch; s8 cpu_port; int link_poll_needed; struct work_struct link_poll_work; struct timer_list link_poll_timer; struct dsa_switch *ds[4U]; } ;
94 struct dsa_switch_driver ;
94 struct mii_bus ;
94 struct dsa_switch { struct dsa_switch_tree *dst; int index; struct dsa_chip_data *pd; struct dsa_switch_driver *drv; struct mii_bus *master_mii_bus; u32 dsa_port_mask; u32 phys_port_mask; struct mii_bus *slave_mii_bus; struct net_device *ports[12U]; } ;
146 struct dsa_switch_driver { struct list_head list; __be16 tag_protocol; int priv_size; char * (*probe)(struct mii_bus *, int); int (*setup)(struct dsa_switch *); int (*set_addr)(struct dsa_switch *, u8 *); int (*phy_read)(struct dsa_switch *, int, int); int (*phy_write)(struct dsa_switch *, int, int, u16 ); void (*poll_link)(struct dsa_switch *); void (*get_strings)(struct dsa_switch *, int, uint8_t *); void (*get_ethtool_stats)(struct dsa_switch *, int, uint64_t *); int (*get_sset_count)(struct dsa_switch *); } ;
200 struct ieee_ets { __u8 willing; __u8 ets_cap; __u8 cbs; __u8 tc_tx_bw[8U]; __u8 tc_rx_bw[8U]; __u8 tc_tsa[8U]; __u8 prio_tc[8U]; __u8 tc_reco_bw[8U]; __u8 tc_reco_tsa[8U]; __u8 reco_prio_tc[8U]; } ;
69 struct ieee_maxrate { __u64 tc_maxrate[8U]; } ;
80 struct ieee_pfc { __u8 pfc_cap; __u8 pfc_en; __u8 mbc; __u16 delay; __u64 requests[8U]; __u64 indications[8U]; } ;
100 struct cee_pg { __u8 willing; __u8 error; __u8 pg_en; __u8 tcs_supported; __u8 pg_bw[8U]; __u8 prio_pg[8U]; } ;
123 struct cee_pfc { __u8 willing; __u8 error; __u8 pfc_en; __u8 tcs_supported; } ;
138 struct dcb_app { __u8 selector; __u8 priority; __u16 protocol; } ;
167 struct dcb_peer_app_info { __u8 willing; __u8 error; } ;
40 struct dcbnl_rtnl_ops { int (*ieee_getets)(struct net_device *, struct ieee_ets *); int (*ieee_setets)(struct net_device *, struct ieee_ets *); int (*ieee_getmaxrate)(struct net_device *, struct ieee_maxrate *); int (*ieee_setmaxrate)(struct net_device *, struct ieee_maxrate *); int (*ieee_getpfc)(struct net_device *, struct ieee_pfc *); int (*ieee_setpfc)(struct net_device *, struct ieee_pfc *); int (*ieee_getapp)(struct net_device *, struct dcb_app *); int (*ieee_setapp)(struct net_device *, struct dcb_app *); int (*ieee_delapp)(struct net_device *, struct dcb_app *); int (*ieee_peer_getets)(struct net_device *, struct ieee_ets *); int (*ieee_peer_getpfc)(struct net_device *, struct ieee_pfc *); u8 (*getstate)(struct net_device *); u8 (*setstate)(struct net_device *, u8 ); void (*getpermhwaddr)(struct net_device *, u8 *); void (*setpgtccfgtx)(struct net_device *, int, u8 , u8 , u8 , u8 ); void (*setpgbwgcfgtx)(struct net_device *, int, u8 ); void (*setpgtccfgrx)(struct net_device *, int, u8 , u8 , u8 , u8 ); void (*setpgbwgcfgrx)(struct net_device *, int, u8 ); void (*getpgtccfgtx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); void (*getpgbwgcfgtx)(struct net_device *, int, u8 *); void (*getpgtccfgrx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); void (*getpgbwgcfgrx)(struct net_device *, int, u8 *); void (*setpfccfg)(struct net_device *, int, u8 ); void (*getpfccfg)(struct net_device *, int, u8 *); u8 (*setall)(struct net_device *); u8 (*getcap)(struct net_device *, int, u8 *); int (*getnumtcs)(struct net_device *, int, u8 *); int (*setnumtcs)(struct net_device *, int, u8 ); u8 (*getpfcstate)(struct net_device *); void (*setpfcstate)(struct net_device *, u8 ); void (*getbcncfg)(struct net_device *, int, u32 *); void (*setbcncfg)(struct net_device *, int, u32 ); void (*getbcnrp)(struct net_device *, int, u8 *); void (*setbcnrp)(struct net_device *, int, u8 ); u8 (*setapp)(struct net_device *, u8 , u16 , u8 ); u8 (*getapp)(struct net_device *, u8 , u16 ); u8 (*getfeatcfg)(struct net_device *, int, u8 *); u8 (*setfeatcfg)(struct net_device *, int, u8 ); u8 (*getdcbx)(struct net_device *); u8 (*setdcbx)(struct net_device *, u8 ); int (*peer_getappinfo)(struct net_device *, struct dcb_peer_app_info *, u16 *); int (*peer_getapptable)(struct net_device *, struct dcb_app *); int (*cee_peer_getpg)(struct net_device *, struct cee_pg *); int (*cee_peer_getpfc)(struct net_device *, struct cee_pfc *); } ;
102 struct taskstats { __u16 version; __u32 ac_exitcode; __u8 ac_flag; __u8 ac_nice; __u64 cpu_count; __u64 cpu_delay_total; __u64 blkio_count; __u64 blkio_delay_total; __u64 swapin_count; __u64 swapin_delay_total; __u64 cpu_run_real_total; __u64 cpu_run_virtual_total; char ac_comm[32U]; __u8 ac_sched; __u8 ac_pad[3U]; __u32 ac_uid; __u32 ac_gid; __u32 ac_pid; __u32 ac_ppid; __u32 ac_btime; __u64 ac_etime; __u64 ac_utime; __u64 ac_stime; __u64 ac_minflt; __u64 ac_majflt; __u64 coremem; __u64 virtmem; __u64 hiwater_rss; __u64 hiwater_vm; __u64 read_char; __u64 write_char; __u64 read_syscalls; __u64 write_syscalls; __u64 read_bytes; __u64 write_bytes; __u64 cancelled_write_bytes; __u64 nvcsw; __u64 nivcsw; __u64 ac_utimescaled; __u64 ac_stimescaled; __u64 cpu_scaled_run_real_total; __u64 freepages_count; __u64 freepages_delay_total; } ;
55 struct xattr_handler { const char *prefix; int flags; size_t (*list)(struct dentry *, char *, size_t , const char *, size_t , int); int (*get)(struct dentry *, const char *, void *, size_t , int); int (*set)(struct dentry *, const char *, const void *, size_t , int, int); } ;
53 struct simple_xattrs { struct list_head head; spinlock_t lock; } ;
98 struct percpu_ref ;
54 typedef void percpu_ref_func_t(struct percpu_ref *);
55 struct percpu_ref { atomic_t count; unsigned int *pcpu_count; percpu_ref_func_t *release; percpu_ref_func_t *confirm_kill; struct callback_head rcu; } ;
173 struct cgroupfs_root ;
174 struct cgroup_subsys ;
175 struct cgroup ;
62 struct cgroup_subsys_state { struct cgroup *cgroup; struct cgroup_subsys *ss; struct percpu_ref refcnt; struct cgroup_subsys_state *parent; unsigned long flags; struct callback_head callback_head; struct work_struct destroy_work; } ;
142 struct cgroup_name { struct callback_head callback_head; char name[]; } ;
160 struct cgroup { unsigned long flags; int id; int nr_css; struct list_head sibling; struct list_head children; struct list_head files; struct cgroup *parent; struct dentry *dentry; u64 serial_nr; struct cgroup_name *name; struct cgroup_subsys_state *subsys[12U]; struct cgroupfs_root *root; struct list_head cset_links; struct list_head release_list; struct list_head pidlists; struct mutex pidlist_mutex; struct cgroup_subsys_state dummy_css; struct callback_head callback_head; struct work_struct destroy_work; struct simple_xattrs xattrs; } ;
252 struct cgroupfs_root { struct super_block *sb; unsigned long subsys_mask; int hierarchy_id; struct cgroup top_cgroup; int number_of_cgroups; struct list_head root_list; unsigned long flags; struct idr cgroup_idr; char release_agent_path[4096U]; char name[64U]; } ;
342 struct css_set { atomic_t refcount; struct hlist_node hlist; struct list_head tasks; struct list_head cgrp_links; struct cgroup_subsys_state *subsys[12U]; struct callback_head callback_head; } ;
392 struct cftype { char name[64U]; int private; umode_t mode; size_t max_write_len; unsigned int flags; struct cgroup_subsys *ss; u64 (*read_u64)(struct cgroup_subsys_state *, struct cftype *); s64 (*read_s64)(struct cgroup_subsys_state *, struct cftype *); int (*seq_show)(struct seq_file *, void *); void * (*seq_start)(struct seq_file *, loff_t *); void * (*seq_next)(struct seq_file *, void *, loff_t *); void (*seq_stop)(struct seq_file *, void *); int (*write_u64)(struct cgroup_subsys_state *, struct cftype *, u64 ); int (*write_s64)(struct cgroup_subsys_state *, struct cftype *, s64 ); int (*write_string)(struct cgroup_subsys_state *, struct cftype *, const char *); int (*trigger)(struct cgroup_subsys_state *, unsigned int); } ;
479 struct cftype_set { struct list_head node; struct cftype *cfts; } ;
546 struct cgroup_taskset ;
557 struct cgroup_subsys { struct cgroup_subsys_state * (*css_alloc)(struct cgroup_subsys_state *); int (*css_online)(struct cgroup_subsys_state *); void (*css_offline)(struct cgroup_subsys_state *); void (*css_free)(struct cgroup_subsys_state *); int (*can_attach)(struct cgroup_subsys_state *, struct cgroup_taskset *); void (*cancel_attach)(struct cgroup_subsys_state *, struct cgroup_taskset *); void (*attach)(struct cgroup_subsys_state *, struct cgroup_taskset *); void (*fork)(struct task_struct *); void (*exit)(struct cgroup_subsys_state *, struct cgroup_subsys_state *, struct task_struct *); void (*bind)(struct cgroup_subsys_state *); int subsys_id; int disabled; int early_init; bool broken_hierarchy; bool warned_broken_hierarchy; const char *name; struct cgroupfs_root *root; struct list_head cftsets; struct cftype *base_cftypes; struct cftype_set base_cftset; struct module *module; } ;
849 struct netprio_map { struct callback_head rcu; u32 priomap_len; u32 priomap[]; } ;
55 struct ndmsg { __u8 ndm_family; __u8 ndm_pad1; __u16 ndm_pad2; __s32 ndm_ifindex; __u16 ndm_state; __u8 ndm_flags; __u8 ndm_type; } ;
39 struct rtnl_link_stats64 { __u64 rx_packets; __u64 tx_packets; __u64 rx_bytes; __u64 tx_bytes; __u64 rx_errors; __u64 tx_errors; __u64 rx_dropped; __u64 tx_dropped; __u64 multicast; __u64 collisions; __u64 rx_length_errors; __u64 rx_over_errors; __u64 rx_crc_errors; __u64 rx_frame_errors; __u64 rx_fifo_errors; __u64 rx_missed_errors; __u64 tx_aborted_errors; __u64 tx_carrier_errors; __u64 tx_fifo_errors; __u64 tx_heartbeat_errors; __u64 tx_window_errors; __u64 rx_compressed; __u64 tx_compressed; } ;
536 struct ifla_vf_info { __u32 vf; __u8 mac[32U]; __u32 vlan; __u32 qos; __u32 tx_rate; __u32 spoofchk; __u32 linkstate; } ;
27 struct netpoll_info ;
28 struct phy_device ;
29 struct wireless_dev ;
64 enum netdev_tx { __NETDEV_TX_MIN = -2147483648, NETDEV_TX_OK = 0, NETDEV_TX_BUSY = 16, NETDEV_TX_LOCKED = 32 } ;
116 typedef enum netdev_tx netdev_tx_t;
135 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; } ;
196 struct neigh_parms ;
217 struct netdev_hw_addr_list { struct list_head list; int count; } ;
222 struct hh_cache { u16 hh_len; u16 __pad; seqlock_t hh_lock; unsigned long hh_data[16U]; } ;
251 struct header_ops { int (*create)(struct sk_buff *, struct net_device *, unsigned short, const void *, const void *, unsigned int); int (*parse)(const struct sk_buff *, unsigned char *); int (*rebuild)(struct sk_buff *); int (*cache)(const struct neighbour *, struct hh_cache *, __be16 ); void (*cache_update)(struct hh_cache *, const struct net_device *, const unsigned char *); } ;
302 struct napi_struct { struct list_head poll_list; unsigned long state; int weight; unsigned int gro_count; int (*poll)(struct napi_struct *, int); spinlock_t poll_lock; int poll_owner; struct net_device *dev; struct sk_buff *gro_list; struct sk_buff *skb; struct list_head dev_list; struct hlist_node napi_hash_node; unsigned int napi_id; } ;
346 enum rx_handler_result { RX_HANDLER_CONSUMED = 0, RX_HANDLER_ANOTHER = 1, RX_HANDLER_EXACT = 2, RX_HANDLER_PASS = 3 } ;
394 typedef enum rx_handler_result rx_handler_result_t;
395 typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **);
532 struct Qdisc ;
532 struct netdev_queue { struct net_device *dev; struct Qdisc *qdisc; struct Qdisc *qdisc_sleeping; struct kobject kobj; int numa_node; spinlock_t _xmit_lock; int xmit_lock_owner; unsigned long trans_start; unsigned long trans_timeout; unsigned long state; struct dql dql; } ;
594 struct rps_map { unsigned int len; struct callback_head rcu; u16 cpus[0U]; } ;
606 struct rps_dev_flow { u16 cpu; u16 filter; unsigned int last_qtail; } ;
618 struct rps_dev_flow_table { unsigned int mask; struct callback_head rcu; struct rps_dev_flow flows[0U]; } ;
669 struct netdev_rx_queue { struct rps_map *rps_map; struct rps_dev_flow_table *rps_flow_table; struct kobject kobj; struct net_device *dev; } ;
692 struct xps_map { unsigned int len; unsigned int alloc_len; struct callback_head rcu; u16 queues[0U]; } ;
705 struct xps_dev_maps { struct callback_head rcu; struct xps_map *cpu_map[0U]; } ;
716 struct netdev_tc_txq { u16 count; u16 offset; } ;
727 struct netdev_fcoe_hbainfo { char manufacturer[64U]; char serial_number[64U]; char hardware_version[64U]; char driver_version[64U]; char optionrom_version[64U]; char firmware_version[64U]; char model[256U]; char model_description[256U]; } ;
743 struct netdev_phys_port_id { unsigned char id[32U]; unsigned char id_len; } ;
756 struct net_device_ops { int (*ndo_init)(struct net_device *); void (*ndo_uninit)(struct net_device *); int (*ndo_open)(struct net_device *); int (*ndo_stop)(struct net_device *); netdev_tx_t (*ndo_start_xmit)(struct sk_buff *, struct net_device *); u16 (*ndo_select_queue)(struct net_device *, struct sk_buff *, void *, u16 (*)(struct net_device *, struct sk_buff *)); void (*ndo_change_rx_flags)(struct net_device *, int); void (*ndo_set_rx_mode)(struct net_device *); int (*ndo_set_mac_address)(struct net_device *, void *); int (*ndo_validate_addr)(struct net_device *); int (*ndo_do_ioctl)(struct net_device *, struct ifreq *, int); int (*ndo_set_config)(struct net_device *, struct ifmap *); int (*ndo_change_mtu)(struct net_device *, int); int (*ndo_neigh_setup)(struct net_device *, struct neigh_parms *); void (*ndo_tx_timeout)(struct net_device *); struct rtnl_link_stats64 * (*ndo_get_stats64)(struct net_device *, struct rtnl_link_stats64 *); struct net_device_stats * (*ndo_get_stats)(struct net_device *); int (*ndo_vlan_rx_add_vid)(struct net_device *, __be16 , u16 ); int (*ndo_vlan_rx_kill_vid)(struct net_device *, __be16 , u16 ); void (*ndo_poll_controller)(struct net_device *); int (*ndo_netpoll_setup)(struct net_device *, struct netpoll_info *, gfp_t ); void (*ndo_netpoll_cleanup)(struct net_device *); int (*ndo_busy_poll)(struct napi_struct *); int (*ndo_set_vf_mac)(struct net_device *, int, u8 *); int (*ndo_set_vf_vlan)(struct net_device *, int, u16 , u8 ); int (*ndo_set_vf_tx_rate)(struct net_device *, int, int); int (*ndo_set_vf_spoofchk)(struct net_device *, int, bool ); int (*ndo_get_vf_config)(struct net_device *, int, struct ifla_vf_info *); int (*ndo_set_vf_link_state)(struct net_device *, int, int); int (*ndo_set_vf_port)(struct net_device *, int, struct nlattr **); int (*ndo_get_vf_port)(struct net_device *, int, struct sk_buff *); int (*ndo_setup_tc)(struct net_device *, u8 ); int (*ndo_fcoe_enable)(struct net_device *); int (*ndo_fcoe_disable)(struct net_device *); int (*ndo_fcoe_ddp_setup)(struct net_device *, u16 , struct scatterlist *, unsigned int); int (*ndo_fcoe_ddp_done)(struct net_device *, u16 ); int (*ndo_fcoe_ddp_target)(struct net_device *, u16 , struct scatterlist *, unsigned int); int (*ndo_fcoe_get_hbainfo)(struct net_device *, struct netdev_fcoe_hbainfo *); int (*ndo_fcoe_get_wwn)(struct net_device *, u64 *, int); int (*ndo_rx_flow_steer)(struct net_device *, const struct sk_buff *, u16 , u32 ); int (*ndo_add_slave)(struct net_device *, struct net_device *); int (*ndo_del_slave)(struct net_device *, struct net_device *); netdev_features_t (*ndo_fix_features)(struct net_device *, netdev_features_t ); int (*ndo_set_features)(struct net_device *, netdev_features_t ); int (*ndo_neigh_construct)(struct neighbour *); void (*ndo_neigh_destroy)(struct neighbour *); int (*ndo_fdb_add)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, u16 ); int (*ndo_fdb_del)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *); int (*ndo_fdb_dump)(struct sk_buff *, struct netlink_callback *, struct net_device *, int); int (*ndo_bridge_setlink)(struct net_device *, struct nlmsghdr *); int (*ndo_bridge_getlink)(struct sk_buff *, u32 , u32 , struct net_device *, u32 ); int (*ndo_bridge_dellink)(struct net_device *, struct nlmsghdr *); int (*ndo_change_carrier)(struct net_device *, bool ); int (*ndo_get_phys_port_id)(struct net_device *, struct netdev_phys_port_id *); void (*ndo_add_vxlan_port)(struct net_device *, sa_family_t , __be16 ); void (*ndo_del_vxlan_port)(struct net_device *, sa_family_t , __be16 ); void * (*ndo_dfwd_add_station)(struct net_device *, struct net_device *); void (*ndo_dfwd_del_station)(struct net_device *, void *); netdev_tx_t (*ndo_dfwd_start_xmit)(struct sk_buff *, struct net_device *, void *); } ;
1161 struct __anonstruct_adj_list_262 { struct list_head upper; struct list_head lower; } ;
1161 struct __anonstruct_all_adj_list_263 { struct list_head upper; struct list_head lower; } ;
1161 struct iw_handler_def ;
1161 struct iw_public_data ;
1161 struct forwarding_accel_ops ;
1161 struct vlan_info ;
1161 struct tipc_bearer ;
1161 struct in_device ;
1161 struct dn_dev ;
1161 struct inet6_dev ;
1161 struct cpu_rmap ;
1161 struct pcpu_lstats ;
1161 struct pcpu_sw_netstats ;
1161 struct pcpu_dstats ;
1161 struct pcpu_vstats ;
1161 union __anonunion____missing_field_name_264 { void *ml_priv; struct pcpu_lstats *lstats; struct pcpu_sw_netstats *tstats; struct pcpu_dstats *dstats; struct pcpu_vstats *vstats; } ;
1161 struct garp_port ;
1161 struct mrp_port ;
1161 struct rtnl_link_ops ;
1161 struct net_device { char name[16U]; struct hlist_node name_hlist; char *ifalias; unsigned long mem_end; unsigned long mem_start; unsigned long base_addr; int irq; unsigned long state; struct list_head dev_list; struct list_head napi_list; struct list_head unreg_list; struct list_head close_list; struct __anonstruct_adj_list_262 adj_list; struct __anonstruct_all_adj_list_263 all_adj_list; netdev_features_t features; netdev_features_t hw_features; netdev_features_t wanted_features; netdev_features_t vlan_features; netdev_features_t hw_enc_features; netdev_features_t mpls_features; int ifindex; int iflink; struct net_device_stats stats; atomic_long_t rx_dropped; const struct iw_handler_def *wireless_handlers; struct iw_public_data *wireless_data; const struct net_device_ops *netdev_ops; const struct ethtool_ops *ethtool_ops; const struct forwarding_accel_ops *fwd_ops; const struct header_ops *header_ops; unsigned int flags; unsigned int priv_flags; unsigned short gflags; unsigned short padded; unsigned char operstate; unsigned char link_mode; unsigned char if_port; unsigned char dma; unsigned int mtu; unsigned short type; unsigned short hard_header_len; unsigned short needed_headroom; unsigned short needed_tailroom; unsigned char perm_addr[32U]; unsigned char addr_assign_type; unsigned char addr_len; unsigned short neigh_priv_len; unsigned short dev_id; spinlock_t addr_list_lock; struct netdev_hw_addr_list uc; struct netdev_hw_addr_list mc; struct netdev_hw_addr_list dev_addrs; struct kset *queues_kset; bool uc_promisc; unsigned int promiscuity; unsigned int allmulti; struct vlan_info *vlan_info; struct dsa_switch_tree *dsa_ptr; struct tipc_bearer *tipc_ptr; void *atalk_ptr; struct in_device *ip_ptr; struct dn_dev *dn_ptr; struct inet6_dev *ip6_ptr; void *ax25_ptr; struct wireless_dev *ieee80211_ptr; unsigned long last_rx; unsigned char *dev_addr; struct netdev_rx_queue *_rx; unsigned int num_rx_queues; unsigned int real_num_rx_queues; rx_handler_func_t *rx_handler; void *rx_handler_data; struct netdev_queue *ingress_queue; unsigned char broadcast[32U]; struct netdev_queue *_tx; unsigned int num_tx_queues; unsigned int real_num_tx_queues; struct Qdisc *qdisc; unsigned long tx_queue_len; spinlock_t tx_global_lock; struct xps_dev_maps *xps_maps; struct cpu_rmap *rx_cpu_rmap; unsigned long trans_start; int watchdog_timeo; struct timer_list watchdog_timer; int *pcpu_refcnt; struct list_head todo_list; struct hlist_node index_hlist; struct list_head link_watch_list; unsigned char reg_state; bool dismantle; unsigned short rtnl_link_state; void (*destructor)(struct net_device *); struct netpoll_info *npinfo; struct net *nd_net; union __anonunion____missing_field_name_264 __annonCompField84; struct garp_port *garp_port; struct mrp_port *mrp_port; struct device dev; const struct attribute_group *sysfs_groups[4U]; const struct attribute_group *sysfs_rx_queue_group; const struct rtnl_link_ops *rtnl_link_ops; unsigned int gso_max_size; u16 gso_max_segs; const struct dcbnl_rtnl_ops *dcbnl_ops; u8 num_tc; struct netdev_tc_txq tc_to_txq[16U]; u8 prio_tc_map[16U]; unsigned int fcoe_ddp_xid; struct netprio_map *priomap; struct phy_device *phydev; struct lock_class_key *qdisc_tx_busylock; int group; struct pm_qos_request pm_qos_req; } ;
1722 struct pcpu_sw_netstats { u64 rx_packets; u64 rx_bytes; u64 tx_packets; u64 tx_bytes; struct u64_stats_sync syncp; } ;
479 struct blk_iopoll ;
5 typedef int blk_iopoll_fn(struct blk_iopoll *, int);
6 struct blk_iopoll { struct list_head list; unsigned long state; unsigned long data; int weight; int max; blk_iopoll_fn *poll; } ;
47 struct be_dma_mem { void *va; dma_addr_t dma; u32 size; } ;
37 struct be_queue_info { struct be_dma_mem dma_mem; u16 len; u16 entry_size; u16 id; u16 tail; u16 head; bool created; atomic_t used; } ;
83 struct beiscsi_hba ;
83 struct be_eq_obj { bool todo_mcc_cq; bool todo_cq; struct be_queue_info q; struct beiscsi_hba *phba; struct be_queue_info *cq; struct work_struct work_cqs; struct blk_iopoll iopoll; } ;
95 struct be_mcc_obj { struct be_queue_info q; struct be_queue_info cq; } ;
100 struct be_ctrl_info { u8 *csr; u8 *db; u8 *pcicfg; struct pci_dev *pdev; spinlock_t mbox_lock; struct be_dma_mem mbox_mem; struct be_dma_mem mbox_mem_alloced; struct be_mcc_obj mcc_obj; spinlock_t mcc_lock; spinlock_t mcc_cq_lock; wait_queue_head_t mcc_wait[17U]; unsigned int mcc_tag[16U]; unsigned int mcc_numtag[17U]; unsigned short mcc_alloc_index; unsigned short mcc_free_index; unsigned int mcc_tag_available; } ;
126 struct be_sge { u32 pa_lo; u32 pa_hi; u32 len; } ;
33 union __anonunion_payload_269 { u8 embedded_payload[236U]; struct be_sge sgl[19U]; } ;
33 struct be_mcc_wrb { u32 embedded; u32 payload_length; u32 tag0; u32 tag1; u32 rsvd; union __anonunion_payload_269 payload; } ;
151 struct be_cmd_req_hdr { u8 opcode; u8 subsystem; u8 port_number; u8 domain; u32 timeout; u32 request_length; u8 version; u8 rsvd0[3U]; } ;
210 struct be_cmd_resp_hdr { u32 info; u32 status; u32 response_length; u32 actual_resp_len; } ;
273 struct mgmt_chap_format { u32 flags; u8 intr_chap_name[256U]; u8 intr_secret[16U]; u8 target_chap_name[256U]; u8 target_secret[16U]; u16 intr_chap_name_length; u16 intr_secret_length; u16 target_chap_name_length; u16 target_secret_length; } ;
285 struct mgmt_auth_method_format { u8 auth_method_type; u8 padding[3U]; struct mgmt_chap_format chap; } ;
291 struct mgmt_conn_login_options { u8 flags; u8 header_digest; u8 data_digest; u8 rsvd0; u32 max_recv_datasegment_len_ini; u32 max_recv_datasegment_len_tgt; u32 tcp_mss; u32 tcp_window_size; struct mgmt_auth_method_format auth_data; } ;
303 struct ip_addr_format { u16 size_of_structure; u8 reserved; u8 ip_type; u8 addr[16U]; u32 rsvd0; } ;
311 struct mgmt_conn_info { u32 connection_handle; u32 connection_status; u16 src_port; u16 dest_port; u16 dest_port_redirected; u16 cid; u32 estimated_throughput; struct ip_addr_format src_ipaddr; struct ip_addr_format dest_ipaddr; struct ip_addr_format dest_ipaddr_redirected; struct mgmt_conn_login_options negotiated_login_options; } ;
325 struct mgmt_session_login_options { u8 flags; u8 error_recovery_level; u16 rsvd0; u32 first_burst_length; u32 max_burst_length; u16 max_connections; u16 max_outstanding_r2t; u16 default_time2wait; u16 default_time2retain; } ;
337 struct mgmt_session_info { u32 session_handle; u32 status; u8 isid[6U]; u16 tsih; u32 session_flags; u16 conn_count; u16 pad; u8 target_name[224U]; u8 initiator_iscsiname[224U]; struct mgmt_session_login_options negotiated_login_options; struct mgmt_conn_info conn_list[1U]; } ;
405 struct be_ip_addr_subnet_format { u16 size_of_structure; u8 ip_type; u8 ipv6_prefix_length; u8 addr[16U]; u8 subnet_mask[16U]; u32 rsvd0; } ;
420 struct be_cmd_get_if_info_resp { struct be_cmd_req_hdr hdr; u32 interface_hndl; u32 vlan_priority; u32 ip_addr_count; u32 dhcp_state; struct be_ip_addr_subnet_format ip_addr; } ;
472 struct be_cmd_get_def_gateway_resp { struct be_cmd_req_hdr hdr; struct ip_addr_format ip_addr; } ;
643 struct be_cmd_get_nic_conf_resp { struct be_cmd_resp_hdr hdr; u32 nic_port_count; u32 speed; u32 max_speed; u32 link_state; u32 max_frame_size; u16 size_of_structure; u8 mac_address[6U]; u32 rsvd[23U]; } ;
655 struct be_cmd_hba_name { struct be_cmd_req_hdr hdr; u16 flags; u16 rsvd0; u8 initiator_name[224U]; u8 initiator_alias[32U]; } ;
670 struct be_cmd_ntwk_link_status_resp { struct be_cmd_resp_hdr hdr; u8 phys_port; u8 mac_duplex; u8 mac_speed; u8 mac_fault; u8 mgmt_mac_duplex; u8 mgmt_mac_speed; u16 qos_link_speed; u32 logical_link_speed; } ;
1006 struct tcp_connect_and_offload_out { struct be_cmd_resp_hdr hdr; u32 connection_handle; u16 cid; u16 rsvd0; } ;
180 struct hwi_controller ;
180 struct beiscsi_conn ;
180 struct iscsi_boot_kset ;
180 struct __anonstruct_fw_config_271 { unsigned int phys_port; unsigned int eqid_count; unsigned int cqid_count; unsigned int iscsi_cid_start[2U]; unsigned int iscsi_cid_count[2U]; unsigned int iscsi_icd_count[2U]; unsigned int iscsi_icd_start[2U]; unsigned int iscsi_chain_start[2U]; unsigned int iscsi_chain_count[2U]; unsigned short iscsi_features; uint16_t dual_ulp_aware; unsigned long ulp_supported; } ;
180 struct beiscsi_hba { struct hba_parameters params; struct hwi_controller *phwi_ctrlr; unsigned int mem_req[22U]; u8 *csr_va; u8 *db_va; u8 *pci_va; struct be_bus_address csr_pa; struct be_bus_address db_pa; struct be_bus_address pci_pa; struct pci_dev *pcidev; unsigned short asic_revision; unsigned int num_cpus; unsigned int nxt_cqid; struct msix_entry msix_entries[64U]; char *msi_name[64U]; bool msix_enabled; struct be_mem_descriptor *init_mem; unsigned short io_sgl_alloc_index; unsigned short io_sgl_free_index; unsigned short io_sgl_hndl_avbl; struct sgl_handle **io_sgl_hndl_base; struct sgl_handle **sgl_hndl_array; unsigned short eh_sgl_alloc_index; unsigned short eh_sgl_free_index; unsigned short eh_sgl_hndl_avbl; struct sgl_handle **eh_sgl_hndl_base; spinlock_t io_sgl_lock; spinlock_t mgmt_sgl_lock; spinlock_t isr_lock; spinlock_t async_pdu_lock; unsigned int age; struct list_head hba_queue; unsigned short cid_to_cri_map[2048U]; struct ulp_cid_info *cid_array_info[2U]; struct iscsi_endpoint **ep_array; struct beiscsi_conn **conn_table; struct iscsi_boot_kset *boot_kset; struct Scsi_Host *shost; struct iscsi_iface *ipv4_iface; struct iscsi_iface *ipv6_iface; struct __anonstruct_fw_config_271 fw_config; unsigned int state; bool fw_timeout; bool ue_detected; struct delayed_work beiscsi_hw_check_task; bool mac_addr_set; u8 mac_address[6U]; char fw_ver_str[32U]; char wq_name[20U]; struct workqueue_struct *wq; struct be_ctrl_info ctrl; unsigned int generation; unsigned int interface_handle; struct mgmt_session_info boot_sess; struct invalidate_command_table inv_tbl[128U]; unsigned int attr_log_enable; int (*iotask_fn)(struct iscsi_task *, struct scatterlist *, uint32_t , uint32_t , uint32_t ); } ;
419 struct beiscsi_session { struct dma_pool *bhs_pool; } ;
426 struct beiscsi_endpoint ;
426 struct beiscsi_conn { struct iscsi_conn *conn; struct beiscsi_hba *phba; u32 exp_statsn; u32 doorbell_offset; u32 beiscsi_conn_cid; struct beiscsi_endpoint *ep; unsigned short login_in_progress; struct wrb_handle *plogin_wrb_handle; struct sgl_handle *plogin_sgl_handle; struct beiscsi_session *beiscsi_sess; struct iscsi_task *task; } ;
443 struct pdu_data_out { u32 dw[12U]; } ;
471 struct be_cmd_bhs { struct iscsi_scsi_req iscsi_hdr; unsigned char pad1[16U]; struct pdu_data_out iscsi_data_pdu; unsigned char pad2[210U]; } ;
478 struct beiscsi_io_task { struct wrb_handle *pwrb_handle; struct sgl_handle *psgl_handle; struct beiscsi_conn *conn; struct scsi_cmnd *scsi_cmnd; unsigned int cmd_sn; unsigned int flags; unsigned short cid; unsigned short header_len; itt_t libiscsi_itt; struct be_cmd_bhs *cmd_bhs; struct be_bus_address bhs_pa; unsigned short bhs_len; dma_addr_t mtask_addr; uint32_t mtask_data_count; uint8_t wrb_type; } ;
515 struct iscsi_sge { u32 dw[4U]; } ;
533 struct beiscsi_offload_params { u32 dw[6U]; } ;
567 struct async_pdu_handle { struct list_head link; struct be_bus_address pa; void *pbuffer; unsigned int consumed; unsigned char index; unsigned char is_header; unsigned short cri; unsigned long buffer_len; } ;
581 struct __anonstruct_wait_queue_272 { unsigned char hdr_received; unsigned char hdr_len; unsigned short bytes_received; unsigned int bytes_needed; struct list_head list; } ;
581 struct hwi_async_entry { struct __anonstruct_wait_queue_272 wait_queue; struct list_head header_busy_list; struct list_head data_busy_list; } ;
594 struct __anonstruct_async_header_273 { struct be_bus_address pa_base; void *va_base; void *ring_base; struct async_pdu_handle *handle_base; unsigned int host_write_ptr; unsigned int ep_read_ptr; unsigned int writables; unsigned int free_entries; unsigned int busy_entries; struct list_head free_list; } ;
594 struct __anonstruct_async_data_274 { struct be_bus_address pa_base; void *va_base; void *ring_base; struct async_pdu_handle *handle_base; unsigned int host_write_ptr; unsigned int ep_read_ptr; unsigned int writables; unsigned int free_entries; unsigned int busy_entries; struct list_head free_list; } ;
594 struct hwi_async_pdu_context { struct __anonstruct_async_header_273 async_header; struct __anonstruct_async_data_274 async_data; unsigned int buffer_size; unsigned int num_entries; unsigned short cid_to_async_cri_map[2048U]; struct hwi_async_entry *async_entry; } ;
719 struct iscsi_wrb { u32 dw[16U]; } ;
975 struct be_ring { u32 pages; u32 id; u32 num; u32 cidx; u32 pidx; u32 item_size; u8 ulp_num; u16 register_set; u16 doorbell_format; u32 doorbell_offset; void *va; } ;
991 struct mcc_wrb ;
991 struct hwi_context_memory ;
991 struct hwi_controller { struct list_head io_sgl_list; struct list_head eh_sgl_list; struct sgl_handle *psgl_handle_base; unsigned int wrb_mem_index; struct hwi_wrb_context *wrb_context; struct mcc_wrb *pmcc_wrb_base; struct be_ring default_pdu_hdr[2U]; struct be_ring default_pdu_data[2U]; struct hwi_context_memory *phwi_ctxt; } ;
1007 enum hwh_type_enum { HWH_TYPE_IO = 1, HWH_TYPE_LOGOUT = 2, HWH_TYPE_TMF = 3, HWH_TYPE_NOP = 4, HWH_TYPE_IO_RD = 5, HWH_TYPE_LOGIN = 11, HWH_TYPE_INVALID = 4294967295 } ;
1017 struct wrb_handle { enum hwh_type_enum type; unsigned short wrb_index; unsigned short nxt_wrb_index; struct iscsi_task *pio_handle; struct iscsi_wrb *pwrb; } ;
1026 struct hwi_context_memory { u16 min_eqd; u16 max_eqd; u16 cur_eqd; struct be_eq_obj be_eq[64U]; struct be_queue_info be_cq[63U]; struct be_queue_info *be_wrbq; struct be_queue_info be_def_hdrq[2U]; struct be_queue_info be_def_dataq[2U]; struct hwi_async_pdu_context *pasync_ctx[2U]; } ;
75 struct mcc_sge { u32 pa_lo; u32 pa_hi; u32 length; } ;
81 union __anonunion_u_278 { struct mcc_sge sgl[19U]; u32 embedded[59U]; } ;
81 struct mcc_wrb_payload { union __anonunion_u_278 u; } ;
88 struct mcc_wrb { u32 dw[0U]; u32 payload_length; u32 tag[2U]; u32 rsvd2[1U]; struct mcc_wrb_payload payload; } ;
230 struct beiscsi_sess ;
230 struct beiscsi_endpoint { struct beiscsi_hba *phba; struct beiscsi_sess *sess; struct beiscsi_conn *conn; struct iscsi_endpoint *openiscsi_ep; unsigned short ip_type; char dst6_addr[64U]; unsigned long dst_addr; unsigned short ep_cid; unsigned int fw_handle; u16 dst_tcpport; u16 cid_vld; } ;
12 struct __wait_queue ;
12 typedef struct __wait_queue wait_queue_t;
15 struct __wait_queue { unsigned int flags; void *private; int (*func)(wait_queue_t *, unsigned int, int, void *); struct list_head task_list; } ;
663 enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED = 1, IRQ_WAKE_THREAD = 2 } ;
16 typedef enum irqreturn irqreturn_t;
1852 struct iscsi_boot_kobj { struct kobject kobj; struct attribute_group *attr_group; struct list_head list; void *data; ssize_t (*show)(void *, int, char *); umode_t (*is_visible)(void *, int); void (*release)(void *); } ;
103 struct iscsi_boot_kset { struct list_head kobj_list; struct kset *kset; } ;
651 struct bsg_buffer { unsigned int payload_len; int sg_cnt; struct scatterlist *sg_list; } ;
38 struct bsg_job { struct device *dev; struct request *req; void *request; void *reply; unsigned int request_len; unsigned int reply_len; struct bsg_buffer request_payload; struct bsg_buffer reply_payload; void *dd_data; } ;
266 struct iscsi_nopin { uint8_t opcode; uint8_t flags; __be16 rsvd2; uint8_t rsvd3; uint8_t dlength[3U]; struct scsi_lun lun; itt_t itt; __be32 ttt; __be32 statsn; __be32 exp_cmdsn; __be32 max_cmdsn; uint8_t rsvd4[12U]; } ;
299 struct iscsi_tm_rsp { uint8_t opcode; uint8_t flags; uint8_t response; uint8_t qualifier; uint8_t hlength; uint8_t dlength[3U]; uint8_t rsvd2[8U]; itt_t itt; itt_t rtt; __be32 statsn; __be32 exp_cmdsn; __be32 max_cmdsn; uint8_t rsvd3[12U]; } ;
547 struct iscsi_logout_rsp { uint8_t opcode; uint8_t flags; uint8_t response; uint8_t rsvd2; uint8_t hlength; uint8_t dlength[3U]; uint8_t rsvd3[8U]; itt_t itt; __be32 rsvd4; __be32 statsn; __be32 exp_cmdsn; __be32 max_cmdsn; __be32 rsvd5; __be16 t2wait; __be16 t2retain; __be32 rsvd6; } ;
465 enum iscsi_err { ISCSI_OK = 0, ISCSI_ERR_DATASN = 1001, ISCSI_ERR_DATA_OFFSET = 1002, ISCSI_ERR_MAX_CMDSN = 1003, ISCSI_ERR_EXP_CMDSN = 1004, ISCSI_ERR_BAD_OPCODE = 1005, ISCSI_ERR_DATALEN = 1006, ISCSI_ERR_AHSLEN = 1007, ISCSI_ERR_PROTO = 1008, ISCSI_ERR_LUN = 1009, ISCSI_ERR_BAD_ITT = 1010, ISCSI_ERR_CONN_FAILED = 1011, ISCSI_ERR_R2TSN = 1012, ISCSI_ERR_SESSION_FAILED = 1013, ISCSI_ERR_HDR_DGST = 1014, ISCSI_ERR_DATA_DGST = 1015, ISCSI_ERR_PARAM_NOT_FOUND = 1016, ISCSI_ERR_NO_SCSI_CMD = 1017, ISCSI_ERR_INVALID_HOST = 1018, ISCSI_ERR_XMIT_FAILED = 1019, ISCSI_ERR_TCP_CONN_CLOSE = 1020, ISCSI_ERR_SCSI_EH_SESSION_RST = 1021 } ;
485 struct iscsi_bsg_host_vendor { uint64_t vendor_id; uint32_t vendor_cmd[0U]; } ;
71 struct iscsi_bsg_host_vendor_reply { uint32_t vendor_rsp[0U]; } ;
78 union __anonunion_rqst_data_216 { struct iscsi_bsg_host_vendor h_vendor; } ;
78 struct iscsi_bsg_request { uint32_t msgcode; union __anonunion_rqst_data_216 rqst_data; } ;
87 union __anonunion_reply_data_217 { struct iscsi_bsg_host_vendor_reply vendor_reply; } ;
87 struct iscsi_bsg_reply { uint32_t result; uint32_t reply_payload_rcv_len; union __anonunion_reply_data_217 reply_data; } ;
48 struct be_mcc_compl { u32 status; u32 tag0; u32 tag1; u32 flags; } ;
82 struct be_async_event_trailer { u32 code; } ;
129 struct be_async_event_link_state { u8 physical_port; u8 port_link_status; u8 port_duplex; u8 port_speed; u8 port_fault; u8 rsvd0[7U]; struct be_async_event_trailer trailer; } ;
217 struct phys_addr { u32 lo; u32 hi; } ;
356 struct be_cmd_get_session_resp { struct be_cmd_resp_hdr hdr; struct mgmt_session_info session_info; } ;
854 struct sol_cqe { u32 dw[4U]; } ;
918 struct common_sol_cqe { u32 exp_cmdsn; u32 res_cnt; u16 wrb_index; u16 cid; u8 hw_sts; u8 cmd_wnd; u8 res_flag; u8 i_resp; u8 i_flags; u8 i_sts; } ;
1019 struct dmsg_cqe { u32 dw[4U]; } ;
504 struct be_status_bhs { struct iscsi_scsi_req iscsi_hdr; unsigned char pad1[16U]; unsigned char sense_info[258U]; } ;
637 struct i_t_dpdu_cqe { u32 dw[4U]; } ;
676 struct be_eq_entry { u32 dw[1U]; } ;
828 struct pdu_nop_out { u32 dw[12U]; } ;
854 struct pdu_base { u32 dw[16U]; } ;
210 struct sockaddr_in { __kernel_sa_family_t sin_family; __be16 sin_port; struct in_addr sin_addr; unsigned char __pad[8U]; } ;
41 struct sockaddr_in6 { unsigned short sin6_family; __be16 sin6_port; __be32 sin6_flowinfo; struct in6_addr sin6_addr; __u32 sin6_scope_id; } ;
351 struct be_cmd_get_session_req { struct be_cmd_req_hdr hdr; u32 session_handle; } ;
366 struct be_cmd_get_boot_target_req { struct be_cmd_req_hdr hdr; } ;
370 struct be_cmd_get_boot_target_resp { struct be_cmd_resp_hdr hdr; u32 boot_session_count; int boot_session_handle; } ;
376 struct be_cmd_reopen_session_req { struct be_cmd_req_hdr hdr; u16 reopen_type; u16 rsvd; u32 session_handle; } ;
414 struct be_cmd_get_if_info_req { struct be_cmd_req_hdr hdr; u32 interface_hndl; u32 ip_type; } ;
429 struct be_ip_addr_record { u32 action; u32 interface_hndl; struct be_ip_addr_subnet_format ip_addr; u32 status; } ;
436 struct be_ip_addr_record_params { u32 record_entry_count; struct be_ip_addr_record ip_record; } ;
441 struct be_cmd_set_ip_addr_req { struct be_cmd_req_hdr hdr; struct be_ip_addr_record_params ip_params; } ;
446 struct be_cmd_set_dhcp_req { struct be_cmd_req_hdr hdr; u32 interface_hndl; u32 ip_type; u32 flags; u32 retry_count; } ;
455 struct be_cmd_rel_dhcp_req { struct be_cmd_req_hdr hdr; u32 interface_hndl; u32 ip_type; } ;
461 struct be_cmd_set_def_gateway_req { struct be_cmd_req_hdr hdr; u32 action; struct ip_addr_format ip_addr; } ;
467 struct be_cmd_get_def_gateway_req { struct be_cmd_req_hdr hdr; u32 ip_type; } ;
665 struct be_cmd_ntwk_link_status_req { struct be_cmd_req_hdr hdr; u32 rsvd0; } ;
972 struct iscsi_cleanup_req { struct be_cmd_req_hdr hdr; u16 chute; u8 hdr_ring_id; u8 data_ring_id; } ;
992 struct tcp_connect_and_offload_in { struct be_cmd_req_hdr hdr; struct ip_addr_format ip_address; u16 tcp_port; u16 cid; u16 cq_id; u16 defq_id; struct phys_addr dataout_template_pa; u16 hdr_ring_id; u16 data_ring_id; u8 do_offload; u8 rsvd0[3U]; } ;
1029 struct tcp_upload_params_in { struct be_cmd_req_hdr hdr; u16 id; u16 upload_type; u32 reset_seq; } ;
1045 struct be_ulp_fw_cfg { u32 ulp_mode; u32 etx_base; u32 etx_count; u32 sq_base; u32 sq_count; u32 rq_base; u32 rq_count; u32 dq_base; u32 dq_count; u32 lro_base; u32 lro_count; u32 icd_base; u32 icd_count; } ;
1062 struct be_ulp_chain_icd { u32 chain_base; u32 chain_count; } ;
1067 struct be_fw_cfg { struct be_cmd_req_hdr hdr; u32 be_config_number; u32 asic_revision; u32 phys_port; u32 function_mode; struct be_ulp_fw_cfg ulp[2U]; u32 function_caps; u32 cqid_base; u32 cqid_count; u32 eqid_base; u32 eqid_count; struct be_ulp_chain_icd chain_icd[2U]; } ;
1084 struct be_cmd_get_all_if_id_req { struct be_cmd_req_hdr hdr; u32 if_count; u32 if_hndl_list[1U]; } ;
113 struct iscsi_invalidate_connection_params_in { struct be_cmd_req_hdr hdr; unsigned int session_handle; unsigned short cid; unsigned short unused; unsigned short cleanup_type; unsigned short save_cfg; } ;
137 struct invalidate_commands_params_in { struct be_cmd_req_hdr hdr; unsigned int ref_handle; unsigned int icd_count; struct invalidate_command_table table[128U]; unsigned short cleanup_type; unsigned short unused; } ;
157 struct mgmt_hba_attributes { u8 flashrom_version_string[32U]; u8 manufacturer_name[32U]; u32 supported_modes; u8 seeprom_version_lo; u8 seeprom_version_hi; u8 rsvd0[2U]; u32 fw_cmd_data_struct_version; u32 ep_fw_data_struct_version; u8 ncsi_version_string[12U]; u32 default_extended_timeout; u8 controller_model_number[32U]; u8 controller_description[64U]; u8 controller_serial_number[32U]; u8 ip_version_string[32U]; u8 firmware_version_string[32U]; u8 bios_version_string[32U]; u8 redboot_version_string[32U]; u8 driver_version_string[32U]; u8 fw_on_flash_version_string[32U]; u32 functionalities_supported; u16 max_cdblength; u8 asic_revision; u8 generational_guid[16U]; u8 hba_port_count; u16 default_link_down_timeout; u8 iscsi_ver_min_max; u8 multifunction_device; u8 cache_valid; u8 hba_status; u8 max_domains_supported; u8 phy_port; u32 firmware_post_status; u32 hba_mtu[8U]; u8 iscsi_features; u8 asic_generation; u8 future_u8[2U]; u32 future_u32[3U]; } ;
197 struct mgmt_controller_attributes { struct mgmt_hba_attributes hba_attribs; u16 pci_vendor_id; u16 pci_device_id; u16 pci_sub_vendor_id; u16 pci_sub_system_id; u8 pci_bus_number; u8 pci_device_number; u8 pci_function_number; u8 interface_type; u64 unique_identifier; u8 netfilters; u8 rsvd0[3U]; u32 future_u32[4U]; } ;
213 struct be_mgmt_controller_attributes { struct be_cmd_req_hdr hdr; struct mgmt_controller_attributes params; } ;
218 struct be_mgmt_controller_attributes_resp { struct be_cmd_resp_hdr hdr; struct mgmt_controller_attributes params; } ;
223 struct be_bsg_vendor_cmd { struct be_cmd_req_hdr hdr; unsigned short region; unsigned short offset; unsigned short sector; } ;
146 struct be_mcc_mailbox { struct be_mcc_wrb wrb; struct be_mcc_compl compl; } ;
222 struct virt_addr { u32 lo; u32 hi; } ;
259 struct be_cmd_req_eq_create { struct be_cmd_req_hdr hdr; u16 num_pages; u16 rsvd0; u8 context[16U]; struct phys_addr pages[8U]; } ;
267 struct be_cmd_resp_eq_create { struct be_cmd_resp_hdr resp_hdr; u16 eq_id; u16 rsvd0; } ;
477 struct be_cmd_set_vlan_req { struct be_cmd_req_hdr hdr; u32 interface_hndl; u32 vlan_priority; } ;
528 struct be_cmd_req_cq_create { struct be_cmd_req_hdr hdr; u16 num_pages; u8 page_size; u8 rsvd0; u8 context[16U]; struct phys_addr pages[4U]; } ;
537 struct be_cmd_resp_cq_create { struct be_cmd_resp_hdr hdr; u16 cq_id; u16 rsvd0; } ;
563 struct be_cmd_req_mcc_create { struct be_cmd_req_hdr hdr; u16 num_pages; u16 rsvd0; u8 context[16U]; struct phys_addr pages[8U]; } ;
571 struct be_cmd_resp_mcc_create { struct be_cmd_resp_hdr hdr; u16 id; u16 rsvd0; } ;
586 struct be_cmd_req_q_destroy { struct be_cmd_req_hdr hdr; u16 id; u16 bypass_flush; } ;
755 struct be_default_pdu_context { u32 dw[4U]; } ;
789 struct be_defq_create_req { struct be_cmd_req_hdr hdr; u16 num_pages; u8 ulp_num; u8 dua_feature; struct be_default_pdu_context context; struct phys_addr pages[8U]; } ;
800 struct be_defq_create_resp { struct be_cmd_req_hdr hdr; u16 id; u8 rsvd0; u8 ulp_num; u32 doorbell_offset; u16 register_set; u16 doorbell_format; } ;
810 struct be_post_template_pages_req { struct be_cmd_req_hdr hdr; u16 num_pages; u16 type; struct phys_addr scratch_pa; struct virt_addr scratch_va; struct virt_addr pages_va; struct phys_addr pages[16U]; } ;
821 struct be_remove_template_pages_req { struct be_cmd_req_hdr hdr; u16 type; u16 rsvd0; } ;
827 struct be_post_sgl_pages_req { struct be_cmd_req_hdr hdr; u16 num_pages; u16 page_offset; u32 rsvd0; struct phys_addr pages[26U]; u32 rsvd1; } ;
836 struct be_wrbq_create_req { struct be_cmd_req_hdr hdr; u16 num_pages; u8 ulp_num; u8 dua_feature; struct phys_addr pages[8U]; } ;
844 struct be_wrbq_create_resp { struct be_cmd_resp_hdr resp_hdr; u16 cid; u8 rsvd0; u8 ulp_num; u32 doorbell_offset; u16 register_set; u16 doorbell_format; } ;
38 typedef int Set;
1 long int __builtin_expect(long, long);
1 void * __builtin_memcpy(void *, const void *, unsigned long);
358 extern struct pv_irq_ops pv_irq_ops;
316 int variable_test_bit(long nr, const volatile unsigned long *addr);
132 int printk(const char *, ...);
388 int sprintf(char *, const char *, ...);
71 void warn_slowpath_null(const char *, const int);
34 void * __memcpy(void *, const void *, size_t );
55 void * memset(void *, int, size_t );
62 char * strcpy(char *, const char *);
802 unsigned long int arch_local_save_flags();
22 void * ERR_PTR(long error);
155 int arch_irqs_disabled_flags(unsigned long flags);
1020 int dev_printk(const char *, const struct device *, const char *, ...);
442 struct iscsi_endpoint * iscsi_create_endpoint(int);
443 void iscsi_destroy_endpoint(struct iscsi_endpoint *);
444 struct iscsi_endpoint * iscsi_lookup_endpoint(u64 );
446 struct iscsi_iface * iscsi_create_iface(struct Scsi_Host *, struct iscsi_transport *, uint32_t , uint32_t , int);
450 void iscsi_destroy_iface(struct iscsi_iface *);
452 char * iscsi_get_port_speed_name(struct Scsi_Host *);
453 char * iscsi_get_port_state_name(struct Scsi_Host *);
387 int iscsi_host_get_param(struct Scsi_Host *, enum iscsi_host_param , char *);
401 struct iscsi_cls_session * iscsi_session_setup(struct iscsi_transport *, struct Scsi_Host *, uint16_t , int, int, uint32_t , unsigned int);
403 void iscsi_session_teardown(struct iscsi_cls_session *);
405 int iscsi_set_param(struct iscsi_cls_conn *, enum iscsi_param , char *, int);
416 struct iscsi_cls_conn * iscsi_conn_setup(struct iscsi_cls_session *, int, uint32_t );
419 int iscsi_conn_start(struct iscsi_cls_conn *);
421 int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, int);
431 void iscsi_suspend_queue(struct iscsi_conn *);
142 void kfree(const void *);
771 void * shost_priv(struct Scsi_Host *shost);
776 int scsi_is_host_device(const struct device *);
778 struct Scsi_Host * dev_to_shost(struct device *dev);
70 int is_device_dma_capable(struct device *dev);
53 void debug_dma_alloc_coherent(struct device *, size_t , dma_addr_t , void *);
56 void debug_dma_free_coherent(struct device *, size_t , void *, dma_addr_t );
27 extern struct device x86_dma_fallback_dev;
30 extern struct dma_map_ops *dma_ops;
32 struct dma_map_ops * get_dma_ops(struct device *dev);
107 unsigned long int dma_alloc_coherent_mask(struct device *dev, gfp_t gfp);
119 gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp);
135 void * dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs);
164 void dma_free_attrs(struct device *dev, size_t size, void *vaddr, dma_addr_t bus, struct dma_attrs *attrs);
238 struct nlattr * nla_find(const struct nlattr *, int, int);
668 void * nla_data(const struct nlattr *nla);
687 int nla_ok(const struct nlattr *nla, int remaining);
702 struct nlattr * nla_next(const struct nlattr *nla, int *remaining);
17 struct dma_pool * dma_pool_create(const char *, struct device *, size_t , size_t , size_t );
20 void dma_pool_destroy(struct dma_pool *);
16 void * pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle);
23 void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle);
33 ssize_t sysfs_format_mac(char *, const unsigned char *, int);
607 void * embedded_payload(struct be_mcc_wrb *wrb);
706 unsigned int be_cmd_get_initname(struct beiscsi_hba *phba);
707 unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba);
711 int beiscsi_mccq_compl(struct beiscsi_hba *phba, uint32_t tag, struct be_mcc_wrb **wrb, void *cmd_hdr);
143 u32 amap_mask(u32 bitsize);
148 void amap_set(void *ptr, u32 dw_offset, u32 mask, u32 offset, u32 value);
821 void beiscsi_free_mgmt_task_handles(struct beiscsi_conn *beiscsi_conn, struct iscsi_task *task);
824 bool beiscsi_error(struct beiscsi_hba *phba);
100 int mgmt_open_connection(struct beiscsi_hba *phba, struct sockaddr *dst_addr, struct beiscsi_endpoint *beiscsi_ep, struct be_dma_mem *nonemb_cmd);
105 unsigned int mgmt_upload_connection(struct beiscsi_hba *phba, unsigned short cid, unsigned int upload_flag);
272 unsigned int mgmt_invalidate_connection(struct beiscsi_hba *phba, struct beiscsi_endpoint *beiscsi_ep, unsigned short cid, unsigned short issue_reset, unsigned short savecfg_flag);
278 int mgmt_set_ip(struct beiscsi_hba *phba, struct iscsi_iface_param_info *ip_param, struct iscsi_iface_param_info *subnet_param, uint32_t boot_proto);
293 int mgmt_get_nic_conf(struct beiscsi_hba *phba, struct be_cmd_get_nic_conf_resp *nic);
296 int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type, struct be_cmd_get_if_info_resp **if_info);
299 int mgmt_get_gateway(struct beiscsi_hba *phba, int ip_type, struct be_cmd_get_def_gateway_resp *gateway);
302 int mgmt_set_gateway(struct beiscsi_hba *phba, struct iscsi_iface_param_info *gateway_param);
308 unsigned int mgmt_get_all_if_id(struct beiscsi_hba *phba);
310 int mgmt_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag);
33 void beiscsi_create_def_ifaces(struct beiscsi_hba *phba);
35 void beiscsi_destroy_def_ifaces(struct beiscsi_hba *phba);
37 int be2iscsi_iface_get_param(struct iscsi_iface *iface, enum iscsi_param_type param_type, int param, char *buf);
41 int be2iscsi_iface_set_param(struct Scsi_Host *shost, void *data, uint32_t dt_len);
44 umode_t be2iscsi_attr_is_visible(int param_type, int param);
46 void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, struct beiscsi_offload_params *params);
53 struct iscsi_cls_session * beiscsi_session_create(struct iscsi_endpoint *ep, unsigned short cmds_max, unsigned short qdepth, unsigned int initial_cmdsn);
58 void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
60 struct iscsi_cls_conn * beiscsi_conn_create(struct iscsi_cls_session *cls_session, unsigned int cid);
63 int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, struct iscsi_cls_conn *cls_conn, unsigned long long transport_fd, int is_leading);
67 int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param, char *buf);
70 int beiscsi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf);
73 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
75 int beiscsi_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param, char *buf, int buflen);
78 int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
80 struct iscsi_endpoint * beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, int non_blocking);
84 int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
86 void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
88 void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats);
32 struct iscsi_transport beiscsi_iscsi_transport;
166 int beiscsi_bindconn_cid(struct beiscsi_hba *phba, struct beiscsi_conn *beiscsi_conn, unsigned int cid);
240 int beiscsi_create_ipv4_iface(struct beiscsi_hba *phba);
259 int beiscsi_create_ipv6_iface(struct beiscsi_hba *phba);
302 int beiscsi_set_static_ip(struct Scsi_Host *shost, struct iscsi_iface_param_info *iface_param, void *data, uint32_t dt_len);
366 int beiscsi_set_vlan_tag(struct Scsi_Host *shost, struct iscsi_iface_param_info *iface_param);
399 int beiscsi_set_ipv4(struct Scsi_Host *shost, struct iscsi_iface_param_info *iface_param, void *data, uint32_t dt_len);
448 int beiscsi_set_ipv6(struct Scsi_Host *shost, struct iscsi_iface_param_info *iface_param, void *data, uint32_t dt_len);
533 int be2iscsi_get_if_param(struct beiscsi_hba *phba, struct iscsi_iface *iface, int param, char *buf);
718 int beiscsi_get_initname(char *buf, struct beiscsi_hba *phba);
751 void beiscsi_get_port_state(struct Scsi_Host *shost);
766 int beiscsi_get_port_speed(struct Scsi_Host *shost);
927 void beiscsi_set_params_for_offld(struct beiscsi_conn *beiscsi_conn, struct beiscsi_offload_params *params);
1008 int beiscsi_get_cid(struct beiscsi_hba *phba);
1043 void beiscsi_put_cid(struct beiscsi_hba *phba, unsigned short cid);
1067 void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep);
1101 int beiscsi_open_conn(struct iscsi_endpoint *ep, struct sockaddr *src_addr, struct sockaddr *dst_addr, int non_blocking);
1273 int beiscsi_close_conn(struct beiscsi_endpoint *beiscsi_ep, int flag);
1297 int beiscsi_unbind_conn_to_cid(struct beiscsi_hba *phba, unsigned int cid);
7 dma_addr_t ldv_dma_map_single_attrs(struct device *dev, void *ptr, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs);
33 extern struct module __this_module;
206 int test_and_set_bit(long nr, volatile unsigned long *addr);
310 int constant_test_bit(long nr, const volatile unsigned long *addr);
481 int fls64(__u64 x);
7 __u32 __arch_swab32(__u32 val);
46 __u16 __fswab16(__u16 val);
57 __u32 __fswab32(__u32 val);
171 unsigned int fls_long(unsigned long l);
61 unsigned long int __roundup_pow_of_two(unsigned long n);
70 unsigned long int __rounddown_pow_of_two(unsigned long n);
391 int snprintf(char *, size_t , const char *, ...);
403 int sscanf(const char *, const char *, ...);
24 void INIT_LIST_HEAD(struct list_head *list);
47 void __list_add(struct list_head *, struct list_head *, struct list_head *);
60 void list_add(struct list_head *new, struct list_head *head);
74 void list_add_tail(struct list_head *new, struct list_head *head);
111 void __list_del_entry(struct list_head *);
112 void list_del(struct list_head *);
153 void list_move(struct list_head *list, struct list_head *head);
186 int list_empty(const struct list_head *head);
61 size_t strlen(const char *);
113 int __bitmap_weight(const unsigned long *, int);
276 int bitmap_weight(const unsigned long *src, int nbits);
28 extern int nr_cpu_ids;
80 extern const const struct cpumask *cpu_online_mask;
459 unsigned int cpumask_weight(const struct cpumask *srcp);
802 unsigned long int arch_local_save_flags___0();
101 void atomic_dec(atomic_t *v);
279 void lockdep_init_map(struct lockdep_map *, const char *, struct lock_class_key *, int);
93 void __raw_spin_lock_init(raw_spinlock_t *, const char *, struct lock_class_key *);
22 void _raw_spin_lock(raw_spinlock_t *);
28 void _raw_spin_lock_bh(raw_spinlock_t *);
32 unsigned long int _raw_spin_lock_irqsave(raw_spinlock_t *);
39 void _raw_spin_unlock(raw_spinlock_t *);
40 void _raw_spin_unlock_bh(raw_spinlock_t *);
43 void _raw_spin_unlock_irqrestore(raw_spinlock_t *, unsigned long);
290 raw_spinlock_t * spinlock_check(spinlock_t *lock);
301 void spin_lock(spinlock_t *lock);
306 void spin_lock_bh(spinlock_t *lock);
341 void spin_unlock(spinlock_t *lock);
346 void spin_unlock_bh(spinlock_t *lock);
356 void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags);
68 void __init_waitqueue_head(wait_queue_head_t *, const char *, struct lock_class_key *);
822 long int prepare_to_wait_event(wait_queue_head_t *, wait_queue_t *, int);
823 void finish_wait(wait_queue_head_t *, wait_queue_t *);
303 unsigned long int msecs_to_jiffies(const unsigned int);
94 void init_timer_key(struct timer_list *, unsigned int, const char *, struct lock_class_key *);
20 void delayed_work_timer_fn(unsigned long);
192 void __init_work(struct work_struct *, int);
375 extern struct workqueue_struct *system_wq;
397 struct workqueue_struct * __alloc_workqueue_key(const char *, unsigned int, int, struct lock_class_key *, const char *, ...);
457 void destroy_workqueue(struct workqueue_struct *);
464 bool queue_work_on(int, struct workqueue_struct *, struct work_struct *);
466 bool queue_delayed_work_on(int, struct workqueue_struct *, struct delayed_work *, unsigned long);
484 bool cancel_delayed_work_sync(struct delayed_work *);
504 bool queue_work(struct workqueue_struct *wq, struct work_struct *work);
518 bool queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay);
591 bool schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
46 void msleep(unsigned int);
50 void ssleep(unsigned int seconds);
174 void * ioremap_nocache(resource_size_t , unsigned long);
187 void iounmap(volatile void *);
31 unsigned int ioread32(void *);
37 void iowrite32(u32 , void *);
302 void * __kmalloc(size_t , gfp_t );
441 void * kmalloc(size_t size, gfp_t flags);
560 void * kmalloc_array(size_t n, size_t size, gfp_t flags);
573 void * kcalloc(size_t n, size_t size, gfp_t flags);
638 void * kzalloc(size_t size, gfp_t flags);
11 void synchronize_irq(unsigned int);
123 int request_threaded_irq(unsigned int, irqreturn_t (*)(int, void *), irqreturn_t (*)(int, void *), unsigned long, const char *, void *);
128 int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *), unsigned long flags, const char *name, void *dev);
142 void free_irq(unsigned int, void *);
372 long int schedule_timeout(long);
913 void * dev_get_drvdata(const struct device *);
914 int dev_set_drvdata(struct device *, void *);
1029 int dev_err(const struct device *, const char *, ...);
958 void blk_queue_max_segment_size(struct request_queue *, unsigned int);
774 struct pci_dev * pci_dev_get(struct pci_dev *);
775 void pci_dev_put(struct pci_dev *);
902 int pci_enable_device(struct pci_dev *);
919 void pci_disable_device(struct pci_dev *);
922 void pci_set_master(struct pci_dev *);
975 int pci_save_state(struct pci_dev *);
976 void pci_restore_state(struct pci_dev *);
987 int pci_set_power_state(struct pci_dev *, pci_power_t );
1085 int __pci_register_driver(struct pci_driver *, struct module *, const char *);
1094 void pci_unregister_driver(struct pci_driver *);
22 void * dma_pool_alloc(struct dma_pool *, gfp_t , dma_addr_t *);
25 void dma_pool_free(struct dma_pool *, void *, dma_addr_t );
1165 int pci_enable_msix(struct pci_dev *, struct msix_entry *, int);
1167 void pci_disable_msix(struct pci_dev *);
224 struct scatterlist * sg_next(struct scatterlist *);
242 size_t sg_copy_from_buffer(struct scatterlist *, unsigned int, void *, size_t );
63 int valid_dma_direction(int dma_direction);
44 void debug_dma_unmap_page(struct device *, dma_addr_t , size_t , int, bool );
32 dma_addr_t ldv_dma_map_single_attrs_5(struct device *dev, void *ptr, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs);
33 void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs);
64 int dma_supported(struct device *, u64 );
164 void dma_free_attrs___0(struct device *dev, size_t size, void *vaddr, dma_addr_t bus, struct dma_attrs *attrs);
91 int dma_set_coherent_mask(struct device *dev, u64 mask);
23 void pci_free_consistent___0(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle);
30 dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction);
36 void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction);
110 int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
1407 void * pci_get_drvdata(struct pci_dev *pdev);
1412 void pci_set_drvdata(struct pci_dev *pdev, void *data);
110 struct iscsi_boot_kobj * iscsi_boot_create_initiator(struct iscsi_boot_kset *, int, void *, ssize_t (*)(void *, int, char *), umode_t (*)(void *, int), void (*)(void *));
117 struct iscsi_boot_kobj * iscsi_boot_create_ethernet(struct iscsi_boot_kset *, int, void *, ssize_t (*)(void *, int, char *), umode_t (*)(void *, int), void (*)(void *));
123 struct iscsi_boot_kobj * iscsi_boot_create_target(struct iscsi_boot_kset *, int, void *, ssize_t (*)(void *, int, char *), umode_t (*)(void *, int), void (*)(void *));
130 struct iscsi_boot_kset * iscsi_boot_create_host_kset(unsigned int);
131 void iscsi_boot_destroy_kset(struct iscsi_boot_kset *);
65 void bsg_job_done(struct bsg_job *, int, unsigned int);
175 struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *);
176 int iscsi_unregister_transport(struct iscsi_transport *);
370 int iscsi_change_queue_depth(struct scsi_device *, int, int);
372 int iscsi_eh_abort(struct scsi_cmnd *);
374 int iscsi_eh_session_reset(struct scsi_cmnd *);
375 int iscsi_eh_device_reset(struct scsi_cmnd *);
376 int iscsi_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
389 int iscsi_host_add(struct Scsi_Host *, struct device *);
390 struct Scsi_Host * iscsi_host_alloc(struct scsi_host_template *, int, bool );
393 void iscsi_host_remove(struct Scsi_Host *);
394 void iscsi_host_free(struct Scsi_Host *);
395 int iscsi_target_alloc(struct scsi_target *);
404 void iscsi_session_recovery_timedout(struct iscsi_cls_session *);
407 int iscsi_session_get_param(struct iscsi_cls_session *, enum iscsi_param , char *);
418 void iscsi_conn_teardown(struct iscsi_cls_conn *);
420 void iscsi_conn_stop(struct iscsi_cls_conn *, int);
423 void iscsi_conn_failure(struct iscsi_conn *, enum iscsi_err );
426 int iscsi_conn_get_param(struct iscsi_cls_conn *, enum iscsi_param , char *);
445 int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *, char *, uint32_t );
449 int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, char *, int);
455 void iscsi_put_task(struct iscsi_task *);
458 void iscsi_complete_scsi_task(struct iscsi_task *, uint32_t , uint32_t );
778 struct Scsi_Host * dev_to_shost___0(struct device *dev);
806 struct Scsi_Host * scsi_host_get(struct Scsi_Host *);
807 void scsi_host_put(struct Scsi_Host *);
295 struct scsi_target * scsi_target(struct scsi_device *sdev);
156 int scsi_dma_map(struct scsi_cmnd *);
157 void scsi_dma_unmap(struct scsi_cmnd *);
167 struct scatterlist * scsi_sglist(struct scsi_cmnd *cmd);
172 unsigned int scsi_bufflen(struct scsi_cmnd *cmd);
177 void scsi_set_resid(struct scsi_cmnd *cmd, int resid);
18 extern const unsigned char _ctype[];
38 int pci_enable_pcie_error_reporting(struct pci_dev *);
39 int pci_disable_pcie_error_reporting(struct pci_dev *);
40 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *);
26 int blk_iopoll_sched_prep(struct blk_iopoll *iop);
39 void blk_iopoll_sched(struct blk_iopoll *);
40 void blk_iopoll_init(struct blk_iopoll *, int, blk_iopoll_fn *);
41 void blk_iopoll_complete(struct blk_iopoll *);
43 void blk_iopoll_enable(struct blk_iopoll *);
44 void blk_iopoll_disable(struct blk_iopoll *);
46 extern int blk_iopoll_enabled;
48 u32 MODULO(u16 val, u16 limit);
54 void index_inc(u16 *index, u16 limit);
69 void * queue_tail_node(struct be_queue_info *q);
79 void queue_tail_inc(struct be_queue_info *q);
689 int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl, struct be_queue_info *eq, int eq_delay);
692 int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl, struct be_queue_info *cq, struct be_queue_info *eq, bool sol_evts, bool no_delay, int coalesce_wm);
697 int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, int queue_type);
699 int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba, struct be_queue_info *mccq, struct be_queue_info *cq);
704 int mgmt_check_supported_fw(struct be_ctrl_info *ctrl, struct beiscsi_hba *phba);
709 void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag);
714 int be_cmd_fw_initialize(struct be_ctrl_info *ctrl);
715 int be_cmd_fw_uninit(struct be_ctrl_info *ctrl);
722 void beiscsi_async_link_state_process(struct beiscsi_hba *phba, struct be_async_event_link_state *evt);
724 int be_mcc_compl_process_isr(struct be_ctrl_info *ctrl, struct be_mcc_compl *compl);
729 int be_cmd_create_default_pdu_queue(struct be_ctrl_info *ctrl, struct be_queue_info *cq, struct be_queue_info *dq, int length, int entry_size, uint8_t is_header, uint8_t ulp_num);
735 int be_cmd_iscsi_post_template_hdr(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem);
738 int be_cmd_iscsi_remove_template_hdr(struct be_ctrl_info *ctrl);
740 int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, u32 page_offset___0, u32 num_pages);
744 int beiscsi_cmd_reset_function(struct beiscsi_hba *phba);
746 int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, struct be_queue_info *wrbq, struct hwi_wrb_context *pwrb_context, uint8_t ulp_num);
751 bool is_link_state_evt(u32 trailer);
1312 int be_chk_reset_complete(struct beiscsi_hba *phba);
163 u32 amap_get(void *ptr, u32 dw_offset, u32 mask, u32 offset);
177 void swap_dws(void *wrb, int len);
816 struct wrb_handle * alloc_wrb_handle(struct beiscsi_hba *phba, unsigned int cid);
818 void free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle);
820 void beiscsi_process_all_cqs(struct work_struct *work);
99 int mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short ulp_num);
108 unsigned int mgmt_invalidate_icds(struct beiscsi_hba *phba, struct invalidate_command_table *inv_tbl, unsigned int num_invalidate, unsigned int cid, struct be_dma_mem *nonemb_cmd);
112 unsigned int mgmt_vendor_specific_fw_cmd(struct be_ctrl_info *ctrl, struct beiscsi_hba *phba, struct bsg_job *job, struct be_dma_mem *nonemb_cmd);
269 int mgmt_get_fw_config(struct be_ctrl_info *ctrl, struct beiscsi_hba *phba);
289 unsigned int mgmt_get_session_info(struct beiscsi_hba *phba, u32 boot_session_handle, struct be_dma_mem *nonemb_cmd);
305 int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, unsigned int *s_handle);
312 ssize_t beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr, char *buf);
315 ssize_t beiscsi_fw_ver_disp(struct device *dev, struct device_attribute *attr, char *buf);
318 ssize_t beiscsi_active_session_disp(struct device *dev, struct device_attribute *attr, char *buf);
321 ssize_t beiscsi_adap_family_disp(struct device *dev, struct device_attribute *attr, char *buf);
325 ssize_t beiscsi_free_session_disp(struct device *dev, struct device_attribute *attr, char *buf);
328 ssize_t beiscsi_phys_port_disp(struct device *dev, struct device_attribute *attr, char *buf);
331 void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params, struct wrb_handle *pwrb_handle, struct be_mem_descriptor *mem_descr);
335 void beiscsi_offload_cxn_v2(struct beiscsi_offload_params *params, struct wrb_handle *pwrb_handle);
337 void beiscsi_ue_detect(struct beiscsi_hba *phba);
48 unsigned int be_iopoll_budget = 10U;
49 unsigned int be_max_phys_size = 64U;
50 unsigned int enable_msix = 1U;
52 const struct pci_device_id __mod_pci_device_table = { };
154 unsigned int beiscsi_log_enable = 0U;
154 ssize_t beiscsi_log_enable_disp(struct device *dev, struct device_attribute *attrib, char *buf);
154 int beiscsi_log_enable_change(struct beiscsi_hba *phba, uint32_t val);
154 ssize_t beiscsi_log_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
154 int beiscsi_log_enable_init(struct beiscsi_hba *phba, uint32_t val);
154 struct device_attribute dev_attr_beiscsi_log_enable = { { "beiscsi_log_enable", 420U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_log_enable_disp, &beiscsi_log_enable_store };
156 struct device_attribute dev_attr_beiscsi_drvr_ver = { { "beiscsi_drvr_ver", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_drvr_ver_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
157 struct device_attribute dev_attr_beiscsi_adapter_family = { { "beiscsi_adapter_family", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_adap_family_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
158 struct device_attribute dev_attr_beiscsi_fw_ver = { { "beiscsi_fw_ver", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_fw_ver_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
159 struct device_attribute dev_attr_beiscsi_phys_port = { { "beiscsi_phys_port", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_phys_port_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
161 struct device_attribute dev_attr_beiscsi_active_session_count = { { "beiscsi_active_session_count", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_active_session_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
163 struct device_attribute dev_attr_beiscsi_free_session_count = { { "beiscsi_free_session_count", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &beiscsi_free_session_disp, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 };
164 struct device_attribute *beiscsi_attrs[8U] = { &dev_attr_beiscsi_log_enable, &dev_attr_beiscsi_drvr_ver, &dev_attr_beiscsi_adapter_family, &dev_attr_beiscsi_fw_ver, &dev_attr_beiscsi_active_session_count, &dev_attr_beiscsi_free_session_count, &dev_attr_beiscsi_phys_port, (struct device_attribute *)0 };
175 const char *cqe_desc[36U] = { "RESERVED_DESC", "SOL_CMD_COMPLETE", "SOL_CMD_KILLED_DATA_DIGEST_ERR", "CXN_KILLED_PDU_SIZE_EXCEEDS_DSL", "CXN_KILLED_BURST_LEN_MISMATCH", "CXN_KILLED_AHS_RCVD", "CXN_KILLED_HDR_DIGEST_ERR", "CXN_KILLED_UNKNOWN_HDR", "CXN_KILLED_STALE_ITT_TTT_RCVD", "CXN_KILLED_INVALID_ITT_TTT_RCVD", "CXN_KILLED_RST_RCVD", "CXN_KILLED_TIMED_OUT", "CXN_KILLED_RST_SENT", "CXN_KILLED_FIN_RCVD", "CXN_KILLED_BAD_UNSOL_PDU_RCVD", "CXN_KILLED_BAD_WRB_INDEX_ERROR", "CXN_KILLED_OVER_RUN_RESIDUAL", "CXN_KILLED_UNDER_RUN_RESIDUAL", "CMD_KILLED_INVALID_STATSN_RCVD", "CMD_KILLED_INVALID_R2T_RCVD", "CMD_CXN_KILLED_LUN_INVALID", "CMD_CXN_KILLED_ICD_INVALID", "CMD_CXN_KILLED_ITT_INVALID", "CMD_CXN_KILLED_SEQ_OUTOFORDER", "CMD_CXN_KILLED_INVALID_DATASN_RCVD", "CXN_INVALIDATE_NOTIFY", "CXN_INVALIDATE_INDEX_NOTIFY", "CMD_INVALIDATED_NOTIFY", "UNSOL_HDR_NOTIFY", "UNSOL_DATA_NOTIFY", "UNSOL_DATA_DIGEST_ERROR_NOTIFY", "DRIVERMSG_NOTIFY", "CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN", "SOL_CMD_KILLED_DIF_ERR", "CXN_KILLED_SYN_RCVD", "CXN_KILLED_IMM_DATA_RCVD" };
214 int beiscsi_slave_configure(struct scsi_device *sdev);
220 int beiscsi_eh_abort(struct scsi_cmnd *sc);
295 int beiscsi_eh_device_reset(struct scsi_cmnd *sc);
373 ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf);
440 ssize_t beiscsi_show_boot_ini_info(void *data, int type, char *buf);
457 ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf);
481 umode_t beiscsi_tgt_get_attr_visibility(void *data, int type);
504 umode_t beiscsi_ini_get_attr_visibility(void *data, int type);
520 umode_t beiscsi_eth_get_attr_visibility(void *data, int type);
538 const struct pci_device_id beiscsi_pci_id_table[7U] = { { 6562U, 530U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 6562U, 546U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 6562U, 1794U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 6562U, 1795U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 6562U, 1810U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 4319U, 1826U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 0U, 0U, 0U, 0U, 0U, 0U, 0UL } };
550 struct scsi_host_template beiscsi_sht = { &__this_module, "Emulex 10Gbe open-iscsi Initiator Driver", 0, 0, 0, 0, 0, &iscsi_queuecommand, 0, &beiscsi_eh_abort, &beiscsi_eh_device_reset, &iscsi_eh_session_reset, 0, 0, 0, &beiscsi_slave_configure, 0, &iscsi_target_alloc, 0, 0, 0, &iscsi_change_queue_depth, 0, 0, 0, 0, 0, 0, 0, "be2iscsi", 0, 1024, -1, 30U, (unsigned short)0, 2048U, 0UL, 128, 0U, 0U, 0U, 1U, 0U, 0U, 0U, 0U, 0U, 0U, (struct device_attribute **)(&beiscsi_attrs), 0, { 0, 0 }, 72057594037934498ULL };
572 struct scsi_transport_template *beiscsi_scsi_transport = 0;
574 struct beiscsi_hba * beiscsi_hba_alloc(struct pci_dev *pcidev);
609 void beiscsi_unmap_pci_function(struct beiscsi_hba *phba);
625 int beiscsi_map_pci_bars(struct beiscsi_hba *phba, struct pci_dev *pcidev);
666 int beiscsi_enable_pci(struct pci_dev *pcidev);
689 int be_ctrl_init(struct beiscsi_hba *phba, struct pci_dev *pdev);
724 void beiscsi_get_params(struct beiscsi_hba *phba);
802 void hwi_ring_eq_db(struct beiscsi_hba *phba, unsigned int id, unsigned int clr_interrupt, unsigned int num_processed, unsigned char rearm, unsigned char event);
824 irqreturn_t be_isr_mcc(int irq, void *dev_id);
869 irqreturn_t be_isr_msix(int irq, void *dev_id);
924 irqreturn_t be_isr(int irq, void *dev_id);
1025 int beiscsi_init_irqs(struct beiscsi_hba *phba);
1097 void hwi_ring_cq_db(struct beiscsi_hba *phba, unsigned int id, unsigned int num_processed, unsigned char rearm, unsigned char event);
1110 unsigned int beiscsi_process_async_pdu(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct pdu_base *ppdu, unsigned long pdu_len, void *pbuffer, unsigned long buf_len);
1160 struct sgl_handle * alloc_io_sgl_handle(struct beiscsi_hba *phba);
1185 void free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle);
1253 void free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context, struct wrb_handle *pwrb_handle);
1271 struct sgl_handle * alloc_mgmt_sgl_handle(struct beiscsi_hba *phba);
1325 void be_complete_io(struct beiscsi_conn *beiscsi_conn, struct iscsi_task *task, struct common_sol_cqe *csol_cqe);
1388 void be_complete_logout(struct beiscsi_conn *beiscsi_conn, struct iscsi_task *task, struct common_sol_cqe *csol_cqe);
1415 void be_complete_tmf(struct beiscsi_conn *beiscsi_conn, struct iscsi_task *task, struct common_sol_cqe *csol_cqe);
1436 void hwi_complete_drvr_msgs(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct sol_cqe *psol);
1470 void be_complete_nopin_resp(struct beiscsi_conn *beiscsi_conn, struct iscsi_task *task, struct common_sol_cqe *csol_cqe);
1489 void adapter_get_sol_cqe(struct beiscsi_hba *phba, struct sol_cqe *psol, struct common_sol_cqe *csol_cqe);
1543 void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct sol_cqe *psol);
1614 struct list_head * hwi_get_async_busy_list(struct hwi_async_pdu_context *pasync_ctx, unsigned int is_header, unsigned int host_write_ptr);
1626 struct async_pdu_handle * hwi_get_async_handle(struct beiscsi_hba *phba, struct beiscsi_conn *beiscsi_conn, struct hwi_async_pdu_context *pasync_ctx, struct i_t_dpdu_cqe *pdpdu_cqe, unsigned int *pcq_index);
1699 unsigned int hwi_update_async_writables(struct beiscsi_hba *phba, struct hwi_async_pdu_context *pasync_ctx, unsigned int is_header, unsigned int cq_index);
1749 void hwi_free_async_msg(struct beiscsi_hba *phba, struct hwi_async_pdu_context *pasync_ctx, unsigned int cri);
1777 struct phys_addr * hwi_get_ring_address(struct hwi_async_pdu_context *pasync_ctx, unsigned int is_header, unsigned int host_write_ptr);
1790 void hwi_post_async_buffers(struct beiscsi_hba *phba, unsigned int is_header, uint8_t ulp_num);
1875 void hwi_flush_default_pdu_buffer(struct beiscsi_hba *phba, struct beiscsi_conn *beiscsi_conn, struct i_t_dpdu_cqe *pdpdu_cqe);
1905 unsigned int hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct hwi_async_pdu_context *pasync_ctx, unsigned short cri);
1945 unsigned int hwi_gather_async_pdu(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct async_pdu_handle *pasync_handle);
2012 void hwi_process_default_pdu_ring(struct beiscsi_conn *beiscsi_conn, struct beiscsi_hba *phba, struct i_t_dpdu_cqe *pdpdu_cqe);
2041 void beiscsi_process_mcc_isr(struct beiscsi_hba *phba);
2092 unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq);
2287 int be_iopoll(struct blk_iopoll *iop, int budget);
2308 void hwi_write_sgl_v2(struct iscsi_wrb *pwrb, struct scatterlist *sg, unsigned int num_sg, struct beiscsi_io_task *io_task);
2403 void hwi_write_sgl(struct iscsi_wrb *pwrb, struct scatterlist *sg, unsigned int num_sg, struct beiscsi_io_task *io_task);
2495 void hwi_write_buffer(struct iscsi_wrb *pwrb, struct iscsi_task *task);
2577 void beiscsi_find_mem_req(struct beiscsi_hba *phba);
2682 int beiscsi_alloc_mem(struct beiscsi_hba *phba);
2796 int beiscsi_get_memory(struct beiscsi_hba *phba);
2802 void iscsi_init_global_templates(struct beiscsi_hba *phba);
2827 int beiscsi_init_wrb_handle(struct beiscsi_hba *phba);
2928 int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba);
3171 int be_sgl_create_contiguous(void *virtual_address, u64 physical_address, u32 length, struct be_dma_mem *sgl);
3187 void be_sgl_destroy_contiguous(struct be_dma_mem *sgl);
3193 void hwi_build_be_sgl_arr(struct beiscsi_hba *phba, struct mem_array *pmem, struct be_dma_mem *sgl);
3205 void hwi_build_be_sgl_by_offset(struct beiscsi_hba *phba, struct mem_array *pmem, struct be_dma_mem *sgl);
3216 int be_fill_queue(struct be_queue_info *q, u16 len, u16 entry_size, void *vaddress);
3232 int beiscsi_create_eqs(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context);
3295 int beiscsi_create_cqs(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context);
3359 int beiscsi_create_def_hdr(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context, struct hwi_controller *phwi_ctrlr, unsigned int def_pdu_ring_sz, uint8_t ulp_num);
3412 int beiscsi_create_def_data(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context, struct hwi_controller *phwi_ctrlr, unsigned int def_pdu_ring_sz, uint8_t ulp_num);
3472 int beiscsi_post_template_hdr(struct beiscsi_hba *phba);
3506 int beiscsi_post_pages(struct beiscsi_hba *phba);
3542 void be_queue_free(struct beiscsi_hba *phba, struct be_queue_info *q);
3552 int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q, u16 len, u16 entry_size);
3569 int beiscsi_create_wrb_rings(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context, struct hwi_controller *phwi_ctrlr);
3671 void free_wrb_handles(struct beiscsi_hba *phba);
3685 void be_mcc_queues_destroy(struct beiscsi_hba *phba);
3701 void hwi_cleanup(struct beiscsi_hba *phba);
3758 int be_mcc_queues_create(struct beiscsi_hba *phba, struct hwi_context_memory *phwi_context);
3807 void find_num_cpus(struct beiscsi_hba *phba);
3839 int hwi_init_port(struct beiscsi_hba *phba);
3961 int hwi_init_controller(struct beiscsi_hba *phba);
3998 void beiscsi_free_mem(struct beiscsi_hba *phba);
4023 int beiscsi_init_controller(struct beiscsi_hba *phba);
4048 int beiscsi_init_sgl_handle(struct beiscsi_hba *phba);
4156 int hba_setup_cid_tbls(struct beiscsi_hba *phba);
4257 void hwi_enable_intr(struct beiscsi_hba *phba);
4298 void hwi_disable_intr(struct beiscsi_hba *phba);
4324 int beiscsi_get_boot_info(struct beiscsi_hba *phba);
4384 void beiscsi_boot_release(void *data);
4391 int beiscsi_setup_boot_info(struct beiscsi_hba *phba);
4440 int beiscsi_init_port(struct beiscsi_hba *phba);
4474 void hwi_purge_eq(struct beiscsi_hba *phba);
4507 void beiscsi_clean_port(struct beiscsi_hba *phba);
4595 void beiscsi_cleanup_task(struct iscsi_task *task);
4674 void beiscsi_parse_pdu(struct iscsi_conn *conn, itt_t itt, int *index, int *age);
4692 int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode);
4844 int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg, unsigned int num_sg, unsigned int xferlen, unsigned int writedir);
4901 int beiscsi_iotask(struct iscsi_task *task, struct scatterlist *sg, unsigned int num_sg, unsigned int xferlen, unsigned int writedir);
4957 int beiscsi_mtask(struct iscsi_task *task);
5060 int beiscsi_task_xmit(struct iscsi_task *task);
5104 int beiscsi_bsg_request(struct bsg_job *job);
5182 void beiscsi_hba_attrs_init(struct beiscsi_hba *phba);
5195 void beiscsi_quiesce(struct beiscsi_hba *phba, uint32_t unload_state);
5244 void beiscsi_remove(struct pci_dev *pcidev);
5266 void beiscsi_shutdown(struct pci_dev *pcidev);
5281 void beiscsi_msix_enable(struct beiscsi_hba *phba);
5303 void beiscsi_hw_health_check(struct work_struct *work);
5316 pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev, pci_channel_state_t state);
5349 pci_ers_result_t beiscsi_eeh_reset(struct pci_dev *pdev);
5382 void beiscsi_eeh_resume(struct pci_dev *pdev);
5476 int beiscsi_dev_probe(struct pci_dev *pcidev, const struct pci_device_id *id);
5697 struct pci_error_handlers beiscsi_eeh_handlers = { (pci_ers_result_t (*)(struct pci_dev *, enum pci_channel_state ))(&beiscsi_eeh_err_detected), 0, 0, &beiscsi_eeh_reset, &beiscsi_eeh_resume };
5703 struct iscsi_transport beiscsi_iscsi_transport = { &__this_module, (char *)"be2iscsi", 2233U, &beiscsi_session_create, &beiscsi_session_destroy, &beiscsi_conn_create, &beiscsi_conn_bind, &beiscsi_conn_start, &iscsi_conn_stop, &iscsi_conn_teardown, &beiscsi_set_param, &beiscsi_ep_get_param, &iscsi_conn_get_param, &iscsi_session_get_param, &beiscsi_get_host_param, 0, &iscsi_conn_send_pdu, &beiscsi_conn_get_stats, 0, &beiscsi_task_xmit, &beiscsi_cleanup_task, &beiscsi_alloc_pdu, 0, 0, &beiscsi_parse_pdu, &iscsi_session_recovery_timedout, &beiscsi_ep_connect, &beiscsi_ep_poll, &beiscsi_ep_disconnect, 0, 0, &be2iscsi_iface_set_param, &be2iscsi_iface_get_param, &be2iscsi_attr_is_visible, &beiscsi_bsg_request, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
5736 struct pci_driver beiscsi_pci_driver = { { 0, 0 }, "be2iscsi", (const struct pci_device_id *)(&beiscsi_pci_id_table), &beiscsi_dev_probe, &beiscsi_remove, 0, 0, 0, 0, &beiscsi_shutdown, 0, (const struct pci_error_handlers *)(&beiscsi_eeh_handlers), { 0, 0, 0, 0, (_Bool)0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { { { { { { 0U } }, 0U, 0U, 0, { 0, { 0, 0 }, 0, 0, 0UL } } } }, { 0, 0 } } };
5746 int beiscsi_module_init();
5773 void beiscsi_module_exit();
5798 void ldv_check_final_state();
5801 void ldv_check_return_value(int);
5804 void ldv_check_return_value_probe(int);
5807 void ldv_initialize();
5810 void ldv_handler_precall();
5813 int nondet_int();
5816 int LDV_IN_INTERRUPT = 0;
5819 void ldv_main1_sequence_infinite_withcheck_stateful();
71 void set_bit(long nr, volatile unsigned long *addr);
802 unsigned long int arch_local_save_flags___1();
244 size_t sg_copy_to_buffer(struct scatterlist *, unsigned int, void *, size_t );
824 int pci_bus_read_config_dword(struct pci_bus *, unsigned int, int, u32 *);
842 int pci_read_config_dword(const struct pci_dev *dev, int where, u32 *val);
164 void dma_free_attrs___1(struct device *dev, size_t size, void *vaddr, dma_addr_t bus, struct dma_attrs *attrs);
23 void pci_free_consistent___1(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle);
612 struct be_sge * nonembedded_sgl(struct be_mcc_wrb *wrb);
717 struct be_mcc_wrb * wrb_from_mbox(struct be_dma_mem *mbox_mem);
718 struct be_mcc_wrb * wrb_from_mccq(struct beiscsi_hba *phba);
719 int be_mcc_notify_wait(struct beiscsi_hba *phba);
720 void be_mcc_notify(struct beiscsi_hba *phba);
721 unsigned int alloc_mcc_tag(struct beiscsi_hba *phba);
727 int be_mbox_notify(struct be_ctrl_info *ctrl);
754 int be_cmd_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag);
1314 void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, bool embedded, u8 sge_cnt);
1317 void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, u8 subsystem, u8 opcode, int cmd_len);
283 unsigned int mgmt_get_boot_target(struct beiscsi_hba *phba);
285 unsigned int mgmt_reopen_session(struct beiscsi_hba *phba, unsigned int reopen_type, unsigned int sess_handle);
28 const const char *desc_ue_status_low[32U] = { "CEV", "CTX", "DBUF", "ERX", "Host", "MPU", "NDMA", "PTC ", "RDMA ", "RXF ", "RXIPS ", "RXULP0 ", "RXULP1 ", "RXULP2 ", "TIM ", "TPOST ", "TPRE ", "TXIPS ", "TXULP0 ", "TXULP1 ", "UC ", "WDMA ", "TXULP2 ", "HOST1 ", "P0_OB_LINK ", "P1_OB_LINK ", "HOST_GPIO ", "MBOX ", "AXGMAC0", "AXGMAC1", "JTAG", "MPU_INTPEND" };
64 const const char *desc_ue_status_hi[32U] = { "LPCMEMHOST", "MGMT_MAC", "PCS0ONLINE", "MPU_IRAM", "PCS1ONLINE", "PCTL0", "PCTL1", "PMEM", "RR", "TXPB", "RXPP", "XAUI", "TXP", "ARM", "IPC", "HOST2", "HOST3", "HOST4", "HOST5", "HOST6", "HOST7", "HOST8", "HOST9", "NETC", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown" };
802 int mgmt_exec_nonemb_cmd(struct beiscsi_hba *phba, struct be_dma_mem *nonemb_cmd, void *resp_buf, int resp_buf_len);
853 int mgmt_alloc_cmd_data(struct beiscsi_hba *phba, struct be_dma_mem *cmd, int iscsi_cmd, int size);
869 int mgmt_static_ip_modify(struct beiscsi_hba *phba, struct be_cmd_get_if_info_resp *if_info, struct iscsi_iface_param_info *ip_param, struct iscsi_iface_param_info *subnet_param, uint32_t ip_action);
920 int mgmt_modify_gateway(struct beiscsi_hba *phba, uint8_t *gt_addr, uint32_t gtway_action, uint32_t param_len);
439 int fls(int x);
32 int __ilog2_u32(u32 n);
24 int atomic_read(const atomic_t *v);
89 void atomic_inc(atomic_t *v);
144 void __wake_up(wait_queue_head_t *, unsigned int, int, void *);
77 extern volatile unsigned long jiffies;
55 unsigned int readl(const volatile void *addr);
63 void writel(unsigned int val, volatile void *addr);
282 void iscsi_host_for_each_session(struct Scsi_Host *, void (*)(struct iscsi_cls_session *));
424 void iscsi_session_failure(struct iscsi_session *, enum iscsi_err );
10 void __const_udelay(unsigned long);
59 void * queue_head_node(struct be_queue_info *q);
64 void * queue_get_wrb(struct be_queue_info *q, unsigned int wrb_num);
74 void queue_head_inc(struct be_queue_info *q);
1311 int beiscsi_pci_soft_reset(struct beiscsi_hba *phba);
258 bool be_mcc_compl_is_new(struct be_mcc_compl *compl);
268 void be_mcc_compl_use(struct be_mcc_compl *compl);
284 int be_mcc_compl_process(struct be_ctrl_info *ctrl, struct be_mcc_compl *compl);
345 struct be_mcc_compl * be_mcc_compl_get(struct beiscsi_hba *phba);
357 void be2iscsi_fail_session(struct iscsi_cls_session *cls_session);
389 void beiscsi_cq_notify(struct beiscsi_hba *phba, u16 qid, bool arm, u16 num_popped);
401 int beiscsi_process_mcc(struct beiscsi_hba *phba);
448 int be_mcc_wait_compl(struct beiscsi_hba *phba);
501 int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl);
614 int be_mbox_notify_wait(struct beiscsi_hba *phba);
684 void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, struct be_dma_mem *mem);
698 u32 eq_delay_to_mult(u32 usec_delay);
928 u32 be_encoded_q_len(int q_len);
10 void ldv_error();
25 int ldv_undef_int();
26 void * ldv_undef_ptr();
8 int LDV_DMA_MAP_CALLS = 0;
11 dma_addr_t ldv_dma_map_page(struct device *dev, struct page *page, size_t offset, size_t size, enum dma_data_direction dir);
25 int ldv_dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
41 dma_addr_t ldv_dma_map_single(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction dir);
return ;
}
-entry_point
{
5821 struct scsi_device *var_group1;
5822 struct scsi_cmnd *var_group2;
5823 struct pci_dev *var_group3;
5824 unsigned int var_beiscsi_eeh_err_detected_107_p1;
5825 struct iscsi_task *var_group4;
5826 unsigned char var_beiscsi_alloc_pdu_95_p1;
5827 struct iscsi_conn *var_group5;
5828 unsigned int var_beiscsi_parse_pdu_94_p1;
5829 int *var_beiscsi_parse_pdu_94_p2;
5830 int *var_beiscsi_parse_pdu_94_p3;
5831 struct bsg_job *var_group6;
5832 const struct pci_device_id *var_beiscsi_dev_probe_110_p1;
5833 int res_beiscsi_dev_probe_110;
5834 int var_be_isr_18_p0;
5835 void *var_be_isr_18_p1;
5836 int var_be_isr_mcc_16_p0;
5837 void *var_be_isr_mcc_16_p1;
5838 int var_be_isr_msix_17_p0;
5839 void *var_be_isr_msix_17_p1;
5840 int ldv_s_beiscsi_pci_driver_pci_driver;
5841 int tmp;
5842 int tmp___0;
5843 int tmp___1;
7269 ldv_s_beiscsi_pci_driver_pci_driver = 0;
7171 LDV_IN_INTERRUPT = 1;
7180 -ldv_initialize()
{
71 LDV_DMA_MAP_CALLS = 0;
72 return ;;
}
7260 ldv_handler_precall() { /* Function call is skipped due to function is undefined */}
7261 -beiscsi_module_init()
{
5748 int ret;
5750 beiscsi_scsi_transport = iscsi_register_transport(&beiscsi_iscsi_transport) { /* Function call is skipped due to function is undefined */}
5752 assume(!(((unsigned long)beiscsi_scsi_transport) == ((unsigned long)((struct scsi_transport_template *)0))));
5757 printk("\016In beiscsi_module_init, tt=%p\n", &beiscsi_iscsi_transport) { /* Function call is skipped due to function is undefined */}
5760 ret = __pci_register_driver(&beiscsi_pci_driver, &__this_module, "be2iscsi") { /* Function call is skipped due to function is undefined */}
5761 assume(!(ret != 0));
5766 return 0;;
}
7261 assume(!(tmp != 0));
7275 goto ldv_53267;
7275 tmp___1 = nondet_int() { /* Function call is skipped due to function is undefined */}
7275 assume(tmp___1 != 0);
7278 goto ldv_53266;
7276 ldv_53266:;
7279 tmp___0 = nondet_int() { /* Function call is skipped due to function is undefined */}
7279 switch (tmp___0)
7280 assume(!(tmp___0 == 0));
7372 assume(!(tmp___0 == 1));
7463 assume(!(tmp___0 == 2));
7554 assume(!(tmp___0 == 3));
7645 assume(!(tmp___0 == 4));
7736 assume(!(tmp___0 == 5));
7827 assume(tmp___0 == 6);
7909 ldv_handler_precall() { /* Function call is skipped due to function is undefined */}
7910 -beiscsi_task_xmit(var_group4)
{
5062 struct beiscsi_io_task *io_task;
5063 struct scsi_cmnd *sc;
5064 struct beiscsi_hba *phba;
5065 struct scatterlist *sg;
5066 int num_sg;
5067 unsigned int writedir;
5068 unsigned int xferlen;
5069 int tmp;
5070 struct iscsi_conn *conn;
5071 struct beiscsi_hba *phba___0;
5072 unsigned int log_value;
5073 unsigned int tmp___0;
5074 unsigned int tmp___1;
5075 int tmp___2;
5062 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
5062 io_task = __CPAchecker_TMP_0;
5063 sc = task->sc;
5064 phba = (struct beiscsi_hba *)0;
5067 writedir = 0U;
5067 xferlen = 0U;
5069 struct beiscsi_conn *__CPAchecker_TMP_1 = (struct beiscsi_conn *)(task->conn->dd_data);
5069 phba = __CPAchecker_TMP_1->phba;
5071 assume(((unsigned long)sc) == ((unsigned long)((struct scsi_cmnd *)0)));
5072 -beiscsi_mtask(task)
{
4959 struct beiscsi_io_task *io_task;
4960 struct iscsi_conn *conn;
4961 struct beiscsi_conn *beiscsi_conn;
4962 struct beiscsi_hba *phba;
4963 struct iscsi_wrb *pwrb;
4964 unsigned int doorbell;
4965 unsigned int cid;
4966 unsigned int pwrb_typeoffset;
4967 unsigned int tmp;
4968 unsigned int tmp___0;
4969 unsigned int tmp___1;
4970 unsigned int tmp___2;
4971 unsigned int tmp___3;
4972 unsigned int tmp___4;
4973 unsigned int tmp___5;
4974 unsigned int tmp___6;
4975 unsigned int tmp___7;
4976 unsigned int tmp___8;
4977 unsigned int tmp___9;
4978 unsigned int tmp___10;
4979 unsigned int tmp___11;
4980 unsigned int tmp___12;
4981 unsigned int tmp___13;
4982 unsigned int tmp___14;
4983 unsigned int tmp___15;
4984 unsigned int log_value;
4985 unsigned int tmp___16;
4986 unsigned int tmp___17;
4987 unsigned int tmp___18;
4988 unsigned int tmp___19;
4959 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
4959 io_task = __CPAchecker_TMP_0;
4960 conn = task->conn;
4961 struct beiscsi_conn *__CPAchecker_TMP_1 = (struct beiscsi_conn *)(conn->dd_data);
4961 beiscsi_conn = __CPAchecker_TMP_1;
4962 phba = beiscsi_conn->phba;
4963 pwrb = (struct iscsi_wrb *)0;
4964 doorbell = 0U;
4966 pwrb_typeoffset = 0U;
4968 cid = beiscsi_conn->beiscsi_conn_cid;
4969 pwrb = io_task->pwrb_handle->pwrb;
4970 memset((void *)pwrb, 0, 64UL) { /* Function call is skipped due to function is undefined */}
4972 assume(!((phba->generation) == 3U));
4972 assume(!((phba->generation) == 2U));
4985 -__fswab32(task->cmdsn)
{
59 unsigned int tmp;
62 -__arch_swab32(val)
{
9 Ignored inline assembler code
10 return val;;
}
62 return tmp;;
}
4985 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
4985 -amap_set((void *)pwrb, 7U, tmp___6, 0U, tmp___5)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4987 -amap_mask(8U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4987 u32 __CPAchecker_TMP_4 = (u32 )(io_task->pwrb_handle->wrb_index);
4987 -amap_set((void *)pwrb, 1U, tmp___7, 8U, __CPAchecker_TMP_4)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4989 -amap_mask(16U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4989 -amap_set((void *)pwrb, 2U, tmp___8, 0U, io_task->psgl_handle->sgl_index)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4991 -amap_mask(25U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4991 -amap_set((void *)pwrb, 0U, tmp___9, 0U, task->data_count)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4993 -amap_mask(8U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4993 u32 __CPAchecker_TMP_5 = (u32 )(io_task->pwrb_handle->nxt_wrb_index);
4993 -amap_set((void *)pwrb, 1U, tmp___10, 0U, __CPAchecker_TMP_5)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4995 pwrb_typeoffset = 27U;
4999 int __CPAchecker_TMP_6 = (int)(task->hdr->opcode);
4999 switch (__CPAchecker_TMP_6 & 63)
5000 assume((__CPAchecker_TMP_6 & 63) == 3);
5001 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
5001 -amap_set((void *)pwrb, 6U, tmp___11, 0U, 1U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
5002 (pwrb->dw)[0] = ((pwrb->dw)[0]) | ((u32 )(11 << ((int)pwrb_typeoffset)));
5003 -hwi_write_buffer(pwrb, task)
{
2497 struct iscsi_sge *psgl;
2498 struct beiscsi_io_task *io_task;
2499 struct beiscsi_conn *beiscsi_conn;
2500 struct beiscsi_hba *phba;
2501 unsigned char dsp_value;
2502 unsigned int tmp;
2503 unsigned int tmp___0;
2504 unsigned int tmp___1;
2505 unsigned int tmp___2;
2506 unsigned int tmp___3;
2507 unsigned int tmp___4;
2508 unsigned int tmp___5;
2509 unsigned int tmp___6;
2510 unsigned int tmp___7;
2511 unsigned int tmp___8;
2512 unsigned int tmp___9;
2513 unsigned int tmp___10;
2514 unsigned int tmp___11;
2515 unsigned int tmp___12;
2516 unsigned int tmp___13;
2517 unsigned int tmp___14;
2518 unsigned int tmp___15;
2519 unsigned int tmp___16;
2520 unsigned int tmp___17;
2521 unsigned int tmp___18;
2522 unsigned int tmp___19;
2523 unsigned int tmp___20;
2498 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
2498 io_task = __CPAchecker_TMP_0;
2499 beiscsi_conn = io_task->conn;
2500 phba = beiscsi_conn->phba;
2501 dsp_value = 0U;
2503 io_task->bhs_len = 322U;
2504 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2504 -amap_set((void *)pwrb, 5U, tmp, 0U, io_task->bhs_pa.u.a32.address_lo)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2506 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2506 -amap_set((void *)pwrb, 4U, tmp___0, 0U, io_task->bhs_pa.u.a32.address_hi)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2509 unsigned long __CPAchecker_TMP_1 = (unsigned long)(task->data);
2509 assume(__CPAchecker_TMP_1 != ((unsigned long)((char *)0)));
2512 dsp_value = (task->data_count) != 0U;
2514 assume(!((phba->generation) == 3U));
2514 assume((phba->generation) == 2U);
2515 -amap_mask(1U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2515 -amap_set((void *)pwrb, 0U, tmp___1, 24U, (u32 )dsp_value)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2522 assume(((unsigned int)dsp_value) != 0U);
2523 void *__CPAchecker_TMP_2 = (void *)(task->data);
2523 size_t __CPAchecker_TMP_3 = (size_t )(task->data_count);
2523 -pci_map_single(phba->pcidev, __CPAchecker_TMP_2, __CPAchecker_TMP_3, 1)
{
33 unsigned long long tmp;
32 struct device *__CPAchecker_TMP_0;
32 assume(((unsigned long)hwdev) != ((unsigned long)((struct pci_dev *)0)));
32 __CPAchecker_TMP_0 = &(hwdev->dev);
32 -ldv_dma_map_single_attrs_5(__CPAchecker_TMP_0, ptr, size, (enum dma_data_direction )direction, (struct dma_attrs *)0)
{
14 unsigned long long tmp;
13 -ldv_dma_map_single_attrs(dev, ptr, size, dir, attrs)
{
58 unsigned long long nonedetermined;
59 void *tmp;
58 tmp = ldv_undef_ptr() { /* Function call is skipped due to function is undefined */}
58 nonedetermined = (dma_addr_t )tmp;
61 assume(!(LDV_DMA_MAP_CALLS != 0));
63 LDV_DMA_MAP_CALLS = LDV_DMA_MAP_CALLS + 1;
65 return nonedetermined;;
}
13 return tmp;;
}
32 return tmp;;
}
2527 io_task->mtask_data_count = task->data_count;
2531 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2531 unsigned int __CPAchecker_TMP_4 = (unsigned int)(io_task->mtask_addr);
2531 -amap_set((void *)pwrb, 9U, tmp___3, 0U, __CPAchecker_TMP_4)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2533 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2533 -amap_set((void *)pwrb, 8U, tmp___4, 0U, (unsigned int)((io_task->mtask_addr) >> 32ULL))
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2535 -amap_mask(17U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2535 -amap_set((void *)pwrb, 11U, tmp___5, 0U, task->data_count)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2538 -amap_mask(1U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2538 -amap_set((void *)pwrb, 10U, tmp___6, 31U, 1U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2544 psgl = io_task->psgl_handle->pfrag;
2546 -amap_mask(17U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2546 u32 __CPAchecker_TMP_5 = (u32 )(io_task->bhs_len);
2546 -amap_set((void *)psgl, 3U, tmp___8, 0U, __CPAchecker_TMP_5)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2548 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2548 -amap_set((void *)psgl, 0U, tmp___9, 0U, io_task->bhs_pa.u.a32.address_hi)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2550 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2550 -amap_set((void *)psgl, 1U, tmp___10, 0U, io_task->bhs_pa.u.a32.address_lo)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2552 unsigned long __CPAchecker_TMP_6 = (unsigned long)(task->data);
2552 assume(__CPAchecker_TMP_6 != ((unsigned long)((char *)0)));
2553 psgl = psgl + 1;
2554 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2554 -amap_set((void *)psgl, 0U, tmp___11, 0U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2555 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2555 -amap_set((void *)psgl, 1U, tmp___12, 0U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2556 -amap_mask(17U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2556 -amap_set((void *)psgl, 3U, tmp___13, 0U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2557 -amap_mask(22U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2557 -amap_set((void *)psgl, 2U, tmp___14, 0U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2558 -amap_mask(9U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2558 -amap_set((void *)psgl, 2U, tmp___15, 22U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2559 -amap_mask(1U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2559 -amap_set((void *)psgl, 2U, tmp___16, 31U, 0U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2561 psgl = psgl + 1;
2562 unsigned long __CPAchecker_TMP_7 = (unsigned long)(task->data);
2562 assume(__CPAchecker_TMP_7 != ((unsigned long)((char *)0)));
2563 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2563 unsigned int __CPAchecker_TMP_8 = (unsigned int)(io_task->mtask_addr);
2563 -amap_set((void *)psgl, 1U, tmp___17, 0U, __CPAchecker_TMP_8)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2565 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2565 -amap_set((void *)psgl, 0U, tmp___18, 0U, (unsigned int)((io_task->mtask_addr) >> 32ULL))
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2568 -amap_mask(17U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2568 -amap_set((void *)psgl, 3U, tmp___19, 0U, 262U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2570 -amap_mask(1U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2570 -amap_set((void *)psgl, 2U, tmp___20, 31U, 1U)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2571 return ;;
}
5004 goto ldv_52987;
5045 ldv_52987:;
5047 assume(!((phba->generation) == 3U));
5047 assume(!((phba->generation) == 2U));
5047 -amap_mask(5U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
5047 -amap_get((void *)pwrb, 0U, tmp___18, 27U)
{
165 u32 *dw;
165 dw = (u32 *)ptr;
166 return ((*(dw + ((unsigned long)dw_offset))) >> ((int)offset)) & mask;;
}
5047 io_task->wrb_type = (uint8_t )tmp___19;
5051 doorbell = (cid & 65535U) | doorbell;
5052 int __CPAchecker_TMP_8 = (int)(io_task->pwrb_handle->wrb_index);
5052 doorbell = ((unsigned int)((__CPAchecker_TMP_8 & 255) << 16)) | doorbell;
5054 doorbell = doorbell | 16777216U;
5055 void *__CPAchecker_TMP_9 = (void *)(phba->db_va);
5055 unsigned long __CPAchecker_TMP_10 = (unsigned long)(beiscsi_conn->doorbell_offset);
5055 iowrite32(doorbell, __CPAchecker_TMP_9 + __CPAchecker_TMP_10) { /* Function call is skipped due to function is undefined */}
5057 return 0;;
}
5072 return tmp;;
}
7917 goto ldv_53247;
8833 ldv_53247:;
8834 ldv_53267:;
7275 tmp___1 = nondet_int() { /* Function call is skipped due to function is undefined */}
7275 assume(tmp___1 != 0);
7278 goto ldv_53266;
7276 ldv_53266:;
7279 tmp___0 = nondet_int() { /* Function call is skipped due to function is undefined */}
7279 switch (tmp___0)
7280 assume(!(tmp___0 == 0));
7372 assume(!(tmp___0 == 1));
7463 assume(!(tmp___0 == 2));
7554 assume(!(tmp___0 == 3));
7645 assume(!(tmp___0 == 4));
7736 assume(!(tmp___0 == 5));
7827 assume(tmp___0 == 6);
7909 ldv_handler_precall() { /* Function call is skipped due to function is undefined */}
7910 -beiscsi_task_xmit(var_group4)
{
5062 struct beiscsi_io_task *io_task;
5063 struct scsi_cmnd *sc;
5064 struct beiscsi_hba *phba;
5065 struct scatterlist *sg;
5066 int num_sg;
5067 unsigned int writedir;
5068 unsigned int xferlen;
5069 int tmp;
5070 struct iscsi_conn *conn;
5071 struct beiscsi_hba *phba___0;
5072 unsigned int log_value;
5073 unsigned int tmp___0;
5074 unsigned int tmp___1;
5075 int tmp___2;
5062 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
5062 io_task = __CPAchecker_TMP_0;
5063 sc = task->sc;
5064 phba = (struct beiscsi_hba *)0;
5067 writedir = 0U;
5067 xferlen = 0U;
5069 struct beiscsi_conn *__CPAchecker_TMP_1 = (struct beiscsi_conn *)(task->conn->dd_data);
5069 phba = __CPAchecker_TMP_1->phba;
5071 assume(((unsigned long)sc) == ((unsigned long)((struct scsi_cmnd *)0)));
5072 -beiscsi_mtask(task)
{
4959 struct beiscsi_io_task *io_task;
4960 struct iscsi_conn *conn;
4961 struct beiscsi_conn *beiscsi_conn;
4962 struct beiscsi_hba *phba;
4963 struct iscsi_wrb *pwrb;
4964 unsigned int doorbell;
4965 unsigned int cid;
4966 unsigned int pwrb_typeoffset;
4967 unsigned int tmp;
4968 unsigned int tmp___0;
4969 unsigned int tmp___1;
4970 unsigned int tmp___2;
4971 unsigned int tmp___3;
4972 unsigned int tmp___4;
4973 unsigned int tmp___5;
4974 unsigned int tmp___6;
4975 unsigned int tmp___7;
4976 unsigned int tmp___8;
4977 unsigned int tmp___9;
4978 unsigned int tmp___10;
4979 unsigned int tmp___11;
4980 unsigned int tmp___12;
4981 unsigned int tmp___13;
4982 unsigned int tmp___14;
4983 unsigned int tmp___15;
4984 unsigned int log_value;
4985 unsigned int tmp___16;
4986 unsigned int tmp___17;
4987 unsigned int tmp___18;
4988 unsigned int tmp___19;
4959 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
4959 io_task = __CPAchecker_TMP_0;
4960 conn = task->conn;
4961 struct beiscsi_conn *__CPAchecker_TMP_1 = (struct beiscsi_conn *)(conn->dd_data);
4961 beiscsi_conn = __CPAchecker_TMP_1;
4962 phba = beiscsi_conn->phba;
4963 pwrb = (struct iscsi_wrb *)0;
4964 doorbell = 0U;
4966 pwrb_typeoffset = 0U;
4968 cid = beiscsi_conn->beiscsi_conn_cid;
4969 pwrb = io_task->pwrb_handle->pwrb;
4970 memset((void *)pwrb, 0, 64UL) { /* Function call is skipped due to function is undefined */}
4972 assume(!((phba->generation) == 3U));
4972 assume(!((phba->generation) == 2U));
4985 -__fswab32(task->cmdsn)
{
59 unsigned int tmp;
62 -__arch_swab32(val)
{
9 Ignored inline assembler code
10 return val;;
}
62 return tmp;;
}
4985 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
4985 -amap_set((void *)pwrb, 7U, tmp___6, 0U, tmp___5)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4987 -amap_mask(8U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4987 u32 __CPAchecker_TMP_4 = (u32 )(io_task->pwrb_handle->wrb_index);
4987 -amap_set((void *)pwrb, 1U, tmp___7, 8U, __CPAchecker_TMP_4)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4989 -amap_mask(16U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4989 -amap_set((void *)pwrb, 2U, tmp___8, 0U, io_task->psgl_handle->sgl_index)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4991 -amap_mask(25U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4991 -amap_set((void *)pwrb, 0U, tmp___9, 0U, task->data_count)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4993 -amap_mask(8U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
4993 u32 __CPAchecker_TMP_5 = (u32 )(io_task->pwrb_handle->nxt_wrb_index);
4993 -amap_set((void *)pwrb, 1U, tmp___10, 0U, __CPAchecker_TMP_5)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
4995 pwrb_typeoffset = 27U;
4999 int __CPAchecker_TMP_6 = (int)(task->hdr->opcode);
4999 switch (__CPAchecker_TMP_6 & 63)
5000 assume(!((__CPAchecker_TMP_6 & 63) == 3));
5005 assume(!((__CPAchecker_TMP_6 & 63) == 0));
5025 assume(!((__CPAchecker_TMP_6 & 63) == 4));
5029 assume(!((__CPAchecker_TMP_6 & 63) == 2));
5033 assume((__CPAchecker_TMP_6 & 63) == 6);
5034 (pwrb->dw)[0] = ((pwrb->dw)[0]) | ((u32 )(2 << ((int)pwrb_typeoffset)));
5035 -hwi_write_buffer(pwrb, task)
{
2497 struct iscsi_sge *psgl;
2498 struct beiscsi_io_task *io_task;
2499 struct beiscsi_conn *beiscsi_conn;
2500 struct beiscsi_hba *phba;
2501 unsigned char dsp_value;
2502 unsigned int tmp;
2503 unsigned int tmp___0;
2504 unsigned int tmp___1;
2505 unsigned int tmp___2;
2506 unsigned int tmp___3;
2507 unsigned int tmp___4;
2508 unsigned int tmp___5;
2509 unsigned int tmp___6;
2510 unsigned int tmp___7;
2511 unsigned int tmp___8;
2512 unsigned int tmp___9;
2513 unsigned int tmp___10;
2514 unsigned int tmp___11;
2515 unsigned int tmp___12;
2516 unsigned int tmp___13;
2517 unsigned int tmp___14;
2518 unsigned int tmp___15;
2519 unsigned int tmp___16;
2520 unsigned int tmp___17;
2521 unsigned int tmp___18;
2522 unsigned int tmp___19;
2523 unsigned int tmp___20;
2498 struct beiscsi_io_task *__CPAchecker_TMP_0 = (struct beiscsi_io_task *)(task->dd_data);
2498 io_task = __CPAchecker_TMP_0;
2499 beiscsi_conn = io_task->conn;
2500 phba = beiscsi_conn->phba;
2501 dsp_value = 0U;
2503 io_task->bhs_len = 322U;
2504 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2504 -amap_set((void *)pwrb, 5U, tmp, 0U, io_task->bhs_pa.u.a32.address_lo)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2506 -amap_mask(32U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(!(bitsize != 32U));
145 __CPAchecker_TMP_0 = 4294967295U;
145 return __CPAchecker_TMP_0;;
}
2506 -amap_set((void *)pwrb, 4U, tmp___0, 0U, io_task->bhs_pa.u.a32.address_hi)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2509 unsigned long __CPAchecker_TMP_1 = (unsigned long)(task->data);
2509 assume(__CPAchecker_TMP_1 != ((unsigned long)((char *)0)));
2512 dsp_value = (task->data_count) != 0U;
2514 assume(!((phba->generation) == 3U));
2514 assume(!((phba->generation) == 2U));
2518 -amap_mask(1U)
{
145 u32 __CPAchecker_TMP_0;
145 assume(bitsize != 32U);
145 __CPAchecker_TMP_0 = (u32 )((1 << ((int)bitsize)) + -1);
145 return __CPAchecker_TMP_0;;
}
2518 -amap_set((void *)pwrb, 11U, tmp___2, 28U, (u32 )dsp_value)
{
151 u32 *dw;
151 dw = ((u32 *)ptr) + ((unsigned long)dw_offset);
152 *dw = (*dw) & (~(mask << ((int)offset)));
153 *dw = (*dw) | ((mask & value) << ((int)offset));
154 return ;;
}
2522 assume(((unsigned int)dsp_value) != 0U);
2523 void *__CPAchecker_TMP_2 = (void *)(task->data);
2523 size_t __CPAchecker_TMP_3 = (size_t )(task->data_count);
2523 -pci_map_single(phba->pcidev, __CPAchecker_TMP_2, __CPAchecker_TMP_3, 1)
{
33 unsigned long long tmp;
32 struct device *__CPAchecker_TMP_0;
32 assume(((unsigned long)hwdev) != ((unsigned long)((struct pci_dev *)0)));
32 __CPAchecker_TMP_0 = &(hwdev->dev);
32 -ldv_dma_map_single_attrs_5(__CPAchecker_TMP_0, ptr, size, (enum dma_data_direction )direction, (struct dma_attrs *)0)
{
14 unsigned long long tmp;
13 -ldv_dma_map_single_attrs(dev, ptr, size, dir, attrs)
{
58 unsigned long long nonedetermined;
59 void *tmp;
58 tmp = ldv_undef_ptr() { /* Function call is skipped due to function is undefined */}
58 nonedetermined = (dma_addr_t )tmp;
61 assume(LDV_DMA_MAP_CALLS != 0);
61 -ldv_error()
{
15 LDV_ERROR:;
}
}
}
}
}
}
}
}
Source code
1 2 /** 3 * Copyright (C) 2005 - 2013 Emulex 4 * All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License version 2 8 * as published by the Free Software Foundation. The full GNU General 9 * Public License is included in this distribution in the file called COPYING. 10 * 11 * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 12 * 13 * Contact Information: 14 * linux-drivers@emulex.com 15 * 16 * Emulex 17 * 3333 Susan Street 18 * Costa Mesa, CA 92626 19 */ 20 21 #include <linux/reboot.h> 22 #include <linux/delay.h> 23 #include <linux/slab.h> 24 #include <linux/interrupt.h> 25 #include <linux/blkdev.h> 26 #include <linux/pci.h> 27 #include <linux/string.h> 28 #include <linux/kernel.h> 29 #include <linux/semaphore.h> 30 #include <linux/iscsi_boot_sysfs.h> 31 #include <linux/module.h> 32 #include <linux/bsg-lib.h> 33 34 #include <scsi/libiscsi.h> 35 #include <scsi/scsi_bsg_iscsi.h> 36 #include <scsi/scsi_netlink.h> 37 #include <scsi/scsi_transport_iscsi.h> 38 #include <scsi/scsi_transport.h> 39 #include <scsi/scsi_cmnd.h> 40 #include <scsi/scsi_device.h> 41 #include <scsi/scsi_host.h> 42 #include <scsi/scsi.h> 43 #include "be_main.h" 44 #include "be_iscsi.h" 45 #include "be_mgmt.h" 46 #include "be_cmds.h" 47 48 static unsigned int be_iopoll_budget = 10; 49 static unsigned int be_max_phys_size = 64; 50 static unsigned int enable_msix = 1; 51 52 MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table); 53 MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR); 54 MODULE_VERSION(BUILD_STR); 55 MODULE_AUTHOR("Emulex Corporation"); 56 MODULE_LICENSE("GPL"); 57 module_param(be_iopoll_budget, int, 0); 58 module_param(enable_msix, int, 0); 59 module_param(be_max_phys_size, uint, S_IRUGO); 60 MODULE_PARM_DESC(be_max_phys_size, 61 "Maximum Size (In Kilobytes) of physically contiguous " 62 "memory that can be allocated. Range is 16 - 128"); 63 64 #define beiscsi_disp_param(_name)\ 65 ssize_t \ 66 beiscsi_##_name##_disp(struct device *dev,\ 67 struct device_attribute *attrib, char *buf) \ 68 { \ 69 struct Scsi_Host *shost = class_to_shost(dev);\ 70 struct beiscsi_hba *phba = iscsi_host_priv(shost); \ 71 uint32_t param_val = 0; \ 72 param_val = phba->attr_##_name;\ 73 return snprintf(buf, PAGE_SIZE, "%d\n",\ 74 phba->attr_##_name);\ 75 } 76 77 #define beiscsi_change_param(_name, _minval, _maxval, _defaval)\ 78 int \ 79 beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ 80 {\ 81 if (val >= _minval && val <= _maxval) {\ 82 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,\ 83 "BA_%d : beiscsi_"#_name" updated "\ 84 "from 0x%x ==> 0x%x\n",\ 85 phba->attr_##_name, val); \ 86 phba->attr_##_name = val;\ 87 return 0;\ 88 } \ 89 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, \ 90 "BA_%d beiscsi_"#_name" attribute "\ 91 "cannot be updated to 0x%x, "\ 92 "range allowed is ["#_minval" - "#_maxval"]\n", val);\ 93 return -EINVAL;\ 94 } 95 96 #define beiscsi_store_param(_name) \ 97 ssize_t \ 98 beiscsi_##_name##_store(struct device *dev,\ 99 struct device_attribute *attr, const char *buf,\ 100 size_t count) \ 101 { \ 102 struct Scsi_Host *shost = class_to_shost(dev);\ 103 struct beiscsi_hba *phba = iscsi_host_priv(shost);\ 104 uint32_t param_val = 0;\ 105 if (!isdigit(buf[0]))\ 106 return -EINVAL;\ 107 if (sscanf(buf, "%i", &param_val) != 1)\ 108 return -EINVAL;\ 109 if (beiscsi_##_name##_change(phba, param_val) == 0) \ 110 return strlen(buf);\ 111 else \ 112 return -EINVAL;\ 113 } 114 115 #define beiscsi_init_param(_name, _minval, _maxval, _defval) \ 116 int \ 117 beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \ 118 { \ 119 if (val >= _minval && val <= _maxval) {\ 120 phba->attr_##_name = val;\ 121 return 0;\ 122 } \ 123 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,\ 124 "BA_%d beiscsi_"#_name" attribute " \ 125 "cannot be updated to 0x%x, "\ 126 "range allowed is ["#_minval" - "#_maxval"]\n", val);\ 127 phba->attr_##_name = _defval;\ 128 return -EINVAL;\ 129 } 130 131 #define BEISCSI_RW_ATTR(_name, _minval, _maxval, _defval, _descp) \ 132 static uint beiscsi_##_name = _defval;\ 133 module_param(beiscsi_##_name, uint, S_IRUGO);\ 134 MODULE_PARM_DESC(beiscsi_##_name, _descp);\ 135 beiscsi_disp_param(_name)\ 136 beiscsi_change_param(_name, _minval, _maxval, _defval)\ 137 beiscsi_store_param(_name)\ 138 beiscsi_init_param(_name, _minval, _maxval, _defval)\ 139 DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\ 140 beiscsi_##_name##_disp, beiscsi_##_name##_store) 141 142 /* 143 * When new log level added update the 144 * the MAX allowed value for log_enable 145 */ 146 BEISCSI_RW_ATTR(log_enable, 0x00, 147 0xFF, 0x00, "Enable logging Bit Mask\n" 148 "\t\t\t\tInitialization Events : 0x01\n" 149 "\t\t\t\tMailbox Events : 0x02\n" 150 "\t\t\t\tMiscellaneous Events : 0x04\n" 151 "\t\t\t\tError Handling : 0x08\n" 152 "\t\t\t\tIO Path Events : 0x10\n" 153 "\t\t\t\tConfiguration Path : 0x20\n" 154 "\t\t\t\tiSCSI Protocol : 0x40\n"); 155 156 DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL); 157 DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL); 158 DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL); 159 DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL); 160 DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO, 161 beiscsi_active_session_disp, NULL); 162 DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO, 163 beiscsi_free_session_disp, NULL); 164 struct device_attribute *beiscsi_attrs[] = { 165 &dev_attr_beiscsi_log_enable, 166 &dev_attr_beiscsi_drvr_ver, 167 &dev_attr_beiscsi_adapter_family, 168 &dev_attr_beiscsi_fw_ver, 169 &dev_attr_beiscsi_active_session_count, 170 &dev_attr_beiscsi_free_session_count, 171 &dev_attr_beiscsi_phys_port, 172 NULL, 173 }; 174 175 static char const *cqe_desc[] = { 176 "RESERVED_DESC", 177 "SOL_CMD_COMPLETE", 178 "SOL_CMD_KILLED_DATA_DIGEST_ERR", 179 "CXN_KILLED_PDU_SIZE_EXCEEDS_DSL", 180 "CXN_KILLED_BURST_LEN_MISMATCH", 181 "CXN_KILLED_AHS_RCVD", 182 "CXN_KILLED_HDR_DIGEST_ERR", 183 "CXN_KILLED_UNKNOWN_HDR", 184 "CXN_KILLED_STALE_ITT_TTT_RCVD", 185 "CXN_KILLED_INVALID_ITT_TTT_RCVD", 186 "CXN_KILLED_RST_RCVD", 187 "CXN_KILLED_TIMED_OUT", 188 "CXN_KILLED_RST_SENT", 189 "CXN_KILLED_FIN_RCVD", 190 "CXN_KILLED_BAD_UNSOL_PDU_RCVD", 191 "CXN_KILLED_BAD_WRB_INDEX_ERROR", 192 "CXN_KILLED_OVER_RUN_RESIDUAL", 193 "CXN_KILLED_UNDER_RUN_RESIDUAL", 194 "CMD_KILLED_INVALID_STATSN_RCVD", 195 "CMD_KILLED_INVALID_R2T_RCVD", 196 "CMD_CXN_KILLED_LUN_INVALID", 197 "CMD_CXN_KILLED_ICD_INVALID", 198 "CMD_CXN_KILLED_ITT_INVALID", 199 "CMD_CXN_KILLED_SEQ_OUTOFORDER", 200 "CMD_CXN_KILLED_INVALID_DATASN_RCVD", 201 "CXN_INVALIDATE_NOTIFY", 202 "CXN_INVALIDATE_INDEX_NOTIFY", 203 "CMD_INVALIDATED_NOTIFY", 204 "UNSOL_HDR_NOTIFY", 205 "UNSOL_DATA_NOTIFY", 206 "UNSOL_DATA_DIGEST_ERROR_NOTIFY", 207 "DRIVERMSG_NOTIFY", 208 "CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN", 209 "SOL_CMD_KILLED_DIF_ERR", 210 "CXN_KILLED_SYN_RCVD", 211 "CXN_KILLED_IMM_DATA_RCVD" 212 }; 213 214 static int beiscsi_slave_configure(struct scsi_device *sdev) 215 { 216 blk_queue_max_segment_size(sdev->request_queue, 65536); 217 return 0; 218 } 219 220 static int beiscsi_eh_abort(struct scsi_cmnd *sc) 221 { 222 struct iscsi_cls_session *cls_session; 223 struct iscsi_task *aborted_task = (struct iscsi_task *)sc->SCp.ptr; 224 struct beiscsi_io_task *aborted_io_task; 225 struct iscsi_conn *conn; 226 struct beiscsi_conn *beiscsi_conn; 227 struct beiscsi_hba *phba; 228 struct iscsi_session *session; 229 struct invalidate_command_table *inv_tbl; 230 struct be_dma_mem nonemb_cmd; 231 unsigned int cid, tag, num_invalidate; 232 233 cls_session = starget_to_session(scsi_target(sc->device)); 234 session = cls_session->dd_data; 235 236 spin_lock_bh(&session->lock); 237 if (!aborted_task || !aborted_task->sc) { 238 /* we raced */ 239 spin_unlock_bh(&session->lock); 240 return SUCCESS; 241 } 242 243 aborted_io_task = aborted_task->dd_data; 244 if (!aborted_io_task->scsi_cmnd) { 245 /* raced or invalid command */ 246 spin_unlock_bh(&session->lock); 247 return SUCCESS; 248 } 249 spin_unlock_bh(&session->lock); 250 /* Invalidate WRB Posted for this Task */ 251 AMAP_SET_BITS(struct amap_iscsi_wrb, invld, 252 aborted_io_task->pwrb_handle->pwrb, 253 1); 254 255 conn = aborted_task->conn; 256 beiscsi_conn = conn->dd_data; 257 phba = beiscsi_conn->phba; 258 259 /* invalidate iocb */ 260 cid = beiscsi_conn->beiscsi_conn_cid; 261 inv_tbl = phba->inv_tbl; 262 memset(inv_tbl, 0x0, sizeof(*inv_tbl)); 263 inv_tbl->cid = cid; 264 inv_tbl->icd = aborted_io_task->psgl_handle->sgl_index; 265 num_invalidate = 1; 266 nonemb_cmd.va = pci_alloc_consistent(phba->ctrl.pdev, 267 sizeof(struct invalidate_commands_params_in), 268 &nonemb_cmd.dma); 269 if (nonemb_cmd.va == NULL) { 270 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH, 271 "BM_%d : Failed to allocate memory for" 272 "mgmt_invalidate_icds\n"); 273 return FAILED; 274 } 275 nonemb_cmd.size = sizeof(struct invalidate_commands_params_in); 276 277 tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate, 278 cid, &nonemb_cmd); 279 if (!tag) { 280 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH, 281 "BM_%d : mgmt_invalidate_icds could not be" 282 "submitted\n"); 283 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, 284 nonemb_cmd.va, nonemb_cmd.dma); 285 286 return FAILED; 287 } 288 289 beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va); 290 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, 291 nonemb_cmd.va, nonemb_cmd.dma); 292 return iscsi_eh_abort(sc); 293 } 294 295 static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) 296 { 297 struct iscsi_task *abrt_task; 298 struct beiscsi_io_task *abrt_io_task; 299 struct iscsi_conn *conn; 300 struct beiscsi_conn *beiscsi_conn; 301 struct beiscsi_hba *phba; 302 struct iscsi_session *session; 303 struct iscsi_cls_session *cls_session; 304 struct invalidate_command_table *inv_tbl; 305 struct be_dma_mem nonemb_cmd; 306 unsigned int cid, tag, i, num_invalidate; 307 308 /* invalidate iocbs */ 309 cls_session = starget_to_session(scsi_target(sc->device)); 310 session = cls_session->dd_data; 311 spin_lock_bh(&session->lock); 312 if (!session->leadconn || session->state != ISCSI_STATE_LOGGED_IN) { 313 spin_unlock_bh(&session->lock); 314 return FAILED; 315 } 316 conn = session->leadconn; 317 beiscsi_conn = conn->dd_data; 318 phba = beiscsi_conn->phba; 319 cid = beiscsi_conn->beiscsi_conn_cid; 320 inv_tbl = phba->inv_tbl; 321 memset(inv_tbl, 0x0, sizeof(*inv_tbl) * BE2_CMDS_PER_CXN); 322 num_invalidate = 0; 323 for (i = 0; i < conn->session->cmds_max; i++) { 324 abrt_task = conn->session->cmds[i]; 325 abrt_io_task = abrt_task->dd_data; 326 if (!abrt_task->sc || abrt_task->state == ISCSI_TASK_FREE) 327 continue; 328 329 if (sc->device->lun != abrt_task->sc->device->lun) 330 continue; 331 332 /* Invalidate WRB Posted for this Task */ 333 AMAP_SET_BITS(struct amap_iscsi_wrb, invld, 334 abrt_io_task->pwrb_handle->pwrb, 335 1); 336 337 inv_tbl->cid = cid; 338 inv_tbl->icd = abrt_io_task->psgl_handle->sgl_index; 339 num_invalidate++; 340 inv_tbl++; 341 } 342 spin_unlock_bh(&session->lock); 343 inv_tbl = phba->inv_tbl; 344 345 nonemb_cmd.va = pci_alloc_consistent(phba->ctrl.pdev, 346 sizeof(struct invalidate_commands_params_in), 347 &nonemb_cmd.dma); 348 if (nonemb_cmd.va == NULL) { 349 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH, 350 "BM_%d : Failed to allocate memory for" 351 "mgmt_invalidate_icds\n"); 352 return FAILED; 353 } 354 nonemb_cmd.size = sizeof(struct invalidate_commands_params_in); 355 memset(nonemb_cmd.va, 0, nonemb_cmd.size); 356 tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate, 357 cid, &nonemb_cmd); 358 if (!tag) { 359 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH, 360 "BM_%d : mgmt_invalidate_icds could not be" 361 " submitted\n"); 362 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, 363 nonemb_cmd.va, nonemb_cmd.dma); 364 return FAILED; 365 } 366 367 beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va); 368 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, 369 nonemb_cmd.va, nonemb_cmd.dma); 370 return iscsi_eh_device_reset(sc); 371 } 372 373 static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf) 374 { 375 struct beiscsi_hba *phba = data; 376 struct mgmt_session_info *boot_sess = &phba->boot_sess; 377 struct mgmt_conn_info *boot_conn = &boot_sess->conn_list[0]; 378 char *str = buf; 379 int rc; 380 381 switch (type) { 382 case ISCSI_BOOT_TGT_NAME: 383 rc = sprintf(buf, "%.*s\n", 384 (int)strlen(boot_sess->target_name), 385 (char *)&boot_sess->target_name); 386 break; 387 case ISCSI_BOOT_TGT_IP_ADDR: 388 if (boot_conn->dest_ipaddr.ip_type == 0x1) 389 rc = sprintf(buf, "%pI4\n", 390 (char *)&boot_conn->dest_ipaddr.addr); 391 else 392 rc = sprintf(str, "%pI6\n", 393 (char *)&boot_conn->dest_ipaddr.addr); 394 break; 395 case ISCSI_BOOT_TGT_PORT: 396 rc = sprintf(str, "%d\n", boot_conn->dest_port); 397 break; 398 399 case ISCSI_BOOT_TGT_CHAP_NAME: 400 rc = sprintf(str, "%.*s\n", 401 boot_conn->negotiated_login_options.auth_data.chap. 402 target_chap_name_length, 403 (char *)&boot_conn->negotiated_login_options. 404 auth_data.chap.target_chap_name); 405 break; 406 case ISCSI_BOOT_TGT_CHAP_SECRET: 407 rc = sprintf(str, "%.*s\n", 408 boot_conn->negotiated_login_options.auth_data.chap. 409 target_secret_length, 410 (char *)&boot_conn->negotiated_login_options. 411 auth_data.chap.target_secret); 412 break; 413 case ISCSI_BOOT_TGT_REV_CHAP_NAME: 414 rc = sprintf(str, "%.*s\n", 415 boot_conn->negotiated_login_options.auth_data.chap. 416 intr_chap_name_length, 417 (char *)&boot_conn->negotiated_login_options. 418 auth_data.chap.intr_chap_name); 419 break; 420 case ISCSI_BOOT_TGT_REV_CHAP_SECRET: 421 rc = sprintf(str, "%.*s\n", 422 boot_conn->negotiated_login_options.auth_data.chap. 423 intr_secret_length, 424 (char *)&boot_conn->negotiated_login_options. 425 auth_data.chap.intr_secret); 426 break; 427 case ISCSI_BOOT_TGT_FLAGS: 428 rc = sprintf(str, "2\n"); 429 break; 430 case ISCSI_BOOT_TGT_NIC_ASSOC: 431 rc = sprintf(str, "0\n"); 432 break; 433 default: 434 rc = -ENOSYS; 435 break; 436 } 437 return rc; 438 } 439 440 static ssize_t beiscsi_show_boot_ini_info(void *data, int type, char *buf) 441 { 442 struct beiscsi_hba *phba = data; 443 char *str = buf; 444 int rc; 445 446 switch (type) { 447 case ISCSI_BOOT_INI_INITIATOR_NAME: 448 rc = sprintf(str, "%s\n", phba->boot_sess.initiator_iscsiname); 449 break; 450 default: 451 rc = -ENOSYS; 452 break; 453 } 454 return rc; 455 } 456 457 static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf) 458 { 459 struct beiscsi_hba *phba = data; 460 char *str = buf; 461 int rc; 462 463 switch (type) { 464 case ISCSI_BOOT_ETH_FLAGS: 465 rc = sprintf(str, "2\n"); 466 break; 467 case ISCSI_BOOT_ETH_INDEX: 468 rc = sprintf(str, "0\n"); 469 break; 470 case ISCSI_BOOT_ETH_MAC: 471 rc = beiscsi_get_macaddr(str, phba); 472 break; 473 default: 474 rc = -ENOSYS; 475 break; 476 } 477 return rc; 478 } 479 480 481 static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type) 482 { 483 umode_t rc; 484 485 switch (type) { 486 case ISCSI_BOOT_TGT_NAME: 487 case ISCSI_BOOT_TGT_IP_ADDR: 488 case ISCSI_BOOT_TGT_PORT: 489 case ISCSI_BOOT_TGT_CHAP_NAME: 490 case ISCSI_BOOT_TGT_CHAP_SECRET: 491 case ISCSI_BOOT_TGT_REV_CHAP_NAME: 492 case ISCSI_BOOT_TGT_REV_CHAP_SECRET: 493 case ISCSI_BOOT_TGT_NIC_ASSOC: 494 case ISCSI_BOOT_TGT_FLAGS: 495 rc = S_IRUGO; 496 break; 497 default: 498 rc = 0; 499 break; 500 } 501 return rc; 502 } 503 504 static umode_t beiscsi_ini_get_attr_visibility(void *data, int type) 505 { 506 umode_t rc; 507 508 switch (type) { 509 case ISCSI_BOOT_INI_INITIATOR_NAME: 510 rc = S_IRUGO; 511 break; 512 default: 513 rc = 0; 514 break; 515 } 516 return rc; 517 } 518 519 520 static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) 521 { 522 umode_t rc; 523 524 switch (type) { 525 case ISCSI_BOOT_ETH_FLAGS: 526 case ISCSI_BOOT_ETH_MAC: 527 case ISCSI_BOOT_ETH_INDEX: 528 rc = S_IRUGO; 529 break; 530 default: 531 rc = 0; 532 break; 533 } 534 return rc; 535 } 536 537 /*------------------- PCI Driver operations and data ----------------- */ 538 static DEFINE_PCI_DEVICE_TABLE(beiscsi_pci_id_table) = { 539 { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) }, 540 { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID2) }, 541 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, 542 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) }, 543 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID3) }, 544 { PCI_DEVICE(ELX_VENDOR_ID, OC_SKH_ID1) }, 545 { 0 } 546 }; 547 MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table); 548 549 550 static struct scsi_host_template beiscsi_sht = { 551 .module = THIS_MODULE, 552 .name = "Emulex 10Gbe open-iscsi Initiator Driver", 553 .proc_name = DRV_NAME, 554 .queuecommand = iscsi_queuecommand, 555 .change_queue_depth = iscsi_change_queue_depth, 556 .slave_configure = beiscsi_slave_configure, 557 .target_alloc = iscsi_target_alloc, 558 .eh_abort_handler = beiscsi_eh_abort, 559 .eh_device_reset_handler = beiscsi_eh_device_reset, 560 .eh_target_reset_handler = iscsi_eh_session_reset, 561 .shost_attrs = beiscsi_attrs, 562 .sg_tablesize = BEISCSI_SGLIST_ELEMENTS, 563 .can_queue = BE2_IO_DEPTH, 564 .this_id = -1, 565 .max_sectors = BEISCSI_MAX_SECTORS, 566 .cmd_per_lun = BEISCSI_CMD_PER_LUN, 567 .use_clustering = ENABLE_CLUSTERING, 568 .vendor_id = SCSI_NL_VID_TYPE_PCI | BE_VENDOR_ID, 569 570 }; 571 572 static struct scsi_transport_template *beiscsi_scsi_transport; 573 574 static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev) 575 { 576 struct beiscsi_hba *phba; 577 struct Scsi_Host *shost; 578 579 shost = iscsi_host_alloc(&beiscsi_sht, sizeof(*phba), 0); 580 if (!shost) { 581 dev_err(&pcidev->dev, 582 "beiscsi_hba_alloc - iscsi_host_alloc failed\n"); 583 return NULL; 584 } 585 shost->dma_boundary = pcidev->dma_mask; 586 shost->max_id = BE2_MAX_SESSIONS; 587 shost->max_channel = 0; 588 shost->max_cmd_len = BEISCSI_MAX_CMD_LEN; 589 shost->max_lun = BEISCSI_NUM_MAX_LUN; 590 shost->transportt = beiscsi_scsi_transport; 591 phba = iscsi_host_priv(shost); 592 memset(phba, 0, sizeof(*phba)); 593 phba->shost = shost; 594 phba->pcidev = pci_dev_get(pcidev); 595 pci_set_drvdata(pcidev, phba); 596 phba->interface_handle = 0xFFFFFFFF; 597 598 if (iscsi_host_add(shost, &phba->pcidev->dev)) 599 goto free_devices; 600 601 return phba; 602 603 free_devices: 604 pci_dev_put(phba->pcidev); 605 iscsi_host_free(phba->shost); 606 return NULL; 607 } 608 609 static void beiscsi_unmap_pci_function(struct beiscsi_hba *phba) 610 { 611 if (phba->csr_va) { 612 iounmap(phba->csr_va); 613 phba->csr_va = NULL; 614 } 615 if (phba->db_va) { 616 iounmap(phba->db_va); 617 phba->db_va = NULL; 618 } 619 if (phba->pci_va) { 620 iounmap(phba->pci_va); 621 phba->pci_va = NULL; 622 } 623 } 624 625 static int beiscsi_map_pci_bars(struct beiscsi_hba *phba, 626 struct pci_dev *pcidev) 627 { 628 u8 __iomem *addr; 629 int pcicfg_reg; 630 631 addr = ioremap_nocache(pci_resource_start(pcidev, 2), 632 pci_resource_len(pcidev, 2)); 633 if (addr == NULL) 634 return -ENOMEM; 635 phba->ctrl.csr = addr; 636 phba->csr_va = addr; 637 phba->csr_pa.u.a64.address = pci_resource_start(pcidev, 2); 638 639 addr = ioremap_nocache(pci_resource_start(pcidev, 4), 128 * 1024); 640 if (addr == NULL) 641 goto pci_map_err; 642 phba->ctrl.db = addr; 643 phba->db_va = addr; 644 phba->db_pa.u.a64.address = pci_resource_start(pcidev, 4); 645 646 if (phba->generation == BE_GEN2) 647 pcicfg_reg = 1; 648 else 649 pcicfg_reg = 0; 650 651 addr = ioremap_nocache(pci_resource_start(pcidev, pcicfg_reg), 652 pci_resource_len(pcidev, pcicfg_reg)); 653 654 if (addr == NULL) 655 goto pci_map_err; 656 phba->ctrl.pcicfg = addr; 657 phba->pci_va = addr; 658 phba->pci_pa.u.a64.address = pci_resource_start(pcidev, pcicfg_reg); 659 return 0; 660 661 pci_map_err: 662 beiscsi_unmap_pci_function(phba); 663 return -ENOMEM; 664 } 665 666 static int beiscsi_enable_pci(struct pci_dev *pcidev) 667 { 668 int ret; 669 670 ret = pci_enable_device(pcidev); 671 if (ret) { 672 dev_err(&pcidev->dev, 673 "beiscsi_enable_pci - enable device failed\n"); 674 return ret; 675 } 676 677 pci_set_master(pcidev); 678 if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) { 679 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32)); 680 if (ret) { 681 dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n"); 682 pci_disable_device(pcidev); 683 return ret; 684 } 685 } 686 return 0; 687 } 688 689 static int be_ctrl_init(struct beiscsi_hba *phba, struct pci_dev *pdev) 690 { 691 struct be_ctrl_info *ctrl = &phba->ctrl; 692 struct be_dma_mem *mbox_mem_alloc = &ctrl->mbox_mem_alloced; 693 struct be_dma_mem *mbox_mem_align = &ctrl->mbox_mem; 694 int status = 0; 695 696 ctrl->pdev = pdev; 697 status = beiscsi_map_pci_bars(phba, pdev); 698 if (status) 699 return status; 700 mbox_mem_alloc->size = sizeof(struct be_mcc_mailbox) + 16; 701 mbox_mem_alloc->va = pci_alloc_consistent(pdev, 702 mbox_mem_alloc->size, 703 &mbox_mem_alloc->dma); 704 if (!mbox_mem_alloc->va) { 705 beiscsi_unmap_pci_function(phba); 706 return -ENOMEM; 707 } 708 709 mbox_mem_align->size = sizeof(struct be_mcc_mailbox); 710 mbox_mem_align->va = PTR_ALIGN(mbox_mem_alloc->va, 16); 711 mbox_mem_align->dma = PTR_ALIGN(mbox_mem_alloc->dma, 16); 712 memset(mbox_mem_align->va, 0, sizeof(struct be_mcc_mailbox)); 713 spin_lock_init(&ctrl->mbox_lock); 714 spin_lock_init(&phba->ctrl.mcc_lock); 715 spin_lock_init(&phba->ctrl.mcc_cq_lock); 716 717 return status; 718 } 719 720 /** 721 * beiscsi_get_params()- Set the config paramters 722 * @phba: ptr device priv structure 723 **/ 724 static void beiscsi_get_params(struct beiscsi_hba *phba) 725 { 726 uint32_t total_cid_count = 0; 727 uint32_t total_icd_count = 0; 728 uint8_t ulp_num = 0; 729 730 total_cid_count = BEISCSI_GET_CID_COUNT(phba, BEISCSI_ULP0) + 731 BEISCSI_GET_CID_COUNT(phba, BEISCSI_ULP1); 732 733 for (ulp_num = 0; ulp_num < BEISCSI_ULP_COUNT; ulp_num++) { 734 uint32_t align_mask = 0; 735 uint32_t icd_post_per_page = 0; 736 uint32_t icd_count_unavailable = 0; 737 uint32_t icd_start = 0, icd_count = 0; 738 uint32_t icd_start_align = 0, icd_count_align = 0; 739 740 if (test_bit(ulp_num, &phba->fw_config.ulp_supported)) { 741 icd_start = phba->fw_config.iscsi_icd_start[ulp_num]; 742 icd_count = phba->fw_config.iscsi_icd_count[ulp_num]; 743 744 /* Get ICD count that can be posted on each page */ 745 icd_post_per_page = (PAGE_SIZE / (BE2_SGE * 746 sizeof(struct iscsi_sge))); 747 align_mask = (icd_post_per_page - 1); 748 749 /* Check if icd_start is aligned ICD per page posting */ 750 if (icd_start % icd_post_per_page) { 751 icd_start_align = ((icd_start + 752 icd_post_per_page) & 753 ~(align_mask)); 754 phba->fw_config. 755 iscsi_icd_start[ulp_num] = 756 icd_start_align; 757 } 758 759 icd_count_align = (icd_count & ~align_mask); 760 761 /* ICD discarded in the process of alignment */ 762 if (icd_start_align) 763 icd_count_unavailable = ((icd_start_align - 764 icd_start) + 765 (icd_count - 766 icd_count_align)); 767 768 /* Updated ICD count available */ 769 phba->fw_config.iscsi_icd_count[ulp_num] = (icd_count - 770 icd_count_unavailable); 771 772 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, 773 "BM_%d : Aligned ICD values\n" 774 "\t ICD Start : %d\n" 775 "\t ICD Count : %d\n" 776 "\t ICD Discarded : %d\n", 777 phba->fw_config. 778 iscsi_icd_start[ulp_num], 779 phba->fw_config. 780 iscsi_icd_count[ulp_num], 781 icd_count_unavailable); 782 break; 783 } 784 } 785 786 total_icd_count = phba->fw_config.iscsi_icd_count[ulp_num]; 787 phba->params.ios_per_ctrl = (total_icd_count - 788 (total_cid_count + 789 BE2_TMFS + BE2_NOPOUT_REQ)); 790 phba->params.cxns_per_ctrl = total_cid_count; 791 phba->params.asyncpdus_per_ctrl = total_cid_count; 792 phba->params.icds_per_ctrl = total_icd_count; 793 phba->params.num_sge_per_io = BE2_SGE; 794 phba->params.defpdu_hdr_sz = BE2_DEFPDU_HDR_SZ; 795 phba->params.defpdu_data_sz = BE2_DEFPDU_DATA_SZ; 796 phba->params.eq_timer = 64; 797 phba->params.num_eq_entries = 1024; 798 phba->params.num_cq_entries = 1024; 799 phba->params.wrbs_per_cxn = 256; 800 } 801 802 static void hwi_ring_eq_db(struct beiscsi_hba *phba, 803 unsigned int id, unsigned int clr_interrupt, 804 unsigned int num_processed, 805 unsigned char rearm, unsigned char event) 806 { 807 u32 val = 0; 808 val |= id & DB_EQ_RING_ID_MASK; 809 if (rearm) 810 val |= 1 << DB_EQ_REARM_SHIFT; 811 if (clr_interrupt) 812 val |= 1 << DB_EQ_CLR_SHIFT; 813 if (event) 814 val |= 1 << DB_EQ_EVNT_SHIFT; 815 val |= num_processed << DB_EQ_NUM_POPPED_SHIFT; 816 iowrite32(val, phba->db_va + DB_EQ_OFFSET); 817 } 818 819 /** 820 * be_isr_mcc - The isr routine of the driver. 821 * @irq: Not used 822 * @dev_id: Pointer to host adapter structure 823 */ 824 static irqreturn_t be_isr_mcc(int irq, void *dev_id) 825 { 826 struct beiscsi_hba *phba; 827 struct be_eq_entry *eqe = NULL; 828 struct be_queue_info *eq; 829 struct be_queue_info *mcc; 830 unsigned int num_eq_processed; 831 struct be_eq_obj *pbe_eq; 832 unsigned long flags; 833 834 pbe_eq = dev_id; 835 eq = &pbe_eq->q; 836 phba = pbe_eq->phba; 837 mcc = &phba->ctrl.mcc_obj.cq; 838 eqe = queue_tail_node(eq); 839 840 num_eq_processed = 0; 841 842 while (eqe->dw[offsetof(struct amap_eq_entry, valid) / 32] 843 & EQE_VALID_MASK) { 844 if (((eqe->dw[offsetof(struct amap_eq_entry, 845 resource_id) / 32] & 846 EQE_RESID_MASK) >> 16) == mcc->id) { 847 spin_lock_irqsave(&phba->isr_lock, flags); 848 pbe_eq->todo_mcc_cq = true; 849 spin_unlock_irqrestore(&phba->isr_lock, flags); 850 } 851 AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0); 852 queue_tail_inc(eq); 853 eqe = queue_tail_node(eq); 854 num_eq_processed++; 855 } 856 if (pbe_eq->todo_mcc_cq) 857 queue_work(phba->wq, &pbe_eq->work_cqs); 858 if (num_eq_processed) 859 hwi_ring_eq_db(phba, eq->id, 1, num_eq_processed, 1, 1); 860 861 return IRQ_HANDLED; 862 } 863 864 /** 865 * be_isr_msix - The isr routine of the driver. 866 * @irq: Not used 867 * @dev_id: Pointer to host adapter structure 868 */ 869 static irqreturn_t be_isr_msix(int irq, void *dev_id) 870 { 871 struct beiscsi_hba *phba; 872 struct be_eq_entry *eqe = NULL; 873 struct be_queue_info *eq; 874 struct be_queue_info *cq; 875 unsigned int num_eq_processed; 876 struct be_eq_obj *pbe_eq; 877 unsigned long flags; 878 879 pbe_eq = dev_id; 880 eq = &pbe_eq->q; 881 cq = pbe_eq->cq; 882 eqe = queue_tail_node(eq); 883 884 phba = pbe_eq->phba; 885 num_eq_processed = 0; 886 if (blk_iopoll_enabled) { 887 while (eqe->dw[offsetof(struct amap_eq_entry, valid) / 32] 888 & EQE_VALID_MASK) { 889 if (!blk_iopoll_sched_prep(&pbe_eq->iopoll)) 890 blk_iopoll_sched(&pbe_eq->iopoll); 891 892 AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0); 893 queue_tail_inc(eq); 894 eqe = queue_tail_node(eq); 895 num_eq_processed++; 896 } 897 } else { 898 while (eqe->dw[offsetof(struct amap_eq_entry, valid) / 32] 899 & EQE_VALID_MASK) { 900 spin_lock_irqsave(&phba->isr_lock, flags); 901 pbe_eq->todo_cq = true; 902 spin_unlock_irqrestore(&phba->isr_lock, flags); 903 AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0); 904 queue_tail_inc(eq); 905 eqe = queue_tail_node(eq); 906 num_eq_processed++; 907 } 908 909 if (pbe_eq->todo_cq) 910 queue_work(phba->wq, &pbe_eq->work_cqs); 911 } 912 913 if (num_eq_processed) 914 hwi_ring_eq_db(phba, eq->id, 1, num_eq_processed, 0, 1); 915 916 return IRQ_HANDLED; 917 } 918 919 /** 920 * be_isr - The isr routine of the driver. 921 * @irq: Not used 922 * @dev_id: Pointer to host adapter structure 923 */ 924 static irqreturn_t be_isr(int irq, void *dev_id) 925 { 926 struct beiscsi_hba *phba; 927 struct hwi_controller *phwi_ctrlr; 928 struct hwi_context_memory *phwi_context; 929 struct be_eq_entry *eqe = NULL; 930 struct be_queue_info *eq; 931 struct be_queue_info *cq; 932 struct be_queue_info *mcc; 933 unsigned long flags, index; 934 unsigned int num_mcceq_processed, num_ioeq_processed; 935 struct be_ctrl_info *ctrl; 936 struct be_eq_obj *pbe_eq; 937 int isr; 938 939 phba = dev_id; 940 ctrl = &phba->ctrl; 941 isr = ioread32(ctrl->csr + CEV_ISR0_OFFSET + 942 (PCI_FUNC(ctrl->pdev->devfn) * CEV_ISR_SIZE)); 943 if (!isr) 944 return IRQ_NONE; 945 946 phwi_ctrlr = phba->phwi_ctrlr; 947 phwi_context = phwi_ctrlr->phwi_ctxt; 948 pbe_eq = &phwi_context->be_eq[0]; 949 950 eq = &phwi_context->be_eq[0].q; 951 mcc = &phba->ctrl.mcc_obj.cq; 952 index = 0; 953 eqe = queue_tail_node(eq); 954 955 num_ioeq_processed = 0; 956 num_mcceq_processed = 0; 957 if (blk_iopoll_enabled) { 958 while (eqe->dw[offsetof(struct amap_eq_entry, valid) / 32] 959 & EQE_VALID_MASK) { 960 if (((eqe->dw[offsetof(struct amap_eq_entry, 961 resource_id) / 32] & 962 EQE_RESID_MASK) >> 16) == mcc->id) { 963 spin_lock_irqsave(&phba->isr_lock, flags); 964 pbe_eq->todo_mcc_cq = true; 965 spin_unlock_irqrestore(&phba->isr_lock, flags); 966 num_mcceq_processed++; 967 } else { 968 if (!blk_iopoll_sched_prep(&pbe_eq->iopoll)) 969 blk_iopoll_sched(&pbe_eq->iopoll); 970 num_ioeq_processed++; 971 } 972 AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0); 973 queue_tail_inc(eq); 974 eqe = queue_tail_node(eq); 975 } 976 if (num_ioeq_processed || num_mcceq_processed) { 977 if (pbe_eq->todo_mcc_cq) 978 queue_work(phba->wq, &pbe_eq->work_cqs); 979 980 if ((num_mcceq_processed) && (!num_ioeq_processed)) 981 hwi_ring_eq_db(phba, eq->id, 0, 982 (num_ioeq_processed + 983 num_mcceq_processed) , 1, 1); 984 else 985 hwi_ring_eq_db(phba, eq->id, 0, 986 (num_ioeq_processed + 987 num_mcceq_processed), 0, 1); 988 989 return IRQ_HANDLED; 990 } else 991 return IRQ_NONE; 992 } else { 993 cq = &phwi_context->be_cq[0]; 994 while (eqe->dw[offsetof(struct amap_eq_entry, valid) / 32] 995 & EQE_VALID_MASK) { 996 997 if (((eqe->dw[offsetof(struct amap_eq_entry, 998 resource_id) / 32] & 999 EQE_RESID_MASK) >> 16) != cq->id) { 1000 spin_lock_irqsave(&phba->isr_lock, flags); 1001 pbe_eq->todo_mcc_cq = true; 1002 spin_unlock_irqrestore(&phba->isr_lock, flags); 1003 } else { 1004 spin_lock_irqsave(&phba->isr_lock, flags); 1005 pbe_eq->todo_cq = true; 1006 spin_unlock_irqrestore(&phba->isr_lock, flags); 1007 } 1008 AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0); 1009 queue_tail_inc(eq); 1010 eqe = queue_tail_node(eq); 1011 num_ioeq_processed++; 1012 } 1013 if (pbe_eq->todo_cq || pbe_eq->todo_mcc_cq) 1014 queue_work(phba->wq, &pbe_eq->work_cqs); 1015 1016 if (num_ioeq_processed) { 1017 hwi_ring_eq_db(phba, eq->id, 0, 1018 num_ioeq_processed, 1, 1); 1019 return IRQ_HANDLED; 1020 } else 1021 return IRQ_NONE; 1022 } 1023 } 1024 1025 static int beiscsi_init_irqs(struct beiscsi_hba *phba) 1026 { 1027 struct pci_dev *pcidev = phba->pcidev; 1028 struct hwi_controller *phwi_ctrlr; 1029 struct hwi_context_memory *phwi_context; 1030 int ret, msix_vec, i, j; 1031 1032 phwi_ctrlr = phba->phwi_ctrlr; 1033 phwi_context = phwi_ctrlr->phwi_ctxt; 1034 1035 if (phba->msix_enabled) { 1036 for (i = 0; i < phba->num_cpus; i++) { 1037 phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, 1038 GFP_KERNEL); 1039 if (!phba->msi_name[i]) { 1040 ret = -ENOMEM; 1041 goto free_msix_irqs; 1042 } 1043 1044 sprintf(phba->msi_name[i], "beiscsi_%02x_%02x", 1045 phba->shost->host_no, i); 1046 msix_vec = phba->msix_entries[i].vector; 1047 ret = request_irq(msix_vec, be_isr_msix, 0, 1048 phba->msi_name[i], 1049 &phwi_context->be_eq[i]); 1050 if (ret) { 1051 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 1052 "BM_%d : beiscsi_init_irqs-Failed to" 1053 "register msix for i = %d\n", 1054 i); 1055 kfree(phba->msi_name[i]); 1056 goto free_msix_irqs; 1057 } 1058 } 1059 phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, GFP_KERNEL); 1060 if (!phba->msi_name[i]) { 1061 ret = -ENOMEM; 1062 goto free_msix_irqs; 1063 } 1064 sprintf(phba->msi_name[i], "beiscsi_mcc_%02x", 1065 phba->shost->host_no); 1066 msix_vec = phba->msix_entries[i].vector; 1067 ret = request_irq(msix_vec, be_isr_mcc, 0, phba->msi_name[i], 1068 &phwi_context->be_eq[i]); 1069 if (ret) { 1070 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT , 1071 "BM_%d : beiscsi_init_irqs-" 1072 "Failed to register beiscsi_msix_mcc\n"); 1073 kfree(phba->msi_name[i]); 1074 goto free_msix_irqs; 1075 } 1076 1077 } else { 1078 ret = request_irq(pcidev->irq, be_isr, IRQF_SHARED, 1079 "beiscsi", phba); 1080 if (ret) { 1081 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 1082 "BM_%d : beiscsi_init_irqs-" 1083 "Failed to register irq\\n"); 1084 return ret; 1085 } 1086 } 1087 return 0; 1088 free_msix_irqs: 1089 for (j = i - 1; j >= 0; j--) { 1090 kfree(phba->msi_name[j]); 1091 msix_vec = phba->msix_entries[j].vector; 1092 free_irq(msix_vec, &phwi_context->be_eq[j]); 1093 } 1094 return ret; 1095 } 1096 1097 static void hwi_ring_cq_db(struct beiscsi_hba *phba, 1098 unsigned int id, unsigned int num_processed, 1099 unsigned char rearm, unsigned char event) 1100 { 1101 u32 val = 0; 1102 val |= id & DB_CQ_RING_ID_MASK; 1103 if (rearm) 1104 val |= 1 << DB_CQ_REARM_SHIFT; 1105 val |= num_processed << DB_CQ_NUM_POPPED_SHIFT; 1106 iowrite32(val, phba->db_va + DB_CQ_OFFSET); 1107 } 1108 1109 static unsigned int 1110 beiscsi_process_async_pdu(struct beiscsi_conn *beiscsi_conn, 1111 struct beiscsi_hba *phba, 1112 struct pdu_base *ppdu, 1113 unsigned long pdu_len, 1114 void *pbuffer, unsigned long buf_len) 1115 { 1116 struct iscsi_conn *conn = beiscsi_conn->conn; 1117 struct iscsi_session *session = conn->session; 1118 struct iscsi_task *task; 1119 struct beiscsi_io_task *io_task; 1120 struct iscsi_hdr *login_hdr; 1121 1122 switch (ppdu->dw[offsetof(struct amap_pdu_base, opcode) / 32] & 1123 PDUBASE_OPCODE_MASK) { 1124 case ISCSI_OP_NOOP_IN: 1125 pbuffer = NULL; 1126 buf_len = 0; 1127 break; 1128 case ISCSI_OP_ASYNC_EVENT: 1129 break; 1130 case ISCSI_OP_REJECT: 1131 WARN_ON(!pbuffer); 1132 WARN_ON(!(buf_len == 48)); 1133 beiscsi_log(phba, KERN_ERR, 1134 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 1135 "BM_%d : In ISCSI_OP_REJECT\n"); 1136 break; 1137 case ISCSI_OP_LOGIN_RSP: 1138 case ISCSI_OP_TEXT_RSP: 1139 task = conn->login_task; 1140 io_task = task->dd_data; 1141 login_hdr = (struct iscsi_hdr *)ppdu; 1142 login_hdr->itt = io_task->libiscsi_itt; 1143 break; 1144 default: 1145 beiscsi_log(phba, KERN_WARNING, 1146 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 1147 "BM_%d : Unrecognized opcode 0x%x in async msg\n", 1148 (ppdu-> 1149 dw[offsetof(struct amap_pdu_base, opcode) / 32] 1150 & PDUBASE_OPCODE_MASK)); 1151 return 1; 1152 } 1153 1154 spin_lock_bh(&session->lock); 1155 __iscsi_complete_pdu(conn, (struct iscsi_hdr *)ppdu, pbuffer, buf_len); 1156 spin_unlock_bh(&session->lock); 1157 return 0; 1158 } 1159 1160 static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba) 1161 { 1162 struct sgl_handle *psgl_handle; 1163 1164 if (phba->io_sgl_hndl_avbl) { 1165 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO, 1166 "BM_%d : In alloc_io_sgl_handle," 1167 " io_sgl_alloc_index=%d\n", 1168 phba->io_sgl_alloc_index); 1169 1170 psgl_handle = phba->io_sgl_hndl_base[phba-> 1171 io_sgl_alloc_index]; 1172 phba->io_sgl_hndl_base[phba->io_sgl_alloc_index] = NULL; 1173 phba->io_sgl_hndl_avbl--; 1174 if (phba->io_sgl_alloc_index == (phba->params. 1175 ios_per_ctrl - 1)) 1176 phba->io_sgl_alloc_index = 0; 1177 else 1178 phba->io_sgl_alloc_index++; 1179 } else 1180 psgl_handle = NULL; 1181 return psgl_handle; 1182 } 1183 1184 static void 1185 free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle) 1186 { 1187 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO, 1188 "BM_%d : In free_,io_sgl_free_index=%d\n", 1189 phba->io_sgl_free_index); 1190 1191 if (phba->io_sgl_hndl_base[phba->io_sgl_free_index]) { 1192 /* 1193 * this can happen if clean_task is called on a task that 1194 * failed in xmit_task or alloc_pdu. 1195 */ 1196 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO, 1197 "BM_%d : Double Free in IO SGL io_sgl_free_index=%d," 1198 "value there=%p\n", phba->io_sgl_free_index, 1199 phba->io_sgl_hndl_base 1200 [phba->io_sgl_free_index]); 1201 return; 1202 } 1203 phba->io_sgl_hndl_base[phba->io_sgl_free_index] = psgl_handle; 1204 phba->io_sgl_hndl_avbl++; 1205 if (phba->io_sgl_free_index == (phba->params.ios_per_ctrl - 1)) 1206 phba->io_sgl_free_index = 0; 1207 else 1208 phba->io_sgl_free_index++; 1209 } 1210 1211 /** 1212 * alloc_wrb_handle - To allocate a wrb handle 1213 * @phba: The hba pointer 1214 * @cid: The cid to use for allocation 1215 * 1216 * This happens under session_lock until submission to chip 1217 */ 1218 struct wrb_handle *alloc_wrb_handle(struct beiscsi_hba *phba, unsigned int cid) 1219 { 1220 struct hwi_wrb_context *pwrb_context; 1221 struct hwi_controller *phwi_ctrlr; 1222 struct wrb_handle *pwrb_handle, *pwrb_handle_tmp; 1223 uint16_t cri_index = BE_GET_CRI_FROM_CID(cid); 1224 1225 phwi_ctrlr = phba->phwi_ctrlr; 1226 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; 1227 if (pwrb_context->wrb_handles_available >= 2) { 1228 pwrb_handle = pwrb_context->pwrb_handle_base[ 1229 pwrb_context->alloc_index]; 1230 pwrb_context->wrb_handles_available--; 1231 if (pwrb_context->alloc_index == 1232 (phba->params.wrbs_per_cxn - 1)) 1233 pwrb_context->alloc_index = 0; 1234 else 1235 pwrb_context->alloc_index++; 1236 pwrb_handle_tmp = pwrb_context->pwrb_handle_base[ 1237 pwrb_context->alloc_index]; 1238 pwrb_handle->nxt_wrb_index = pwrb_handle_tmp->wrb_index; 1239 } else 1240 pwrb_handle = NULL; 1241 return pwrb_handle; 1242 } 1243 1244 /** 1245 * free_wrb_handle - To free the wrb handle back to pool 1246 * @phba: The hba pointer 1247 * @pwrb_context: The context to free from 1248 * @pwrb_handle: The wrb_handle to free 1249 * 1250 * This happens under session_lock until submission to chip 1251 */ 1252 static void 1253 free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context, 1254 struct wrb_handle *pwrb_handle) 1255 { 1256 pwrb_context->pwrb_handle_base[pwrb_context->free_index] = pwrb_handle; 1257 pwrb_context->wrb_handles_available++; 1258 if (pwrb_context->free_index == (phba->params.wrbs_per_cxn - 1)) 1259 pwrb_context->free_index = 0; 1260 else 1261 pwrb_context->free_index++; 1262 1263 beiscsi_log(phba, KERN_INFO, 1264 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 1265 "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x" 1266 "wrb_handles_available=%d\n", 1267 pwrb_handle, pwrb_context->free_index, 1268 pwrb_context->wrb_handles_available); 1269 } 1270 1271 static struct sgl_handle *alloc_mgmt_sgl_handle(struct beiscsi_hba *phba) 1272 { 1273 struct sgl_handle *psgl_handle; 1274 1275 if (phba->eh_sgl_hndl_avbl) { 1276 psgl_handle = phba->eh_sgl_hndl_base[phba->eh_sgl_alloc_index]; 1277 phba->eh_sgl_hndl_base[phba->eh_sgl_alloc_index] = NULL; 1278 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, 1279 "BM_%d : mgmt_sgl_alloc_index=%d=0x%x\n", 1280 phba->eh_sgl_alloc_index, 1281 phba->eh_sgl_alloc_index); 1282 1283 phba->eh_sgl_hndl_avbl--; 1284 if (phba->eh_sgl_alloc_index == 1285 (phba->params.icds_per_ctrl - phba->params.ios_per_ctrl - 1286 1)) 1287 phba->eh_sgl_alloc_index = 0; 1288 else 1289 phba->eh_sgl_alloc_index++; 1290 } else 1291 psgl_handle = NULL; 1292 return psgl_handle; 1293 } 1294 1295 void 1296 free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle) 1297 { 1298 1299 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, 1300 "BM_%d : In free_mgmt_sgl_handle," 1301 "eh_sgl_free_index=%d\n", 1302 phba->eh_sgl_free_index); 1303 1304 if (phba->eh_sgl_hndl_base[phba->eh_sgl_free_index]) { 1305 /* 1306 * this can happen if clean_task is called on a task that 1307 * failed in xmit_task or alloc_pdu. 1308 */ 1309 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, 1310 "BM_%d : Double Free in eh SGL ," 1311 "eh_sgl_free_index=%d\n", 1312 phba->eh_sgl_free_index); 1313 return; 1314 } 1315 phba->eh_sgl_hndl_base[phba->eh_sgl_free_index] = psgl_handle; 1316 phba->eh_sgl_hndl_avbl++; 1317 if (phba->eh_sgl_free_index == 1318 (phba->params.icds_per_ctrl - phba->params.ios_per_ctrl - 1)) 1319 phba->eh_sgl_free_index = 0; 1320 else 1321 phba->eh_sgl_free_index++; 1322 } 1323 1324 static void 1325 be_complete_io(struct beiscsi_conn *beiscsi_conn, 1326 struct iscsi_task *task, 1327 struct common_sol_cqe *csol_cqe) 1328 { 1329 struct beiscsi_io_task *io_task = task->dd_data; 1330 struct be_status_bhs *sts_bhs = 1331 (struct be_status_bhs *)io_task->cmd_bhs; 1332 struct iscsi_conn *conn = beiscsi_conn->conn; 1333 unsigned char *sense; 1334 u32 resid = 0, exp_cmdsn, max_cmdsn; 1335 u8 rsp, status, flags; 1336 1337 exp_cmdsn = csol_cqe->exp_cmdsn; 1338 max_cmdsn = (csol_cqe->exp_cmdsn + 1339 csol_cqe->cmd_wnd - 1); 1340 rsp = csol_cqe->i_resp; 1341 status = csol_cqe->i_sts; 1342 flags = csol_cqe->i_flags; 1343 resid = csol_cqe->res_cnt; 1344 1345 if (!task->sc) { 1346 if (io_task->scsi_cmnd) 1347 scsi_dma_unmap(io_task->scsi_cmnd); 1348 1349 return; 1350 } 1351 task->sc->result = (DID_OK << 16) | status; 1352 if (rsp != ISCSI_STATUS_CMD_COMPLETED) { 1353 task->sc->result = DID_ERROR << 16; 1354 goto unmap; 1355 } 1356 1357 /* bidi not initially supported */ 1358 if (flags & (ISCSI_FLAG_CMD_UNDERFLOW | ISCSI_FLAG_CMD_OVERFLOW)) { 1359 if (!status && (flags & ISCSI_FLAG_CMD_OVERFLOW)) 1360 task->sc->result = DID_ERROR << 16; 1361 1362 if (flags & ISCSI_FLAG_CMD_UNDERFLOW) { 1363 scsi_set_resid(task->sc, resid); 1364 if (!status && (scsi_bufflen(task->sc) - resid < 1365 task->sc->underflow)) 1366 task->sc->result = DID_ERROR << 16; 1367 } 1368 } 1369 1370 if (status == SAM_STAT_CHECK_CONDITION) { 1371 u16 sense_len; 1372 unsigned short *slen = (unsigned short *)sts_bhs->sense_info; 1373 1374 sense = sts_bhs->sense_info + sizeof(unsigned short); 1375 sense_len = be16_to_cpu(*slen); 1376 memcpy(task->sc->sense_buffer, sense, 1377 min_t(u16, sense_len, SCSI_SENSE_BUFFERSIZE)); 1378 } 1379 1380 if (io_task->cmd_bhs->iscsi_hdr.flags & ISCSI_FLAG_CMD_READ) 1381 conn->rxdata_octets += resid; 1382 unmap: 1383 scsi_dma_unmap(io_task->scsi_cmnd); 1384 iscsi_complete_scsi_task(task, exp_cmdsn, max_cmdsn); 1385 } 1386 1387 static void 1388 be_complete_logout(struct beiscsi_conn *beiscsi_conn, 1389 struct iscsi_task *task, 1390 struct common_sol_cqe *csol_cqe) 1391 { 1392 struct iscsi_logout_rsp *hdr; 1393 struct beiscsi_io_task *io_task = task->dd_data; 1394 struct iscsi_conn *conn = beiscsi_conn->conn; 1395 1396 hdr = (struct iscsi_logout_rsp *)task->hdr; 1397 hdr->opcode = ISCSI_OP_LOGOUT_RSP; 1398 hdr->t2wait = 5; 1399 hdr->t2retain = 0; 1400 hdr->flags = csol_cqe->i_flags; 1401 hdr->response = csol_cqe->i_resp; 1402 hdr->exp_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn); 1403 hdr->max_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn + 1404 csol_cqe->cmd_wnd - 1); 1405 1406 hdr->dlength[0] = 0; 1407 hdr->dlength[1] = 0; 1408 hdr->dlength[2] = 0; 1409 hdr->hlength = 0; 1410 hdr->itt = io_task->libiscsi_itt; 1411 __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0); 1412 } 1413 1414 static void 1415 be_complete_tmf(struct beiscsi_conn *beiscsi_conn, 1416 struct iscsi_task *task, 1417 struct common_sol_cqe *csol_cqe) 1418 { 1419 struct iscsi_tm_rsp *hdr; 1420 struct iscsi_conn *conn = beiscsi_conn->conn; 1421 struct beiscsi_io_task *io_task = task->dd_data; 1422 1423 hdr = (struct iscsi_tm_rsp *)task->hdr; 1424 hdr->opcode = ISCSI_OP_SCSI_TMFUNC_RSP; 1425 hdr->flags = csol_cqe->i_flags; 1426 hdr->response = csol_cqe->i_resp; 1427 hdr->exp_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn); 1428 hdr->max_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn + 1429 csol_cqe->cmd_wnd - 1); 1430 1431 hdr->itt = io_task->libiscsi_itt; 1432 __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0); 1433 } 1434 1435 static void 1436 hwi_complete_drvr_msgs(struct beiscsi_conn *beiscsi_conn, 1437 struct beiscsi_hba *phba, struct sol_cqe *psol) 1438 { 1439 struct hwi_wrb_context *pwrb_context; 1440 struct wrb_handle *pwrb_handle = NULL; 1441 struct hwi_controller *phwi_ctrlr; 1442 struct iscsi_task *task; 1443 struct beiscsi_io_task *io_task; 1444 uint16_t wrb_index, cid, cri_index; 1445 1446 phwi_ctrlr = phba->phwi_ctrlr; 1447 if (is_chip_be2_be3r(phba)) { 1448 wrb_index = AMAP_GET_BITS(struct amap_it_dmsg_cqe, 1449 wrb_idx, psol); 1450 cid = AMAP_GET_BITS(struct amap_it_dmsg_cqe, 1451 cid, psol); 1452 } else { 1453 wrb_index = AMAP_GET_BITS(struct amap_it_dmsg_cqe_v2, 1454 wrb_idx, psol); 1455 cid = AMAP_GET_BITS(struct amap_it_dmsg_cqe_v2, 1456 cid, psol); 1457 } 1458 1459 cri_index = BE_GET_CRI_FROM_CID(cid); 1460 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; 1461 pwrb_handle = pwrb_context->pwrb_handle_basestd[wrb_index]; 1462 task = pwrb_handle->pio_handle; 1463 1464 io_task = task->dd_data; 1465 memset(io_task->pwrb_handle->pwrb, 0, sizeof(struct iscsi_wrb)); 1466 iscsi_put_task(task); 1467 } 1468 1469 static void 1470 be_complete_nopin_resp(struct beiscsi_conn *beiscsi_conn, 1471 struct iscsi_task *task, 1472 struct common_sol_cqe *csol_cqe) 1473 { 1474 struct iscsi_nopin *hdr; 1475 struct iscsi_conn *conn = beiscsi_conn->conn; 1476 struct beiscsi_io_task *io_task = task->dd_data; 1477 1478 hdr = (struct iscsi_nopin *)task->hdr; 1479 hdr->flags = csol_cqe->i_flags; 1480 hdr->exp_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn); 1481 hdr->max_cmdsn = cpu_to_be32(csol_cqe->exp_cmdsn + 1482 csol_cqe->cmd_wnd - 1); 1483 1484 hdr->opcode = ISCSI_OP_NOOP_IN; 1485 hdr->itt = io_task->libiscsi_itt; 1486 __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0); 1487 } 1488 1489 static void adapter_get_sol_cqe(struct beiscsi_hba *phba, 1490 struct sol_cqe *psol, 1491 struct common_sol_cqe *csol_cqe) 1492 { 1493 if (is_chip_be2_be3r(phba)) { 1494 csol_cqe->exp_cmdsn = AMAP_GET_BITS(struct amap_sol_cqe, 1495 i_exp_cmd_sn, psol); 1496 csol_cqe->res_cnt = AMAP_GET_BITS(struct amap_sol_cqe, 1497 i_res_cnt, psol); 1498 csol_cqe->cmd_wnd = AMAP_GET_BITS(struct amap_sol_cqe, 1499 i_cmd_wnd, psol); 1500 csol_cqe->wrb_index = AMAP_GET_BITS(struct amap_sol_cqe, 1501 wrb_index, psol); 1502 csol_cqe->cid = AMAP_GET_BITS(struct amap_sol_cqe, 1503 cid, psol); 1504 csol_cqe->hw_sts = AMAP_GET_BITS(struct amap_sol_cqe, 1505 hw_sts, psol); 1506 csol_cqe->i_resp = AMAP_GET_BITS(struct amap_sol_cqe, 1507 i_resp, psol); 1508 csol_cqe->i_sts = AMAP_GET_BITS(struct amap_sol_cqe, 1509 i_sts, psol); 1510 csol_cqe->i_flags = AMAP_GET_BITS(struct amap_sol_cqe, 1511 i_flags, psol); 1512 } else { 1513 csol_cqe->exp_cmdsn = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1514 i_exp_cmd_sn, psol); 1515 csol_cqe->res_cnt = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1516 i_res_cnt, psol); 1517 csol_cqe->wrb_index = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1518 wrb_index, psol); 1519 csol_cqe->cid = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1520 cid, psol); 1521 csol_cqe->hw_sts = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1522 hw_sts, psol); 1523 csol_cqe->cmd_wnd = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1524 i_cmd_wnd, psol); 1525 if (AMAP_GET_BITS(struct amap_sol_cqe_v2, 1526 cmd_cmpl, psol)) 1527 csol_cqe->i_sts = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1528 i_sts, psol); 1529 else 1530 csol_cqe->i_resp = AMAP_GET_BITS(struct amap_sol_cqe_v2, 1531 i_sts, psol); 1532 if (AMAP_GET_BITS(struct amap_sol_cqe_v2, 1533 u, psol)) 1534 csol_cqe->i_flags = ISCSI_FLAG_CMD_UNDERFLOW; 1535 1536 if (AMAP_GET_BITS(struct amap_sol_cqe_v2, 1537 o, psol)) 1538 csol_cqe->i_flags |= ISCSI_FLAG_CMD_OVERFLOW; 1539 } 1540 } 1541 1542 1543 static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn, 1544 struct beiscsi_hba *phba, struct sol_cqe *psol) 1545 { 1546 struct hwi_wrb_context *pwrb_context; 1547 struct wrb_handle *pwrb_handle; 1548 struct iscsi_wrb *pwrb = NULL; 1549 struct hwi_controller *phwi_ctrlr; 1550 struct iscsi_task *task; 1551 unsigned int type; 1552 struct iscsi_conn *conn = beiscsi_conn->conn; 1553 struct iscsi_session *session = conn->session; 1554 struct common_sol_cqe csol_cqe = {0}; 1555 uint16_t cri_index = 0; 1556 1557 phwi_ctrlr = phba->phwi_ctrlr; 1558 1559 /* Copy the elements to a common structure */ 1560 adapter_get_sol_cqe(phba, psol, &csol_cqe); 1561 1562 cri_index = BE_GET_CRI_FROM_CID(csol_cqe.cid); 1563 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; 1564 1565 pwrb_handle = pwrb_context->pwrb_handle_basestd[ 1566 csol_cqe.wrb_index]; 1567 1568 task = pwrb_handle->pio_handle; 1569 pwrb = pwrb_handle->pwrb; 1570 type = ((struct beiscsi_io_task *)task->dd_data)->wrb_type; 1571 1572 spin_lock_bh(&session->lock); 1573 switch (type) { 1574 case HWH_TYPE_IO: 1575 case HWH_TYPE_IO_RD: 1576 if ((task->hdr->opcode & ISCSI_OPCODE_MASK) == 1577 ISCSI_OP_NOOP_OUT) 1578 be_complete_nopin_resp(beiscsi_conn, task, &csol_cqe); 1579 else 1580 be_complete_io(beiscsi_conn, task, &csol_cqe); 1581 break; 1582 1583 case HWH_TYPE_LOGOUT: 1584 if ((task->hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGOUT) 1585 be_complete_logout(beiscsi_conn, task, &csol_cqe); 1586 else 1587 be_complete_tmf(beiscsi_conn, task, &csol_cqe); 1588 break; 1589 1590 case HWH_TYPE_LOGIN: 1591 beiscsi_log(phba, KERN_ERR, 1592 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 1593 "BM_%d :\t\t No HWH_TYPE_LOGIN Expected in" 1594 " hwi_complete_cmd- Solicited path\n"); 1595 break; 1596 1597 case HWH_TYPE_NOP: 1598 be_complete_nopin_resp(beiscsi_conn, task, &csol_cqe); 1599 break; 1600 1601 default: 1602 beiscsi_log(phba, KERN_WARNING, 1603 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 1604 "BM_%d : In hwi_complete_cmd, unknown type = %d" 1605 "wrb_index 0x%x CID 0x%x\n", type, 1606 csol_cqe.wrb_index, 1607 csol_cqe.cid); 1608 break; 1609 } 1610 1611 spin_unlock_bh(&session->lock); 1612 } 1613 1614 static struct list_head *hwi_get_async_busy_list(struct hwi_async_pdu_context 1615 *pasync_ctx, unsigned int is_header, 1616 unsigned int host_write_ptr) 1617 { 1618 if (is_header) 1619 return &pasync_ctx->async_entry[host_write_ptr]. 1620 header_busy_list; 1621 else 1622 return &pasync_ctx->async_entry[host_write_ptr].data_busy_list; 1623 } 1624 1625 static struct async_pdu_handle * 1626 hwi_get_async_handle(struct beiscsi_hba *phba, 1627 struct beiscsi_conn *beiscsi_conn, 1628 struct hwi_async_pdu_context *pasync_ctx, 1629 struct i_t_dpdu_cqe *pdpdu_cqe, unsigned int *pcq_index) 1630 { 1631 struct be_bus_address phys_addr; 1632 struct list_head *pbusy_list; 1633 struct async_pdu_handle *pasync_handle = NULL; 1634 unsigned char is_header = 0; 1635 unsigned int index, dpl; 1636 1637 if (is_chip_be2_be3r(phba)) { 1638 dpl = AMAP_GET_BITS(struct amap_i_t_dpdu_cqe, 1639 dpl, pdpdu_cqe); 1640 index = AMAP_GET_BITS(struct amap_i_t_dpdu_cqe, 1641 index, pdpdu_cqe); 1642 } else { 1643 dpl = AMAP_GET_BITS(struct amap_i_t_dpdu_cqe_v2, 1644 dpl, pdpdu_cqe); 1645 index = AMAP_GET_BITS(struct amap_i_t_dpdu_cqe_v2, 1646 index, pdpdu_cqe); 1647 } 1648 1649 phys_addr.u.a32.address_lo = 1650 (pdpdu_cqe->dw[offsetof(struct amap_i_t_dpdu_cqe, 1651 db_addr_lo) / 32] - dpl); 1652 phys_addr.u.a32.address_hi = 1653 pdpdu_cqe->dw[offsetof(struct amap_i_t_dpdu_cqe, 1654 db_addr_hi) / 32]; 1655 1656 phys_addr.u.a64.address = 1657 *((unsigned long long *)(&phys_addr.u.a64.address)); 1658 1659 switch (pdpdu_cqe->dw[offsetof(struct amap_i_t_dpdu_cqe, code) / 32] 1660 & PDUCQE_CODE_MASK) { 1661 case UNSOL_HDR_NOTIFY: 1662 is_header = 1; 1663 1664 pbusy_list = hwi_get_async_busy_list(pasync_ctx, 1665 is_header, index); 1666 break; 1667 case UNSOL_DATA_NOTIFY: 1668 pbusy_list = hwi_get_async_busy_list(pasync_ctx, 1669 is_header, index); 1670 break; 1671 default: 1672 pbusy_list = NULL; 1673 beiscsi_log(phba, KERN_WARNING, 1674 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 1675 "BM_%d : Unexpected code=%d\n", 1676 pdpdu_cqe->dw[offsetof(struct amap_i_t_dpdu_cqe, 1677 code) / 32] & PDUCQE_CODE_MASK); 1678 return NULL; 1679 } 1680 1681 WARN_ON(list_empty(pbusy_list)); 1682 list_for_each_entry(pasync_handle, pbusy_list, link) { 1683 if (pasync_handle->pa.u.a64.address == phys_addr.u.a64.address) 1684 break; 1685 } 1686 1687 WARN_ON(!pasync_handle); 1688 1689 pasync_handle->cri = BE_GET_ASYNC_CRI_FROM_CID( 1690 beiscsi_conn->beiscsi_conn_cid); 1691 pasync_handle->is_header = is_header; 1692 pasync_handle->buffer_len = dpl; 1693 *pcq_index = index; 1694 1695 return pasync_handle; 1696 } 1697 1698 static unsigned int 1699 hwi_update_async_writables(struct beiscsi_hba *phba, 1700 struct hwi_async_pdu_context *pasync_ctx, 1701 unsigned int is_header, unsigned int cq_index) 1702 { 1703 struct list_head *pbusy_list; 1704 struct async_pdu_handle *pasync_handle; 1705 unsigned int num_entries, writables = 0; 1706 unsigned int *pep_read_ptr, *pwritables; 1707 1708 num_entries = pasync_ctx->num_entries; 1709 if (is_header) { 1710 pep_read_ptr = &pasync_ctx->async_header.ep_read_ptr; 1711 pwritables = &pasync_ctx->async_header.writables; 1712 } else { 1713 pep_read_ptr = &pasync_ctx->async_data.ep_read_ptr; 1714 pwritables = &pasync_ctx->async_data.writables; 1715 } 1716 1717 while ((*pep_read_ptr) != cq_index) { 1718 (*pep_read_ptr)++; 1719 *pep_read_ptr = (*pep_read_ptr) % num_entries; 1720 1721 pbusy_list = hwi_get_async_busy_list(pasync_ctx, is_header, 1722 *pep_read_ptr); 1723 if (writables == 0) 1724 WARN_ON(list_empty(pbusy_list)); 1725 1726 if (!list_empty(pbusy_list)) { 1727 pasync_handle = list_entry(pbusy_list->next, 1728 struct async_pdu_handle, 1729 link); 1730 WARN_ON(!pasync_handle); 1731 pasync_handle->consumed = 1; 1732 } 1733 1734 writables++; 1735 } 1736 1737 if (!writables) { 1738 beiscsi_log(phba, KERN_ERR, 1739 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 1740 "BM_%d : Duplicate notification received - index 0x%x!!\n", 1741 cq_index); 1742 WARN_ON(1); 1743 } 1744 1745 *pwritables = *pwritables + writables; 1746 return 0; 1747 } 1748 1749 static void hwi_free_async_msg(struct beiscsi_hba *phba, 1750 struct hwi_async_pdu_context *pasync_ctx, 1751 unsigned int cri) 1752 { 1753 struct async_pdu_handle *pasync_handle, *tmp_handle; 1754 struct list_head *plist; 1755 1756 plist = &pasync_ctx->async_entry[cri].wait_queue.list; 1757 list_for_each_entry_safe(pasync_handle, tmp_handle, plist, link) { 1758 list_del(&pasync_handle->link); 1759 1760 if (pasync_handle->is_header) { 1761 list_add_tail(&pasync_handle->link, 1762 &pasync_ctx->async_header.free_list); 1763 pasync_ctx->async_header.free_entries++; 1764 } else { 1765 list_add_tail(&pasync_handle->link, 1766 &pasync_ctx->async_data.free_list); 1767 pasync_ctx->async_data.free_entries++; 1768 } 1769 } 1770 1771 INIT_LIST_HEAD(&pasync_ctx->async_entry[cri].wait_queue.list); 1772 pasync_ctx->async_entry[cri].wait_queue.hdr_received = 0; 1773 pasync_ctx->async_entry[cri].wait_queue.bytes_received = 0; 1774 } 1775 1776 static struct phys_addr * 1777 hwi_get_ring_address(struct hwi_async_pdu_context *pasync_ctx, 1778 unsigned int is_header, unsigned int host_write_ptr) 1779 { 1780 struct phys_addr *pasync_sge = NULL; 1781 1782 if (is_header) 1783 pasync_sge = pasync_ctx->async_header.ring_base; 1784 else 1785 pasync_sge = pasync_ctx->async_data.ring_base; 1786 1787 return pasync_sge + host_write_ptr; 1788 } 1789 1790 static void hwi_post_async_buffers(struct beiscsi_hba *phba, 1791 unsigned int is_header, uint8_t ulp_num) 1792 { 1793 struct hwi_controller *phwi_ctrlr; 1794 struct hwi_async_pdu_context *pasync_ctx; 1795 struct async_pdu_handle *pasync_handle; 1796 struct list_head *pfree_link, *pbusy_list; 1797 struct phys_addr *pasync_sge; 1798 unsigned int ring_id, num_entries; 1799 unsigned int host_write_num, doorbell_offset; 1800 unsigned int writables; 1801 unsigned int i = 0; 1802 u32 doorbell = 0; 1803 1804 phwi_ctrlr = phba->phwi_ctrlr; 1805 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr, ulp_num); 1806 num_entries = pasync_ctx->num_entries; 1807 1808 if (is_header) { 1809 writables = min(pasync_ctx->async_header.writables, 1810 pasync_ctx->async_header.free_entries); 1811 pfree_link = pasync_ctx->async_header.free_list.next; 1812 host_write_num = pasync_ctx->async_header.host_write_ptr; 1813 ring_id = phwi_ctrlr->default_pdu_hdr[ulp_num].id; 1814 doorbell_offset = phwi_ctrlr->default_pdu_hdr[ulp_num]. 1815 doorbell_offset; 1816 } else { 1817 writables = min(pasync_ctx->async_data.writables, 1818 pasync_ctx->async_data.free_entries); 1819 pfree_link = pasync_ctx->async_data.free_list.next; 1820 host_write_num = pasync_ctx->async_data.host_write_ptr; 1821 ring_id = phwi_ctrlr->default_pdu_data[ulp_num].id; 1822 doorbell_offset = phwi_ctrlr->default_pdu_data[ulp_num]. 1823 doorbell_offset; 1824 } 1825 1826 writables = (writables / 8) * 8; 1827 if (writables) { 1828 for (i = 0; i < writables; i++) { 1829 pbusy_list = 1830 hwi_get_async_busy_list(pasync_ctx, is_header, 1831 host_write_num); 1832 pasync_handle = 1833 list_entry(pfree_link, struct async_pdu_handle, 1834 link); 1835 WARN_ON(!pasync_handle); 1836 pasync_handle->consumed = 0; 1837 1838 pfree_link = pfree_link->next; 1839 1840 pasync_sge = hwi_get_ring_address(pasync_ctx, 1841 is_header, host_write_num); 1842 1843 pasync_sge->hi = pasync_handle->pa.u.a32.address_lo; 1844 pasync_sge->lo = pasync_handle->pa.u.a32.address_hi; 1845 1846 list_move(&pasync_handle->link, pbusy_list); 1847 1848 host_write_num++; 1849 host_write_num = host_write_num % num_entries; 1850 } 1851 1852 if (is_header) { 1853 pasync_ctx->async_header.host_write_ptr = 1854 host_write_num; 1855 pasync_ctx->async_header.free_entries -= writables; 1856 pasync_ctx->async_header.writables -= writables; 1857 pasync_ctx->async_header.busy_entries += writables; 1858 } else { 1859 pasync_ctx->async_data.host_write_ptr = host_write_num; 1860 pasync_ctx->async_data.free_entries -= writables; 1861 pasync_ctx->async_data.writables -= writables; 1862 pasync_ctx->async_data.busy_entries += writables; 1863 } 1864 1865 doorbell |= ring_id & DB_DEF_PDU_RING_ID_MASK; 1866 doorbell |= 1 << DB_DEF_PDU_REARM_SHIFT; 1867 doorbell |= 0 << DB_DEF_PDU_EVENT_SHIFT; 1868 doorbell |= (writables & DB_DEF_PDU_CQPROC_MASK) 1869 << DB_DEF_PDU_CQPROC_SHIFT; 1870 1871 iowrite32(doorbell, phba->db_va + doorbell_offset); 1872 } 1873 } 1874 1875 static void hwi_flush_default_pdu_buffer(struct beiscsi_hba *phba, 1876 struct beiscsi_conn *beiscsi_conn, 1877 struct i_t_dpdu_cqe *pdpdu_cqe) 1878 { 1879 struct hwi_controller *phwi_ctrlr; 1880 struct hwi_async_pdu_context *pasync_ctx; 1881 struct async_pdu_handle *pasync_handle = NULL; 1882 unsigned int cq_index = -1; 1883 uint16_t cri_index = BE_GET_CRI_FROM_CID( 1884 beiscsi_conn->beiscsi_conn_cid); 1885 1886 phwi_ctrlr = phba->phwi_ctrlr; 1887 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr, 1888 BEISCSI_GET_ULP_FROM_CRI(phwi_ctrlr, 1889 cri_index)); 1890 1891 pasync_handle = hwi_get_async_handle(phba, beiscsi_conn, pasync_ctx, 1892 pdpdu_cqe, &cq_index); 1893 BUG_ON(pasync_handle->is_header != 0); 1894 if (pasync_handle->consumed == 0) 1895 hwi_update_async_writables(phba, pasync_ctx, 1896 pasync_handle->is_header, cq_index); 1897 1898 hwi_free_async_msg(phba, pasync_ctx, pasync_handle->cri); 1899 hwi_post_async_buffers(phba, pasync_handle->is_header, 1900 BEISCSI_GET_ULP_FROM_CRI(phwi_ctrlr, 1901 cri_index)); 1902 } 1903 1904 static unsigned int 1905 hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn, 1906 struct beiscsi_hba *phba, 1907 struct hwi_async_pdu_context *pasync_ctx, unsigned short cri) 1908 { 1909 struct list_head *plist; 1910 struct async_pdu_handle *pasync_handle; 1911 void *phdr = NULL; 1912 unsigned int hdr_len = 0, buf_len = 0; 1913 unsigned int status, index = 0, offset = 0; 1914 void *pfirst_buffer = NULL; 1915 unsigned int num_buf = 0; 1916 1917 plist = &pasync_ctx->async_entry[cri].wait_queue.list; 1918 1919 list_for_each_entry(pasync_handle, plist, link) { 1920 if (index == 0) { 1921 phdr = pasync_handle->pbuffer; 1922 hdr_len = pasync_handle->buffer_len; 1923 } else { 1924 buf_len = pasync_handle->buffer_len; 1925 if (!num_buf) { 1926 pfirst_buffer = pasync_handle->pbuffer; 1927 num_buf++; 1928 } 1929 memcpy(pfirst_buffer + offset, 1930 pasync_handle->pbuffer, buf_len); 1931 offset += buf_len; 1932 } 1933 index++; 1934 } 1935 1936 status = beiscsi_process_async_pdu(beiscsi_conn, phba, 1937 phdr, hdr_len, pfirst_buffer, 1938 offset); 1939 1940 hwi_free_async_msg(phba, pasync_ctx, cri); 1941 return 0; 1942 } 1943 1944 static unsigned int 1945 hwi_gather_async_pdu(struct beiscsi_conn *beiscsi_conn, 1946 struct beiscsi_hba *phba, 1947 struct async_pdu_handle *pasync_handle) 1948 { 1949 struct hwi_async_pdu_context *pasync_ctx; 1950 struct hwi_controller *phwi_ctrlr; 1951 unsigned int bytes_needed = 0, status = 0; 1952 unsigned short cri = pasync_handle->cri; 1953 struct pdu_base *ppdu; 1954 1955 phwi_ctrlr = phba->phwi_ctrlr; 1956 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr, 1957 BEISCSI_GET_ULP_FROM_CRI(phwi_ctrlr, 1958 BE_GET_CRI_FROM_CID(beiscsi_conn-> 1959 beiscsi_conn_cid))); 1960 1961 list_del(&pasync_handle->link); 1962 if (pasync_handle->is_header) { 1963 pasync_ctx->async_header.busy_entries--; 1964 if (pasync_ctx->async_entry[cri].wait_queue.hdr_received) { 1965 hwi_free_async_msg(phba, pasync_ctx, cri); 1966 BUG(); 1967 } 1968 1969 pasync_ctx->async_entry[cri].wait_queue.bytes_received = 0; 1970 pasync_ctx->async_entry[cri].wait_queue.hdr_received = 1; 1971 pasync_ctx->async_entry[cri].wait_queue.hdr_len = 1972 (unsigned short)pasync_handle->buffer_len; 1973 list_add_tail(&pasync_handle->link, 1974 &pasync_ctx->async_entry[cri].wait_queue.list); 1975 1976 ppdu = pasync_handle->pbuffer; 1977 bytes_needed = ((((ppdu->dw[offsetof(struct amap_pdu_base, 1978 data_len_hi) / 32] & PDUBASE_DATALENHI_MASK) << 8) & 1979 0xFFFF0000) | ((be16_to_cpu((ppdu-> 1980 dw[offsetof(struct amap_pdu_base, data_len_lo) / 32] 1981 & PDUBASE_DATALENLO_MASK) >> 16)) & 0x0000FFFF)); 1982 1983 if (status == 0) { 1984 pasync_ctx->async_entry[cri].wait_queue.bytes_needed = 1985 bytes_needed; 1986 1987 if (bytes_needed == 0) 1988 status = hwi_fwd_async_msg(beiscsi_conn, phba, 1989 pasync_ctx, cri); 1990 } 1991 } else { 1992 pasync_ctx->async_data.busy_entries--; 1993 if (pasync_ctx->async_entry[cri].wait_queue.hdr_received) { 1994 list_add_tail(&pasync_handle->link, 1995 &pasync_ctx->async_entry[cri].wait_queue. 1996 list); 1997 pasync_ctx->async_entry[cri].wait_queue. 1998 bytes_received += 1999 (unsigned short)pasync_handle->buffer_len; 2000 2001 if (pasync_ctx->async_entry[cri].wait_queue. 2002 bytes_received >= 2003 pasync_ctx->async_entry[cri].wait_queue. 2004 bytes_needed) 2005 status = hwi_fwd_async_msg(beiscsi_conn, phba, 2006 pasync_ctx, cri); 2007 } 2008 } 2009 return status; 2010 } 2011 2012 static void hwi_process_default_pdu_ring(struct beiscsi_conn *beiscsi_conn, 2013 struct beiscsi_hba *phba, 2014 struct i_t_dpdu_cqe *pdpdu_cqe) 2015 { 2016 struct hwi_controller *phwi_ctrlr; 2017 struct hwi_async_pdu_context *pasync_ctx; 2018 struct async_pdu_handle *pasync_handle = NULL; 2019 unsigned int cq_index = -1; 2020 uint16_t cri_index = BE_GET_CRI_FROM_CID( 2021 beiscsi_conn->beiscsi_conn_cid); 2022 2023 phwi_ctrlr = phba->phwi_ctrlr; 2024 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr, 2025 BEISCSI_GET_ULP_FROM_CRI(phwi_ctrlr, 2026 cri_index)); 2027 2028 pasync_handle = hwi_get_async_handle(phba, beiscsi_conn, pasync_ctx, 2029 pdpdu_cqe, &cq_index); 2030 2031 if (pasync_handle->consumed == 0) 2032 hwi_update_async_writables(phba, pasync_ctx, 2033 pasync_handle->is_header, cq_index); 2034 2035 hwi_gather_async_pdu(beiscsi_conn, phba, pasync_handle); 2036 hwi_post_async_buffers(phba, pasync_handle->is_header, 2037 BEISCSI_GET_ULP_FROM_CRI( 2038 phwi_ctrlr, cri_index)); 2039 } 2040 2041 static void beiscsi_process_mcc_isr(struct beiscsi_hba *phba) 2042 { 2043 struct be_queue_info *mcc_cq; 2044 struct be_mcc_compl *mcc_compl; 2045 unsigned int num_processed = 0; 2046 2047 mcc_cq = &phba->ctrl.mcc_obj.cq; 2048 mcc_compl = queue_tail_node(mcc_cq); 2049 mcc_compl->flags = le32_to_cpu(mcc_compl->flags); 2050 while (mcc_compl->flags & CQE_FLAGS_VALID_MASK) { 2051 2052 if (num_processed >= 32) { 2053 hwi_ring_cq_db(phba, mcc_cq->id, 2054 num_processed, 0, 0); 2055 num_processed = 0; 2056 } 2057 if (mcc_compl->flags & CQE_FLAGS_ASYNC_MASK) { 2058 /* Interpret flags as an async trailer */ 2059 if (is_link_state_evt(mcc_compl->flags)) 2060 /* Interpret compl as a async link evt */ 2061 beiscsi_async_link_state_process(phba, 2062 (struct be_async_event_link_state *) mcc_compl); 2063 else 2064 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX, 2065 "BM_%d : Unsupported Async Event, flags" 2066 " = 0x%08x\n", 2067 mcc_compl->flags); 2068 } else if (mcc_compl->flags & CQE_FLAGS_COMPLETED_MASK) { 2069 be_mcc_compl_process_isr(&phba->ctrl, mcc_compl); 2070 atomic_dec(&phba->ctrl.mcc_obj.q.used); 2071 } 2072 2073 mcc_compl->flags = 0; 2074 queue_tail_inc(mcc_cq); 2075 mcc_compl = queue_tail_node(mcc_cq); 2076 mcc_compl->flags = le32_to_cpu(mcc_compl->flags); 2077 num_processed++; 2078 } 2079 2080 if (num_processed > 0) 2081 hwi_ring_cq_db(phba, mcc_cq->id, num_processed, 1, 0); 2082 2083 } 2084 2085 /** 2086 * beiscsi_process_cq()- Process the Completion Queue 2087 * @pbe_eq: Event Q on which the Completion has come 2088 * 2089 * return 2090 * Number of Completion Entries processed. 2091 **/ 2092 static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq) 2093 { 2094 struct be_queue_info *cq; 2095 struct sol_cqe *sol; 2096 struct dmsg_cqe *dmsg; 2097 unsigned int num_processed = 0; 2098 unsigned int tot_nump = 0; 2099 unsigned short code = 0, cid = 0; 2100 uint16_t cri_index = 0; 2101 struct beiscsi_conn *beiscsi_conn; 2102 struct beiscsi_endpoint *beiscsi_ep; 2103 struct iscsi_endpoint *ep; 2104 struct beiscsi_hba *phba; 2105 2106 cq = pbe_eq->cq; 2107 sol = queue_tail_node(cq); 2108 phba = pbe_eq->phba; 2109 2110 while (sol->dw[offsetof(struct amap_sol_cqe, valid) / 32] & 2111 CQE_VALID_MASK) { 2112 be_dws_le_to_cpu(sol, sizeof(struct sol_cqe)); 2113 2114 code = (sol->dw[offsetof(struct amap_sol_cqe, code) / 2115 32] & CQE_CODE_MASK); 2116 2117 /* Get the CID */ 2118 if (is_chip_be2_be3r(phba)) { 2119 cid = AMAP_GET_BITS(struct amap_sol_cqe, cid, sol); 2120 } else { 2121 if ((code == DRIVERMSG_NOTIFY) || 2122 (code == UNSOL_HDR_NOTIFY) || 2123 (code == UNSOL_DATA_NOTIFY)) 2124 cid = AMAP_GET_BITS( 2125 struct amap_i_t_dpdu_cqe_v2, 2126 cid, sol); 2127 else 2128 cid = AMAP_GET_BITS(struct amap_sol_cqe_v2, 2129 cid, sol); 2130 } 2131 2132 cri_index = BE_GET_CRI_FROM_CID(cid); 2133 ep = phba->ep_array[cri_index]; 2134 beiscsi_ep = ep->dd_data; 2135 beiscsi_conn = beiscsi_ep->conn; 2136 2137 if (num_processed >= 32) { 2138 hwi_ring_cq_db(phba, cq->id, 2139 num_processed, 0, 0); 2140 tot_nump += num_processed; 2141 num_processed = 0; 2142 } 2143 2144 switch (code) { 2145 case SOL_CMD_COMPLETE: 2146 hwi_complete_cmd(beiscsi_conn, phba, sol); 2147 break; 2148 case DRIVERMSG_NOTIFY: 2149 beiscsi_log(phba, KERN_INFO, 2150 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2151 "BM_%d : Received %s[%d] on CID : %d\n", 2152 cqe_desc[code], code, cid); 2153 2154 dmsg = (struct dmsg_cqe *)sol; 2155 hwi_complete_drvr_msgs(beiscsi_conn, phba, sol); 2156 break; 2157 case UNSOL_HDR_NOTIFY: 2158 beiscsi_log(phba, KERN_INFO, 2159 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2160 "BM_%d : Received %s[%d] on CID : %d\n", 2161 cqe_desc[code], code, cid); 2162 2163 spin_lock_bh(&phba->async_pdu_lock); 2164 hwi_process_default_pdu_ring(beiscsi_conn, phba, 2165 (struct i_t_dpdu_cqe *)sol); 2166 spin_unlock_bh(&phba->async_pdu_lock); 2167 break; 2168 case UNSOL_DATA_NOTIFY: 2169 beiscsi_log(phba, KERN_INFO, 2170 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 2171 "BM_%d : Received %s[%d] on CID : %d\n", 2172 cqe_desc[code], code, cid); 2173 2174 spin_lock_bh(&phba->async_pdu_lock); 2175 hwi_process_default_pdu_ring(beiscsi_conn, phba, 2176 (struct i_t_dpdu_cqe *)sol); 2177 spin_unlock_bh(&phba->async_pdu_lock); 2178 break; 2179 case CXN_INVALIDATE_INDEX_NOTIFY: 2180 case CMD_INVALIDATED_NOTIFY: 2181 case CXN_INVALIDATE_NOTIFY: 2182 beiscsi_log(phba, KERN_ERR, 2183 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2184 "BM_%d : Ignoring %s[%d] on CID : %d\n", 2185 cqe_desc[code], code, cid); 2186 break; 2187 case SOL_CMD_KILLED_DATA_DIGEST_ERR: 2188 case CMD_KILLED_INVALID_STATSN_RCVD: 2189 case CMD_KILLED_INVALID_R2T_RCVD: 2190 case CMD_CXN_KILLED_LUN_INVALID: 2191 case CMD_CXN_KILLED_ICD_INVALID: 2192 case CMD_CXN_KILLED_ITT_INVALID: 2193 case CMD_CXN_KILLED_SEQ_OUTOFORDER: 2194 case CMD_CXN_KILLED_INVALID_DATASN_RCVD: 2195 beiscsi_log(phba, KERN_ERR, 2196 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 2197 "BM_%d : Cmd Notification %s[%d] on CID : %d\n", 2198 cqe_desc[code], code, cid); 2199 break; 2200 case UNSOL_DATA_DIGEST_ERROR_NOTIFY: 2201 beiscsi_log(phba, KERN_ERR, 2202 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2203 "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n", 2204 cqe_desc[code], code, cid); 2205 spin_lock_bh(&phba->async_pdu_lock); 2206 hwi_flush_default_pdu_buffer(phba, beiscsi_conn, 2207 (struct i_t_dpdu_cqe *) sol); 2208 spin_unlock_bh(&phba->async_pdu_lock); 2209 break; 2210 case CXN_KILLED_PDU_SIZE_EXCEEDS_DSL: 2211 case CXN_KILLED_BURST_LEN_MISMATCH: 2212 case CXN_KILLED_AHS_RCVD: 2213 case CXN_KILLED_HDR_DIGEST_ERR: 2214 case CXN_KILLED_UNKNOWN_HDR: 2215 case CXN_KILLED_STALE_ITT_TTT_RCVD: 2216 case CXN_KILLED_INVALID_ITT_TTT_RCVD: 2217 case CXN_KILLED_TIMED_OUT: 2218 case CXN_KILLED_FIN_RCVD: 2219 case CXN_KILLED_RST_SENT: 2220 case CXN_KILLED_RST_RCVD: 2221 case CXN_KILLED_BAD_UNSOL_PDU_RCVD: 2222 case CXN_KILLED_BAD_WRB_INDEX_ERROR: 2223 case CXN_KILLED_OVER_RUN_RESIDUAL: 2224 case CXN_KILLED_UNDER_RUN_RESIDUAL: 2225 case CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN: 2226 beiscsi_log(phba, KERN_ERR, 2227 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2228 "BM_%d : Event %s[%d] received on CID : %d\n", 2229 cqe_desc[code], code, cid); 2230 if (beiscsi_conn) 2231 iscsi_conn_failure(beiscsi_conn->conn, 2232 ISCSI_ERR_CONN_FAILED); 2233 break; 2234 default: 2235 beiscsi_log(phba, KERN_ERR, 2236 BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG, 2237 "BM_%d : Invalid CQE Event Received Code : %d" 2238 "CID 0x%x...\n", 2239 code, cid); 2240 break; 2241 } 2242 2243 AMAP_SET_BITS(struct amap_sol_cqe, valid, sol, 0); 2244 queue_tail_inc(cq); 2245 sol = queue_tail_node(cq); 2246 num_processed++; 2247 } 2248 2249 if (num_processed > 0) { 2250 tot_nump += num_processed; 2251 hwi_ring_cq_db(phba, cq->id, num_processed, 1, 0); 2252 } 2253 return tot_nump; 2254 } 2255 2256 void beiscsi_process_all_cqs(struct work_struct *work) 2257 { 2258 unsigned long flags; 2259 struct hwi_controller *phwi_ctrlr; 2260 struct hwi_context_memory *phwi_context; 2261 struct beiscsi_hba *phba; 2262 struct be_eq_obj *pbe_eq = 2263 container_of(work, struct be_eq_obj, work_cqs); 2264 2265 phba = pbe_eq->phba; 2266 phwi_ctrlr = phba->phwi_ctrlr; 2267 phwi_context = phwi_ctrlr->phwi_ctxt; 2268 2269 if (pbe_eq->todo_mcc_cq) { 2270 spin_lock_irqsave(&phba->isr_lock, flags); 2271 pbe_eq->todo_mcc_cq = false; 2272 spin_unlock_irqrestore(&phba->isr_lock, flags); 2273 beiscsi_process_mcc_isr(phba); 2274 } 2275 2276 if (pbe_eq->todo_cq) { 2277 spin_lock_irqsave(&phba->isr_lock, flags); 2278 pbe_eq->todo_cq = false; 2279 spin_unlock_irqrestore(&phba->isr_lock, flags); 2280 beiscsi_process_cq(pbe_eq); 2281 } 2282 2283 /* rearm EQ for further interrupts */ 2284 hwi_ring_eq_db(phba, pbe_eq->q.id, 0, 0, 1, 1); 2285 } 2286 2287 static int be_iopoll(struct blk_iopoll *iop, int budget) 2288 { 2289 unsigned int ret; 2290 struct beiscsi_hba *phba; 2291 struct be_eq_obj *pbe_eq; 2292 2293 pbe_eq = container_of(iop, struct be_eq_obj, iopoll); 2294 ret = beiscsi_process_cq(pbe_eq); 2295 if (ret < budget) { 2296 phba = pbe_eq->phba; 2297 blk_iopoll_complete(iop); 2298 beiscsi_log(phba, KERN_INFO, 2299 BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO, 2300 "BM_%d : rearm pbe_eq->q.id =%d\n", 2301 pbe_eq->q.id); 2302 hwi_ring_eq_db(phba, pbe_eq->q.id, 0, 0, 1, 1); 2303 } 2304 return ret; 2305 } 2306 2307 static void 2308 hwi_write_sgl_v2(struct iscsi_wrb *pwrb, struct scatterlist *sg, 2309 unsigned int num_sg, struct beiscsi_io_task *io_task) 2310 { 2311 struct iscsi_sge *psgl; 2312 unsigned int sg_len, index; 2313 unsigned int sge_len = 0; 2314 unsigned long long addr; 2315 struct scatterlist *l_sg; 2316 unsigned int offset; 2317 2318 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, iscsi_bhs_addr_lo, pwrb, 2319 io_task->bhs_pa.u.a32.address_lo); 2320 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, iscsi_bhs_addr_hi, pwrb, 2321 io_task->bhs_pa.u.a32.address_hi); 2322 2323 l_sg = sg; 2324 for (index = 0; (index < num_sg) && (index < 2); index++, 2325 sg = sg_next(sg)) { 2326 if (index == 0) { 2327 sg_len = sg_dma_len(sg); 2328 addr = (u64) sg_dma_address(sg); 2329 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2330 sge0_addr_lo, pwrb, 2331 lower_32_bits(addr)); 2332 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2333 sge0_addr_hi, pwrb, 2334 upper_32_bits(addr)); 2335 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2336 sge0_len, pwrb, 2337 sg_len); 2338 sge_len = sg_len; 2339 } else { 2340 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge1_r2t_offset, 2341 pwrb, sge_len); 2342 sg_len = sg_dma_len(sg); 2343 addr = (u64) sg_dma_address(sg); 2344 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2345 sge1_addr_lo, pwrb, 2346 lower_32_bits(addr)); 2347 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2348 sge1_addr_hi, pwrb, 2349 upper_32_bits(addr)); 2350 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, 2351 sge1_len, pwrb, 2352 sg_len); 2353 } 2354 } 2355 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag; 2356 memset(psgl, 0, sizeof(*psgl) * BE2_SGE); 2357 2358 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2); 2359 2360 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2361 io_task->bhs_pa.u.a32.address_hi); 2362 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2363 io_task->bhs_pa.u.a32.address_lo); 2364 2365 if (num_sg == 1) { 2366 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge0_last, pwrb, 2367 1); 2368 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge1_last, pwrb, 2369 0); 2370 } else if (num_sg == 2) { 2371 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge0_last, pwrb, 2372 0); 2373 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge1_last, pwrb, 2374 1); 2375 } else { 2376 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge0_last, pwrb, 2377 0); 2378 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, sge1_last, pwrb, 2379 0); 2380 } 2381 2382 sg = l_sg; 2383 psgl++; 2384 psgl++; 2385 offset = 0; 2386 for (index = 0; index < num_sg; index++, sg = sg_next(sg), psgl++) { 2387 sg_len = sg_dma_len(sg); 2388 addr = (u64) sg_dma_address(sg); 2389 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2390 lower_32_bits(addr)); 2391 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2392 upper_32_bits(addr)); 2393 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, sg_len); 2394 AMAP_SET_BITS(struct amap_iscsi_sge, sge_offset, psgl, offset); 2395 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 0); 2396 offset += sg_len; 2397 } 2398 psgl--; 2399 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 1); 2400 } 2401 2402 static void 2403 hwi_write_sgl(struct iscsi_wrb *pwrb, struct scatterlist *sg, 2404 unsigned int num_sg, struct beiscsi_io_task *io_task) 2405 { 2406 struct iscsi_sge *psgl; 2407 unsigned int sg_len, index; 2408 unsigned int sge_len = 0; 2409 unsigned long long addr; 2410 struct scatterlist *l_sg; 2411 unsigned int offset; 2412 2413 AMAP_SET_BITS(struct amap_iscsi_wrb, iscsi_bhs_addr_lo, pwrb, 2414 io_task->bhs_pa.u.a32.address_lo); 2415 AMAP_SET_BITS(struct amap_iscsi_wrb, iscsi_bhs_addr_hi, pwrb, 2416 io_task->bhs_pa.u.a32.address_hi); 2417 2418 l_sg = sg; 2419 for (index = 0; (index < num_sg) && (index < 2); index++, 2420 sg = sg_next(sg)) { 2421 if (index == 0) { 2422 sg_len = sg_dma_len(sg); 2423 addr = (u64) sg_dma_address(sg); 2424 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_addr_lo, pwrb, 2425 ((u32)(addr & 0xFFFFFFFF))); 2426 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_addr_hi, pwrb, 2427 ((u32)(addr >> 32))); 2428 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_len, pwrb, 2429 sg_len); 2430 sge_len = sg_len; 2431 } else { 2432 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_r2t_offset, 2433 pwrb, sge_len); 2434 sg_len = sg_dma_len(sg); 2435 addr = (u64) sg_dma_address(sg); 2436 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_addr_lo, pwrb, 2437 ((u32)(addr & 0xFFFFFFFF))); 2438 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_addr_hi, pwrb, 2439 ((u32)(addr >> 32))); 2440 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_len, pwrb, 2441 sg_len); 2442 } 2443 } 2444 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag; 2445 memset(psgl, 0, sizeof(*psgl) * BE2_SGE); 2446 2447 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2); 2448 2449 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2450 io_task->bhs_pa.u.a32.address_hi); 2451 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2452 io_task->bhs_pa.u.a32.address_lo); 2453 2454 if (num_sg == 1) { 2455 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_last, pwrb, 2456 1); 2457 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_last, pwrb, 2458 0); 2459 } else if (num_sg == 2) { 2460 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_last, pwrb, 2461 0); 2462 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_last, pwrb, 2463 1); 2464 } else { 2465 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_last, pwrb, 2466 0); 2467 AMAP_SET_BITS(struct amap_iscsi_wrb, sge1_last, pwrb, 2468 0); 2469 } 2470 sg = l_sg; 2471 psgl++; 2472 psgl++; 2473 offset = 0; 2474 for (index = 0; index < num_sg; index++, sg = sg_next(sg), psgl++) { 2475 sg_len = sg_dma_len(sg); 2476 addr = (u64) sg_dma_address(sg); 2477 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2478 (addr & 0xFFFFFFFF)); 2479 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2480 (addr >> 32)); 2481 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, sg_len); 2482 AMAP_SET_BITS(struct amap_iscsi_sge, sge_offset, psgl, offset); 2483 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 0); 2484 offset += sg_len; 2485 } 2486 psgl--; 2487 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 1); 2488 } 2489 2490 /** 2491 * hwi_write_buffer()- Populate the WRB with task info 2492 * @pwrb: ptr to the WRB entry 2493 * @task: iscsi task which is to be executed 2494 **/ 2495 static void hwi_write_buffer(struct iscsi_wrb *pwrb, struct iscsi_task *task) 2496 { 2497 struct iscsi_sge *psgl; 2498 struct beiscsi_io_task *io_task = task->dd_data; 2499 struct beiscsi_conn *beiscsi_conn = io_task->conn; 2500 struct beiscsi_hba *phba = beiscsi_conn->phba; 2501 uint8_t dsp_value = 0; 2502 2503 io_task->bhs_len = sizeof(struct be_nonio_bhs) - 2; 2504 AMAP_SET_BITS(struct amap_iscsi_wrb, iscsi_bhs_addr_lo, pwrb, 2505 io_task->bhs_pa.u.a32.address_lo); 2506 AMAP_SET_BITS(struct amap_iscsi_wrb, iscsi_bhs_addr_hi, pwrb, 2507 io_task->bhs_pa.u.a32.address_hi); 2508 2509 if (task->data) { 2510 2511 /* Check for the data_count */ 2512 dsp_value = (task->data_count) ? 1 : 0; 2513 2514 if (is_chip_be2_be3r(phba)) 2515 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, 2516 pwrb, dsp_value); 2517 else 2518 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, dsp, 2519 pwrb, dsp_value); 2520 2521 /* Map addr only if there is data_count */ 2522 if (dsp_value) { 2523 io_task->mtask_addr = pci_map_single(phba->pcidev, 2524 task->data, 2525 task->data_count, 2526 PCI_DMA_TODEVICE); 2527 io_task->mtask_data_count = task->data_count; 2528 } else 2529 io_task->mtask_addr = 0; 2530 2531 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_addr_lo, pwrb, 2532 lower_32_bits(io_task->mtask_addr)); 2533 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_addr_hi, pwrb, 2534 upper_32_bits(io_task->mtask_addr)); 2535 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_len, pwrb, 2536 task->data_count); 2537 2538 AMAP_SET_BITS(struct amap_iscsi_wrb, sge0_last, pwrb, 1); 2539 } else { 2540 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, pwrb, 0); 2541 io_task->mtask_addr = 0; 2542 } 2543 2544 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag; 2545 2546 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len); 2547 2548 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2549 io_task->bhs_pa.u.a32.address_hi); 2550 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2551 io_task->bhs_pa.u.a32.address_lo); 2552 if (task->data) { 2553 psgl++; 2554 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 0); 2555 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 0); 2556 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, 0); 2557 AMAP_SET_BITS(struct amap_iscsi_sge, sge_offset, psgl, 0); 2558 AMAP_SET_BITS(struct amap_iscsi_sge, rsvd0, psgl, 0); 2559 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 0); 2560 2561 psgl++; 2562 if (task->data) { 2563 AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl, 2564 lower_32_bits(io_task->mtask_addr)); 2565 AMAP_SET_BITS(struct amap_iscsi_sge, addr_hi, psgl, 2566 upper_32_bits(io_task->mtask_addr)); 2567 } 2568 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, 0x106); 2569 } 2570 AMAP_SET_BITS(struct amap_iscsi_sge, last_sge, psgl, 1); 2571 } 2572 2573 /** 2574 * beiscsi_find_mem_req()- Find mem needed 2575 * @phba: ptr to HBA struct 2576 **/ 2577 static void beiscsi_find_mem_req(struct beiscsi_hba *phba) 2578 { 2579 uint8_t mem_descr_index, ulp_num; 2580 unsigned int num_cq_pages, num_async_pdu_buf_pages; 2581 unsigned int num_async_pdu_data_pages, wrb_sz_per_cxn; 2582 unsigned int num_async_pdu_buf_sgl_pages, num_async_pdu_data_sgl_pages; 2583 2584 num_cq_pages = PAGES_REQUIRED(phba->params.num_cq_entries * \ 2585 sizeof(struct sol_cqe)); 2586 2587 phba->params.hwi_ws_sz = sizeof(struct hwi_controller); 2588 2589 phba->mem_req[ISCSI_MEM_GLOBAL_HEADER] = 2 * 2590 BE_ISCSI_PDU_HEADER_SIZE; 2591 phba->mem_req[HWI_MEM_ADDN_CONTEXT] = 2592 sizeof(struct hwi_context_memory); 2593 2594 2595 phba->mem_req[HWI_MEM_WRB] = sizeof(struct iscsi_wrb) 2596 * (phba->params.wrbs_per_cxn) 2597 * phba->params.cxns_per_ctrl; 2598 wrb_sz_per_cxn = sizeof(struct wrb_handle) * 2599 (phba->params.wrbs_per_cxn); 2600 phba->mem_req[HWI_MEM_WRBH] = roundup_pow_of_two((wrb_sz_per_cxn) * 2601 phba->params.cxns_per_ctrl); 2602 2603 phba->mem_req[HWI_MEM_SGLH] = sizeof(struct sgl_handle) * 2604 phba->params.icds_per_ctrl; 2605 phba->mem_req[HWI_MEM_SGE] = sizeof(struct iscsi_sge) * 2606 phba->params.num_sge_per_io * phba->params.icds_per_ctrl; 2607 for (ulp_num = 0; ulp_num < BEISCSI_ULP_COUNT; ulp_num++) { 2608 if (test_bit(ulp_num, &phba->fw_config.ulp_supported)) { 2609 2610 num_async_pdu_buf_sgl_pages = 2611 PAGES_REQUIRED(BEISCSI_GET_CID_COUNT( 2612 phba, ulp_num) * 2613 sizeof(struct phys_addr)); 2614 2615 num_async_pdu_buf_pages = 2616 PAGES_REQUIRED(BEISCSI_GET_CID_COUNT( 2617 phba, ulp_num) * 2618 phba->params.defpdu_hdr_sz); 2619 2620 num_async_pdu_data_pages = 2621 PAGES_REQUIRED(BEISCSI_GET_CID_COUNT( 2622 phba, ulp_num) * 2623 phba->params.defpdu_data_sz); 2624 2625 num_async_pdu_data_sgl_pages = 2626 PAGES_REQUIRED(BEISCSI_GET_CID_COUNT( 2627 phba, ulp_num) * 2628 sizeof(struct phys_addr)); 2629 2630 mem_descr_index = (HWI_MEM_TEMPLATE_HDR_ULP0 + 2631 (ulp_num * MEM_DESCR_OFFSET)); 2632 phba->mem_req[mem_descr_index] = 2633 BEISCSI_GET_CID_COUNT(phba, ulp_num) * 2634 BEISCSI_TEMPLATE_HDR_PER_CXN_SIZE; 2635 2636 mem_descr_index = (HWI_MEM_ASYNC_HEADER_BUF_ULP0 + 2637 (ulp_num * MEM_DESCR_OFFSET)); 2638 phba->mem_req[mem_descr_index] = 2639 num_async_pdu_buf_pages * 2640 PAGE_SIZE; 2641 2642 mem_descr_index = (HWI_MEM_ASYNC_DATA_BUF_ULP0 + 2643 (ulp_num * MEM_DESCR_OFFSET)); 2644 phba->mem_req[mem_descr_index] = 2645 num_async_pdu_data_pages * 2646 PAGE_SIZE; 2647 2648 mem_descr_index = (HWI_MEM_ASYNC_HEADER_RING_ULP0 + 2649 (ulp_num * MEM_DESCR_OFFSET)); 2650 phba->mem_req[mem_descr_index] = 2651 num_async_pdu_buf_sgl_pages * 2652 PAGE_SIZE; 2653 2654 mem_descr_index = (HWI_MEM_ASYNC_DATA_RING_ULP0 + 2655 (ulp_num * MEM_DESCR_OFFSET)); 2656 phba->mem_req[mem_descr_index] = 2657 num_async_pdu_data_sgl_pages * 2658 PAGE_SIZE; 2659 2660 mem_descr_index = (HWI_MEM_ASYNC_HEADER_HANDLE_ULP0 + 2661 (ulp_num * MEM_DESCR_OFFSET)); 2662 phba->mem_req[mem_descr_index] = 2663 BEISCSI_GET_CID_COUNT(phba, ulp_num) * 2664 sizeof(struct async_pdu_handle); 2665 2666 mem_descr_index = (HWI_MEM_ASYNC_DATA_HANDLE_ULP0 + 2667 (ulp_num * MEM_DESCR_OFFSET)); 2668 phba->mem_req[mem_descr_index] = 2669 BEISCSI_GET_CID_COUNT(phba, ulp_num) * 2670 sizeof(struct async_pdu_handle); 2671 2672 mem_descr_index = (HWI_MEM_ASYNC_PDU_CONTEXT_ULP0 + 2673 (ulp_num * MEM_DESCR_OFFSET)); 2674 phba->mem_req[mem_descr_index] = 2675 sizeof(struct hwi_async_pdu_context) + 2676 (BEISCSI_GET_CID_COUNT(phba, ulp_num) * 2677 sizeof(struct hwi_async_entry)); 2678 } 2679 } 2680 } 2681 2682 static int beiscsi_alloc_mem(struct beiscsi_hba *phba) 2683 { 2684 dma_addr_t bus_add; 2685 struct hwi_controller *phwi_ctrlr; 2686 struct be_mem_descriptor *mem_descr; 2687 struct mem_array *mem_arr, *mem_arr_orig; 2688 unsigned int i, j, alloc_size, curr_alloc_size; 2689 2690 phba->phwi_ctrlr = kzalloc(phba->params.hwi_ws_sz, GFP_KERNEL); 2691 if (!phba->phwi_ctrlr) 2692 return -ENOMEM; 2693 2694 /* Allocate memory for wrb_context */ 2695 phwi_ctrlr = phba->phwi_ctrlr; 2696 phwi_ctrlr->wrb_context = kzalloc(sizeof(struct hwi_wrb_context) * 2697 phba->params.cxns_per_ctrl, 2698 GFP_KERNEL); 2699 if (!phwi_ctrlr->wrb_context) 2700 return -ENOMEM; 2701 2702 phba->init_mem = kcalloc(SE_MEM_MAX, sizeof(*mem_descr), 2703 GFP_KERNEL); 2704 if (!phba->init_mem) { 2705 kfree(phwi_ctrlr->wrb_context); 2706 kfree(phba->phwi_ctrlr); 2707 return -ENOMEM; 2708 } 2709 2710 mem_arr_orig = kmalloc(sizeof(*mem_arr_orig) * BEISCSI_MAX_FRAGS_INIT, 2711 GFP_KERNEL); 2712 if (!mem_arr_orig) { 2713 kfree(phba->init_mem); 2714 kfree(phwi_ctrlr->wrb_context); 2715 kfree(phba->phwi_ctrlr); 2716 return -ENOMEM; 2717 } 2718 2719 mem_descr = phba->init_mem; 2720 for (i = 0; i < SE_MEM_MAX; i++) { 2721 if (!phba->mem_req[i]) { 2722 mem_descr->mem_array = NULL; 2723 mem_descr++; 2724 continue; 2725 } 2726 2727 j = 0; 2728 mem_arr = mem_arr_orig; 2729 alloc_size = phba->mem_req[i]; 2730 memset(mem_arr, 0, sizeof(struct mem_array) * 2731 BEISCSI_MAX_FRAGS_INIT); 2732 curr_alloc_size = min(be_max_phys_size * 1024, alloc_size); 2733 do { 2734 mem_arr->virtual_address = pci_alloc_consistent( 2735 phba->pcidev, 2736 curr_alloc_size, 2737 &bus_add); 2738 if (!mem_arr->virtual_address) { 2739 if (curr_alloc_size <= BE_MIN_MEM_SIZE) 2740 goto free_mem; 2741 if (curr_alloc_size - 2742 rounddown_pow_of_two(curr_alloc_size)) 2743 curr_alloc_size = rounddown_pow_of_two 2744 (curr_alloc_size); 2745 else 2746 curr_alloc_size = curr_alloc_size / 2; 2747 } else { 2748 mem_arr->bus_address.u. 2749 a64.address = (__u64) bus_add; 2750 mem_arr->size = curr_alloc_size; 2751 alloc_size -= curr_alloc_size; 2752 curr_alloc_size = min(be_max_phys_size * 2753 1024, alloc_size); 2754 j++; 2755 mem_arr++; 2756 } 2757 } while (alloc_size); 2758 mem_descr->num_elements = j; 2759 mem_descr->size_in_bytes = phba->mem_req[i]; 2760 mem_descr->mem_array = kmalloc(sizeof(*mem_arr) * j, 2761 GFP_KERNEL); 2762 if (!mem_descr->mem_array) 2763 goto free_mem; 2764 2765 memcpy(mem_descr->mem_array, mem_arr_orig, 2766 sizeof(struct mem_array) * j); 2767 mem_descr++; 2768 } 2769 kfree(mem_arr_orig); 2770 return 0; 2771 free_mem: 2772 mem_descr->num_elements = j; 2773 while ((i) || (j)) { 2774 for (j = mem_descr->num_elements; j > 0; j--) { 2775 pci_free_consistent(phba->pcidev, 2776 mem_descr->mem_array[j - 1].size, 2777 mem_descr->mem_array[j - 1]. 2778 virtual_address, 2779 (unsigned long)mem_descr-> 2780 mem_array[j - 1]. 2781 bus_address.u.a64.address); 2782 } 2783 if (i) { 2784 i--; 2785 kfree(mem_descr->mem_array); 2786 mem_descr--; 2787 } 2788 } 2789 kfree(mem_arr_orig); 2790 kfree(phba->init_mem); 2791 kfree(phba->phwi_ctrlr->wrb_context); 2792 kfree(phba->phwi_ctrlr); 2793 return -ENOMEM; 2794 } 2795 2796 static int beiscsi_get_memory(struct beiscsi_hba *phba) 2797 { 2798 beiscsi_find_mem_req(phba); 2799 return beiscsi_alloc_mem(phba); 2800 } 2801 2802 static void iscsi_init_global_templates(struct beiscsi_hba *phba) 2803 { 2804 struct pdu_data_out *pdata_out; 2805 struct pdu_nop_out *pnop_out; 2806 struct be_mem_descriptor *mem_descr; 2807 2808 mem_descr = phba->init_mem; 2809 mem_descr += ISCSI_MEM_GLOBAL_HEADER; 2810 pdata_out = 2811 (struct pdu_data_out *)mem_descr->mem_array[0].virtual_address; 2812 memset(pdata_out, 0, BE_ISCSI_PDU_HEADER_SIZE); 2813 2814 AMAP_SET_BITS(struct amap_pdu_data_out, opcode, pdata_out, 2815 IIOC_SCSI_DATA); 2816 2817 pnop_out = 2818 (struct pdu_nop_out *)((unsigned char *)mem_descr->mem_array[0]. 2819 virtual_address + BE_ISCSI_PDU_HEADER_SIZE); 2820 2821 memset(pnop_out, 0, BE_ISCSI_PDU_HEADER_SIZE); 2822 AMAP_SET_BITS(struct amap_pdu_nop_out, ttt, pnop_out, 0xFFFFFFFF); 2823 AMAP_SET_BITS(struct amap_pdu_nop_out, f_bit, pnop_out, 1); 2824 AMAP_SET_BITS(struct amap_pdu_nop_out, i_bit, pnop_out, 0); 2825 } 2826 2827 static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba) 2828 { 2829 struct be_mem_descriptor *mem_descr_wrbh, *mem_descr_wrb; 2830 struct hwi_context_memory *phwi_ctxt; 2831 struct wrb_handle *pwrb_handle = NULL; 2832 struct hwi_controller *phwi_ctrlr; 2833 struct hwi_wrb_context *pwrb_context; 2834 struct iscsi_wrb *pwrb = NULL; 2835 unsigned int num_cxn_wrbh = 0; 2836 unsigned int num_cxn_wrb = 0, j, idx = 0, index; 2837 2838 mem_descr_wrbh = phba->init_mem; 2839 mem_descr_wrbh += HWI_MEM_WRBH; 2840 2841 mem_descr_wrb = phba->init_mem; 2842 mem_descr_wrb += HWI_MEM_WRB; 2843 phwi_ctrlr = phba->phwi_ctrlr; 2844 2845 /* Allocate memory for WRBQ */ 2846 phwi_ctxt = phwi_ctrlr->phwi_ctxt; 2847 phwi_ctxt->be_wrbq = kzalloc(sizeof(struct be_queue_info) * 2848 phba->params.cxns_per_ctrl, 2849 GFP_KERNEL); 2850 if (!phwi_ctxt->be_wrbq) { 2851 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 2852 "BM_%d : WRBQ Mem Alloc Failed\n"); 2853 return -ENOMEM; 2854 } 2855 2856 for (index = 0; index < phba->params.cxns_per_ctrl; index++) { 2857 pwrb_context = &phwi_ctrlr->wrb_context[index]; 2858 pwrb_context->pwrb_handle_base = 2859 kzalloc(sizeof(struct wrb_handle *) * 2860 phba->params.wrbs_per_cxn, GFP_KERNEL); 2861 if (!pwrb_context->pwrb_handle_base) { 2862 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 2863 "BM_%d : Mem Alloc Failed. Failing to load\n"); 2864 goto init_wrb_hndl_failed; 2865 } 2866 pwrb_context->pwrb_handle_basestd = 2867 kzalloc(sizeof(struct wrb_handle *) * 2868 phba->params.wrbs_per_cxn, GFP_KERNEL); 2869 if (!pwrb_context->pwrb_handle_basestd) { 2870 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 2871 "BM_%d : Mem Alloc Failed. Failing to load\n"); 2872 goto init_wrb_hndl_failed; 2873 } 2874 if (!num_cxn_wrbh) { 2875 pwrb_handle = 2876 mem_descr_wrbh->mem_array[idx].virtual_address; 2877 num_cxn_wrbh = ((mem_descr_wrbh->mem_array[idx].size) / 2878 ((sizeof(struct wrb_handle)) * 2879 phba->params.wrbs_per_cxn)); 2880 idx++; 2881 } 2882 pwrb_context->alloc_index = 0; 2883 pwrb_context->wrb_handles_available = 0; 2884 pwrb_context->free_index = 0; 2885 2886 if (num_cxn_wrbh) { 2887 for (j = 0; j < phba->params.wrbs_per_cxn; j++) { 2888 pwrb_context->pwrb_handle_base[j] = pwrb_handle; 2889 pwrb_context->pwrb_handle_basestd[j] = 2890 pwrb_handle; 2891 pwrb_context->wrb_handles_available++; 2892 pwrb_handle->wrb_index = j; 2893 pwrb_handle++; 2894 } 2895 num_cxn_wrbh--; 2896 } 2897 } 2898 idx = 0; 2899 for (index = 0; index < phba->params.cxns_per_ctrl; index++) { 2900 pwrb_context = &phwi_ctrlr->wrb_context[index]; 2901 if (!num_cxn_wrb) { 2902 pwrb = mem_descr_wrb->mem_array[idx].virtual_address; 2903 num_cxn_wrb = (mem_descr_wrb->mem_array[idx].size) / 2904 ((sizeof(struct iscsi_wrb) * 2905 phba->params.wrbs_per_cxn)); 2906 idx++; 2907 } 2908 2909 if (num_cxn_wrb) { 2910 for (j = 0; j < phba->params.wrbs_per_cxn; j++) { 2911 pwrb_handle = pwrb_context->pwrb_handle_base[j]; 2912 pwrb_handle->pwrb = pwrb; 2913 pwrb++; 2914 } 2915 num_cxn_wrb--; 2916 } 2917 } 2918 return 0; 2919 init_wrb_hndl_failed: 2920 for (j = index; j > 0; j--) { 2921 pwrb_context = &phwi_ctrlr->wrb_context[j]; 2922 kfree(pwrb_context->pwrb_handle_base); 2923 kfree(pwrb_context->pwrb_handle_basestd); 2924 } 2925 return -ENOMEM; 2926 } 2927 2928 static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba) 2929 { 2930 uint8_t ulp_num; 2931 struct hwi_controller *phwi_ctrlr; 2932 struct hba_parameters *p = &phba->params; 2933 struct hwi_async_pdu_context *pasync_ctx; 2934 struct async_pdu_handle *pasync_header_h, *pasync_data_h; 2935 unsigned int index, idx, num_per_mem, num_async_data; 2936 struct be_mem_descriptor *mem_descr; 2937 2938 for (ulp_num = 0; ulp_num < BEISCSI_ULP_COUNT; ulp_num++) { 2939 if (test_bit(ulp_num, &phba->fw_config.ulp_supported)) { 2940 2941 mem_descr = (struct be_mem_descriptor *)phba->init_mem; 2942 mem_descr += (HWI_MEM_ASYNC_PDU_CONTEXT_ULP0 + 2943 (ulp_num * MEM_DESCR_OFFSET)); 2944 2945 phwi_ctrlr = phba->phwi_ctrlr; 2946 phwi_ctrlr->phwi_ctxt->pasync_ctx[ulp_num] = 2947 (struct hwi_async_pdu_context *) 2948 mem_descr->mem_array[0].virtual_address; 2949 2950 pasync_ctx = phwi_ctrlr->phwi_ctxt->pasync_ctx[ulp_num]; 2951 memset(pasync_ctx, 0, sizeof(*pasync_ctx)); 2952 2953 pasync_ctx->async_entry = 2954 (struct hwi_async_entry *) 2955 ((long unsigned int)pasync_ctx + 2956 sizeof(struct hwi_async_pdu_context)); 2957 2958 pasync_ctx->num_entries = BEISCSI_GET_CID_COUNT(phba, 2959 ulp_num); 2960 pasync_ctx->buffer_size = p->defpdu_hdr_sz; 2961 2962 mem_descr = (struct be_mem_descriptor *)phba->init_mem; 2963 mem_descr += HWI_MEM_ASYNC_HEADER_BUF_ULP0 + 2964 (ulp_num * MEM_DESCR_OFFSET); 2965 if (mem_descr->mem_array[0].virtual_address) { 2966 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, 2967 "BM_%d : hwi_init_async_pdu_ctx" 2968 " HWI_MEM_ASYNC_HEADER_BUF_ULP%d va=%p\n", 2969 ulp_num, 2970 mem_descr->mem_array[0]. 2971 virtual_address); 2972 } else 2973 beiscsi_log(phba, KERN_WARNING, 2974 BEISCSI_LOG_INIT, 2975 "BM_%d : No Virtual address for ULP : %d\n", 2976 ulp_num); 2977 2978 pasync_ctx->async_header.va_base = 2979 mem_descr->mem_array[0].virtual_address; 2980 2981 pasync_ctx->async_header.pa_base.u.a64.address = 2982 mem_descr->mem_array[0]. 2983 bus_address.u.a64.address; 2984 2985 mem_descr = (struct be_mem_descriptor *)phba->init_mem; 2986 mem_descr += HWI_MEM_ASYNC_HEADER_RING_ULP0 + 2987 (ulp_num * MEM_DESCR_OFFSET); 2988 if (mem_descr->mem_array[0].virtual_address) { 2989 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, 2990 "BM_%d : hwi_init_async_pdu_ctx" 2991 " HWI_MEM_ASYNC_HEADER_RING_ULP%d va=%p\n", 2992 ulp_num, 2993 mem_descr->mem_array[0]. 2994 virtual_address); 2995 } else 2996 beiscsi_log(phba, KERN_WARNING, 2997 BEISCSI_LOG_INIT, 2998 "BM_%d : No Virtual address for ULP : %d\n", 2999 ulp_num); 3000 3001 pasync_ctx->async_header.ring_base = 3002 mem_descr->mem_array[0].virtual_address; 3003 3004 mem_descr = (struct be_mem_descriptor *)phba->init_mem; 3005 mem_descr += HWI_MEM_ASYNC_HEADER_HANDLE_ULP0 + 3006 (ulp_num * MEM_DESCR_OFFSET); 3007 if (mem_descr->mem_array[0].virtual_address) { 3008 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, 3009 "BM_%d : hwi_init_async_pdu_ctx" 3010 " HWI_MEM_ASYNC_HEADER_HANDLE_ULP%d va=%p\n", 3011 ulp_num, 3012 mem_descr->mem_array[0]. 3013 virtual_address); 3014 } else 3015 beiscsi_log(phba, KERN_WARNING, 3016 BEISCSI_LOG_INIT, 3017 "BM_%d : No Virtual addr