Error Trace
[Home]
Bug # 74
Show/hide error trace Error trace
{ 19 typedef signed char __s8; 20 typedef unsigned char __u8; 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; 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; 40 typedef __kernel_long_t __kernel_suseconds_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; 239 struct kernel_symbol { unsigned long value; const char *name; } ; 33 struct module ; 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; 108 typedef __u32 uint32_t; 133 typedef unsigned long sector_t; 134 typedef unsigned long blkcnt_t; 144 typedef u64 dma_addr_t; 155 typedef unsigned int gfp_t; 156 typedef unsigned int fmode_t; 157 typedef unsigned int oom_flags_t; 160 typedef u64 phys_addr_t; 165 typedef phys_addr_t resource_size_t; 175 struct __anonstruct_atomic_t_6 { int counter; } ; 175 typedef struct __anonstruct_atomic_t_6 atomic_t; 180 struct __anonstruct_atomic64_t_7 { long counter; } ; 180 typedef struct __anonstruct_atomic64_t_7 atomic64_t; 181 struct list_head { struct list_head *next; struct list_head *prev; } ; 186 struct hlist_node ; 186 struct hlist_head { struct hlist_node *first; } ; 190 struct hlist_node { struct hlist_node *next; struct hlist_node **pprev; } ; 201 struct callback_head { struct callback_head *next; void (*func)(struct callback_head *); } ; 67 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; } ; 12 typedef unsigned long pteval_t; 15 typedef unsigned long pgdval_t; 16 typedef unsigned long pgprotval_t; 18 struct __anonstruct_pte_t_11 { pteval_t pte; } ; 18 typedef struct __anonstruct_pte_t_11 pte_t; 20 struct pgprot { pgprotval_t pgprot; } ; 218 typedef struct pgprot pgprot_t; 220 struct __anonstruct_pgd_t_12 { pgdval_t pgd; } ; 220 typedef struct __anonstruct_pgd_t_12 pgd_t; 361 struct page ; 361 typedef struct page *pgtable_t; 369 struct file ; 382 struct seq_file ; 420 struct thread_struct ; 422 struct mm_struct ; 423 struct task_struct ; 424 struct cpumask ; 425 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; 34 struct qrwlock { atomic_t cnts; arch_spinlock_t lock; } ; 14 typedef struct qrwlock arch_rwlock_t; 142 typedef void (*ctor_fn_t)(); 48 struct device ; 413 struct file_operations ; 425 struct completion ; 555 struct bug_entry { int bug_addr_disp; int file_disp; unsigned short line; unsigned short flags; } ; 102 struct timespec ; 103 struct compat_timespec ; 104 struct __anonstruct_futex_17 { u32 *uaddr; u32 val; u32 flags; u32 bitset; u64 time; u32 *uaddr2; } ; 104 struct __anonstruct_nanosleep_18 { clockid_t clockid; struct timespec *rmtp; struct compat_timespec *compat_rmtp; u64 expires; } ; 104 struct pollfd ; 104 struct __anonstruct_poll_19 { struct pollfd *ufds; int nfds; int has_timeout; unsigned long tv_sec; unsigned long tv_nsec; } ; 104 union __anonunion____missing_field_name_16 { struct __anonstruct_futex_17 futex; struct __anonstruct_nanosleep_18 nanosleep; struct __anonstruct_poll_19 poll; } ; 104 struct restart_block { long int (*fn)(struct restart_block *); union __anonunion____missing_field_name_16 __annonCompField8; } ; 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_20 { struct pt_regs *regs; struct kernel_vm86_regs *vm86; } ; 79 struct math_emu_info { long ___orig_eip; union __anonunion____missing_field_name_20 __annonCompField9; } ; 332 struct cpumask { unsigned long bits[128U]; } ; 14 typedef struct cpumask cpumask_t; 655 typedef struct cpumask *cpumask_var_t; 161 struct seq_operations ; 293 struct i387_fsave_struct { u32 cwd; u32 swd; u32 twd; u32 fip; u32 fcs; u32 foo; u32 fos; u32 st_space[20U]; u32 status; } ; 311 struct __anonstruct____missing_field_name_25 { u64 rip; u64 rdp; } ; 311 struct __anonstruct____missing_field_name_26 { u32 fip; u32 fcs; u32 foo; u32 fos; } ; 311 union __anonunion____missing_field_name_24 { struct __anonstruct____missing_field_name_25 __annonCompField13; struct __anonstruct____missing_field_name_26 __annonCompField14; } ; 311 union __anonunion____missing_field_name_27 { u32 padding1[12U]; u32 sw_reserved[12U]; } ; 311 struct i387_fxsave_struct { u16 cwd; u16 swd; u16 twd; u16 fop; union __anonunion____missing_field_name_24 __annonCompField15; u32 mxcsr; u32 mxcsr_mask; u32 st_space[32U]; u32 xmm_space[64U]; u32 padding[12U]; union __anonunion____missing_field_name_27 __annonCompField16; } ; 345 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; } ; 366 struct ymmh_struct { u32 ymmh_space[64U]; } ; 371 struct lwp_struct { u8 reserved[128U]; } ; 376 struct bndreg { u64 lower_bound; u64 upper_bound; } ; 381 struct bndcsr { u64 bndcfgu; u64 bndstatus; } ; 386 struct xsave_hdr_struct { u64 xstate_bv; u64 xcomp_bv; u64 reserved[6U]; } ; 392 struct xsave_struct { struct i387_fxsave_struct i387; struct xsave_hdr_struct xsave_hdr; struct ymmh_struct ymmh; struct lwp_struct lwp; struct bndreg bndreg[4U]; struct bndcsr 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; } ; 465 struct kmem_cache ; 466 struct perf_event ; 467 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; 35 struct lockdep_map ; 55 struct stack_trace { unsigned int nr_entries; unsigned int max_entries; unsigned long *entries; int skip; } ; 30 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; } ; 536 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_31 { u8 __padding[24U]; struct lockdep_map dep_map; } ; 33 union __anonunion____missing_field_name_30 { struct raw_spinlock rlock; struct __anonstruct____missing_field_name_31 __annonCompField18; } ; 33 struct spinlock { union __anonunion____missing_field_name_30 __annonCompField19; } ; 76 typedef struct spinlock spinlock_t; 23 struct __anonstruct_rwlock_t_32 { 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_32 rwlock_t; 426 struct seqcount { unsigned int sequence; struct lockdep_map dep_map; } ; 51 typedef struct seqcount seqcount_t; 284 struct __anonstruct_seqlock_t_45 { struct seqcount seqcount; spinlock_t lock; } ; 284 typedef struct __anonstruct_seqlock_t_45 seqlock_t; 38 struct __wait_queue_head { spinlock_t lock; struct list_head task_list; } ; 43 typedef struct __wait_queue_head wait_queue_head_t; 1154 struct completion { unsigned int done; wait_queue_head_t wait; } ; 1155 union __anonunion____missing_field_name_46 { unsigned long bitmap[4U]; struct callback_head callback_head; } ; 1155 struct idr_layer { int prefix; int layer; struct idr_layer *ary[256U]; int count; union __anonunion____missing_field_name_46 __annonCompField20; } ; 41 struct idr { struct idr_layer *hint; struct idr_layer *top; int layers; int cur; spinlock_t lock; int id_free_cnt; struct idr_layer *id_free; } ; 124 struct ida_bitmap { long nr_busy; unsigned long bitmap[15U]; } ; 153 struct ida { struct idr idr; struct ida_bitmap *free_bitmap; } ; 135 struct timespec { __kernel_time_t tv_sec; long tv_nsec; } ; 13 struct timeval { __kernel_time_t tv_sec; __kernel_suseconds_t tv_usec; } ; 83 struct user_namespace ; 22 struct __anonstruct_kuid_t_47 { uid_t val; } ; 22 typedef struct __anonstruct_kuid_t_47 kuid_t; 27 struct __anonstruct_kgid_t_48 { gid_t val; } ; 27 typedef struct __anonstruct_kgid_t_48 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 vm_area_struct ; 95 struct __anonstruct_nodemask_t_49 { unsigned long bits[16U]; } ; 95 typedef struct __anonstruct_nodemask_t_49 nodemask_t; 13 struct optimistic_spin_queue { atomic_t tail; } ; 34 struct mutex { atomic_t count; spinlock_t wait_lock; struct list_head wait_list; struct task_struct *owner; void *magic; struct lockdep_map dep_map; } ; 67 struct mutex_waiter { struct list_head list; struct task_struct *task; void *magic; } ; 177 struct rw_semaphore ; 178 struct rw_semaphore { long count; struct list_head wait_list; raw_spinlock_t wait_lock; struct optimistic_spin_queue osq; struct task_struct *owner; struct lockdep_map dep_map; } ; 311 union ktime { s64 tv64; } ; 41 typedef union ktime ktime_t; 267 struct tvec_base ; 268 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 ; 53 struct work_struct { atomic_long_t data; struct list_head entry; void (*func)(struct work_struct *); struct lockdep_map lockdep_map; } ; 106 struct delayed_work { struct work_struct work; struct timer_list timer; struct workqueue_struct *wq; int cpu; } ; 140 struct execute_work { struct work_struct work; } ; 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 *); } ; 320 enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; 327 enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; 335 struct wakeup_source ; 337 struct pm_subsys_data { spinlock_t lock; unsigned int refcount; struct list_head clock_list; } ; 540 struct dev_pm_qos ; 540 struct dev_pm_info { pm_message_t power_state; unsigned char can_wakeup; unsigned char async_suspend; bool is_prepared; bool is_suspended; bool is_noirq_suspended; bool is_late_suspended; bool ignore_children; bool early_init; bool direct_complete; spinlock_t lock; struct list_head entry; struct completion completion; struct wakeup_source *wakeup; bool wakeup_path; bool syscore; struct timer_list suspend_timer; unsigned long timer_expires; struct work_struct work; wait_queue_head_t wait_queue; 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; void (*set_latency_tolerance)(struct device *, s32 ); struct dev_pm_qos *qos; } ; 601 struct dev_pm_domain { struct dev_pm_ops ops; void (*detach)(struct device *, bool ); } ; 133 struct pci_bus ; 24 struct __anonstruct_mm_context_t_114 { void *ldt; int size; unsigned short ia32_compat; struct mutex lock; void *vdso; atomic_t perf_rdpmc_allowed; } ; 24 typedef struct __anonstruct_mm_context_t_114 mm_context_t; 19 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; } ; 22 struct bio_vec ; 177 struct device_node ; 1269 struct llist_node ; 64 struct llist_node { struct llist_node *next; } ; 17 struct call_single_data { struct llist_node llist; void (*func)(void *); void *info; u16 flags; } ; 837 struct nsproxy ; 37 struct cred ; 19 struct inode ; 58 struct arch_uprobe_task { unsigned long saved_scratch_register; unsigned int saved_trap_nr; unsigned int saved_tf; } ; 66 enum uprobe_task_state { UTASK_RUNNING = 0, UTASK_SSTEP = 1, UTASK_SSTEP_ACK = 2, UTASK_SSTEP_TRAPPED = 3 } ; 73 struct __anonstruct____missing_field_name_149 { struct arch_uprobe_task autask; unsigned long vaddr; } ; 73 struct __anonstruct____missing_field_name_150 { struct callback_head dup_xol_work; unsigned long dup_xol_addr; } ; 73 union __anonunion____missing_field_name_148 { struct __anonstruct____missing_field_name_149 __annonCompField35; struct __anonstruct____missing_field_name_150 __annonCompField36; } ; 73 struct uprobe ; 73 struct return_instance ; 73 struct uprobe_task { enum uprobe_task_state state; union __anonunion____missing_field_name_148 __annonCompField37; struct uprobe *active_uprobe; unsigned long xol_vaddr; struct return_instance *return_instances; unsigned int depth; } ; 94 struct xol_area ; 95 struct uprobes_state { struct xol_area *xol_area; } ; 133 struct address_space ; 134 struct mem_cgroup ; 31 typedef void compound_page_dtor(struct page *); 32 union __anonunion____missing_field_name_151 { struct address_space *mapping; void *s_mem; } ; 32 union __anonunion____missing_field_name_153 { unsigned long index; void *freelist; bool pfmemalloc; } ; 32 struct __anonstruct____missing_field_name_157 { unsigned short inuse; unsigned short objects; unsigned char frozen; } ; 32 union __anonunion____missing_field_name_156 { atomic_t _mapcount; struct __anonstruct____missing_field_name_157 __annonCompField40; int units; } ; 32 struct __anonstruct____missing_field_name_155 { union __anonunion____missing_field_name_156 __annonCompField41; atomic_t _count; } ; 32 union __anonunion____missing_field_name_154 { unsigned long counters; struct __anonstruct____missing_field_name_155 __annonCompField42; unsigned int active; } ; 32 struct __anonstruct____missing_field_name_152 { union __anonunion____missing_field_name_153 __annonCompField39; union __anonunion____missing_field_name_154 __annonCompField43; } ; 32 struct __anonstruct____missing_field_name_159 { struct page *next; int pages; int pobjects; } ; 32 struct slab ; 32 struct __anonstruct____missing_field_name_160 { compound_page_dtor *compound_dtor; unsigned long compound_order; } ; 32 union __anonunion____missing_field_name_158 { struct list_head lru; struct __anonstruct____missing_field_name_159 __annonCompField45; struct slab *slab_page; struct callback_head callback_head; struct __anonstruct____missing_field_name_160 __annonCompField46; pgtable_t pmd_huge_pte; } ; 32 union __anonunion____missing_field_name_161 { unsigned long private; spinlock_t *ptl; struct kmem_cache *slab_cache; struct page *first_page; } ; 32 struct page { unsigned long flags; union __anonunion____missing_field_name_151 __annonCompField38; struct __anonstruct____missing_field_name_152 __annonCompField44; union __anonunion____missing_field_name_158 __annonCompField47; union __anonunion____missing_field_name_161 __annonCompField48; struct mem_cgroup *mem_cgroup; } ; 181 struct page_frag { struct page *page; __u32 offset; __u32 size; } ; 248 struct __anonstruct_shared_162 { struct rb_node rb; unsigned long rb_subtree_last; } ; 248 struct anon_vma ; 248 struct vm_operations_struct ; 248 struct mempolicy ; 248 struct vm_area_struct { unsigned long vm_start; unsigned long vm_end; struct vm_area_struct *vm_next; struct vm_area_struct *vm_prev; struct rb_node vm_rb; unsigned long rb_subtree_gap; struct mm_struct *vm_mm; pgprot_t vm_page_prot; unsigned long vm_flags; struct __anonstruct_shared_162 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; } ; 316 struct core_thread { struct task_struct *task; struct core_thread *next; } ; 322 struct core_state { atomic_t nr_threads; struct core_thread dumper; struct completion startup; } ; 335 struct task_rss_stat { int events; int count[3U]; } ; 343 struct mm_rss_stat { atomic_long_t count[3U]; } ; 348 struct kioctx_table ; 349 struct linux_binfmt ; 349 struct mmu_notifier_mm ; 349 struct mm_struct { struct vm_area_struct *mmap; struct rb_root mm_rb; u32 vmacache_seqnum; 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; atomic_long_t nr_pmds; int map_count; spinlock_t page_table_lock; struct rw_semaphore mmap_sem; struct list_head mmlist; unsigned long hiwater_rss; unsigned long hiwater_vm; unsigned long total_vm; unsigned long locked_vm; unsigned long pinned_vm; unsigned long shared_vm; unsigned long exec_vm; unsigned long stack_vm; unsigned long def_flags; unsigned long start_code; unsigned long end_code; unsigned long start_data; unsigned long end_data; unsigned long start_brk; unsigned long brk; unsigned long start_stack; unsigned long arg_start; unsigned long arg_end; unsigned long env_start; unsigned long env_end; unsigned long saved_auxv[46U]; struct mm_rss_stat rss_stat; struct linux_binfmt *binfmt; cpumask_var_t cpu_vm_mask_var; mm_context_t context; unsigned long flags; struct core_state *core_state; spinlock_t ioctx_lock; struct kioctx_table *ioctx_table; struct task_struct *owner; struct file *exe_file; struct mmu_notifier_mm *mmu_notifier_mm; struct cpumask cpumask_allocation; unsigned long numa_next_scan; unsigned long numa_scan_offset; int numa_scan_seq; bool tlb_flush_pending; struct uprobes_state uprobes_state; void *bd_addr; } ; 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; 53 struct dentry ; 54 struct iattr ; 55 struct super_block ; 56 struct file_system_type ; 57 struct kernfs_open_node ; 58 struct kernfs_iattrs ; 80 struct kernfs_root ; 80 struct kernfs_elem_dir { unsigned long subdirs; struct rb_root children; struct kernfs_root *root; } ; 84 struct kernfs_node ; 84 struct kernfs_elem_symlink { struct kernfs_node *target_kn; } ; 88 struct kernfs_ops ; 88 struct kernfs_elem_attr { const struct kernfs_ops *ops; struct kernfs_open_node *open; loff_t size; struct kernfs_node *notify_next; } ; 95 union __anonunion____missing_field_name_167 { struct kernfs_elem_dir dir; struct kernfs_elem_symlink symlink; struct kernfs_elem_attr attr; } ; 95 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; const void *ns; unsigned int hash; union __anonunion____missing_field_name_167 __annonCompField49; void *priv; unsigned short flags; umode_t mode; unsigned int ino; struct kernfs_iattrs *iattr; } ; 137 struct kernfs_syscall_ops { int (*remount_fs)(struct kernfs_root *, int *, char *); int (*show_options)(struct seq_file *, struct kernfs_root *); int (*mkdir)(struct kernfs_node *, const char *, umode_t ); int (*rmdir)(struct kernfs_node *); int (*rename)(struct kernfs_node *, struct kernfs_node *, const char *); } ; 154 struct kernfs_root { struct kernfs_node *kn; unsigned int flags; struct ida ino_ida; struct kernfs_syscall_ops *syscall_ops; struct list_head supers; wait_queue_head_t deactivate_waitq; } ; 170 struct kernfs_open_file { struct kernfs_node *kn; struct file *file; void *priv; struct mutex mutex; int event; struct list_head list; char *prealloc_buf; size_t atomic_write_len; bool mmapped; const struct vm_operations_struct *vm_ops; } ; 187 struct kernfs_ops { int (*seq_show)(struct seq_file *, void *); void * (*seq_start)(struct seq_file *, loff_t *); void * (*seq_next)(struct seq_file *, void *, loff_t *); void (*seq_stop)(struct seq_file *, void *); ssize_t (*read)(struct kernfs_open_file *, char *, size_t , loff_t ); size_t atomic_write_len; bool prealloc; ssize_t (*write)(struct kernfs_open_file *, char *, size_t , loff_t ); int (*mmap)(struct kernfs_open_file *, struct vm_area_struct *); struct lock_class_key lockdep_key; } ; 469 struct sock ; 470 struct kobject ; 471 enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; 477 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 *); } ; 59 struct bin_attribute ; 60 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 *); } ; 140 struct sysfs_ops { ssize_t (*show)(struct kobject *, struct attribute *, char *); ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t ); } ; 479 struct kref { atomic_t refcount; } ; 52 struct kset ; 52 struct kobj_type ; 52 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; } ; 114 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 *); } ; 122 struct kobj_uevent_env { char *argv[3U]; char *envp[32U]; int envp_idx; char buf[2048U]; int buflen; } ; 130 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 *); } ; 147 struct kset { struct list_head list; spinlock_t list_lock; struct kobject kobj; const struct kset_uevent_ops *uevent_ops; } ; 222 struct kernel_param ; 227 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 *); } ; 62 struct kparam_string ; 62 struct kparam_array ; 62 union __anonunion____missing_field_name_168 { void *arg; const struct kparam_string *str; const struct kparam_array *arr; } ; 62 struct kernel_param { const char *name; const struct kernel_param_ops *ops; u16 perm; s8 level; u8 flags; union __anonunion____missing_field_name_168 __annonCompField50; } ; 82 struct kparam_string { unsigned int maxlen; char *string; } ; 88 struct kparam_array { unsigned int max; unsigned int elemsize; unsigned int *num; const struct kernel_param_ops *ops; void *elem; } ; 496 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 *); } ; 72 struct exception_table_entry ; 205 enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2, MODULE_STATE_UNFORMED = 3 } ; 212 struct module_sect_attrs ; 212 struct module_notes_attrs ; 212 struct tracepoint ; 212 struct ftrace_event_call ; 212 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)(); atomic_t refcnt; ctor_fn_t (**ctors)(); unsigned int num_ctors; } ; 22 struct kernel_cap_struct { __u32 cap[2U]; } ; 25 typedef struct kernel_cap_struct kernel_cap_t; 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; } ; 78 struct user_struct ; 26 struct sysv_shm { struct list_head shm_clist; } ; 24 struct __anonstruct_sigset_t_170 { unsigned long sig[1U]; } ; 24 typedef struct __anonstruct_sigset_t_170 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_172 { __kernel_pid_t _pid; __kernel_uid32_t _uid; } ; 11 struct __anonstruct__timer_173 { __kernel_timer_t _tid; int _overrun; char _pad[0U]; sigval_t _sigval; int _sys_private; } ; 11 struct __anonstruct__rt_174 { __kernel_pid_t _pid; __kernel_uid32_t _uid; sigval_t _sigval; } ; 11 struct __anonstruct__sigchld_175 { __kernel_pid_t _pid; __kernel_uid32_t _uid; int _status; __kernel_clock_t _utime; __kernel_clock_t _stime; } ; 11 struct __anonstruct__addr_bnd_177 { void *_lower; void *_upper; } ; 11 struct __anonstruct__sigfault_176 { void *_addr; short _addr_lsb; struct __anonstruct__addr_bnd_177 _addr_bnd; } ; 11 struct __anonstruct__sigpoll_178 { long _band; int _fd; } ; 11 struct __anonstruct__sigsys_179 { void *_call_addr; int _syscall; unsigned int _arch; } ; 11 union __anonunion__sifields_171 { int _pad[28U]; struct __anonstruct__kill_172 _kill; struct __anonstruct__timer_173 _timer; struct __anonstruct__rt_174 _rt; struct __anonstruct__sigchld_175 _sigchld; struct __anonstruct__sigfault_176 _sigfault; struct __anonstruct__sigpoll_178 _sigpoll; struct __anonstruct__sigsys_179 _sigsys; } ; 11 struct siginfo { int si_signo; int si_errno; int si_code; union __anonunion__sifields_171 _sifields; } ; 113 typedef struct siginfo siginfo_t; 22 struct sigpending { struct list_head list; sigset_t signal; } ; 243 struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; __sigrestore_t sa_restorer; sigset_t sa_mask; } ; 257 struct k_sigaction { struct sigaction sa; } ; 443 enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; 450 struct pid_namespace ; 450 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; } ; 53 struct seccomp_filter ; 54 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 cpu; unsigned int active_bases; unsigned int clock_was_set; ktime_t expires_next; int in_hrtirq; 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]; } ; 453 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; } ; 39 struct assoc_array_ptr ; 39 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_182 { struct list_head graveyard_link; struct rb_node serial_node; } ; 123 struct key_user ; 123 union __anonunion____missing_field_name_183 { time_t expiry; time_t revoked_at; } ; 123 struct __anonstruct____missing_field_name_185 { struct key_type *type; char *description; } ; 123 union __anonunion____missing_field_name_184 { struct keyring_index_key index_key; struct __anonstruct____missing_field_name_185 __annonCompField53; } ; 123 union __anonunion_type_data_186 { struct list_head link; unsigned long x[2U]; void *p[2U]; int reject_error; } ; 123 union __anonunion_payload_188 { unsigned long value; void *rcudata; void *data; void *data2[2U]; } ; 123 union __anonunion____missing_field_name_187 { union __anonunion_payload_188 payload; struct assoc_array keys; } ; 123 struct key { atomic_t usage; key_serial_t serial; union __anonunion____missing_field_name_182 __annonCompField51; struct rw_semaphore sem; struct key_user *user; void *security; union __anonunion____missing_field_name_183 __annonCompField52; 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_184 __annonCompField54; union __anonunion_type_data_186 type_data; union __anonunion____missing_field_name_187 __annonCompField55; } ; 358 struct audit_context ; 27 struct group_info { atomic_t usage; int ngroups; int nblocks; kgid_t small_block[32U]; kgid_t *blocks[0U]; } ; 79 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; } ; 127 struct futex_pi_state ; 128 struct robust_list_head ; 129 struct bio_list ; 130 struct fs_struct ; 131 struct perf_event_context ; 132 struct blk_plug ; 182 struct cfs_rq ; 183 struct task_group ; 471 struct sighand_struct { atomic_t count; struct k_sigaction action[64U]; spinlock_t siglock; wait_queue_head_t signalfd_wqh; } ; 510 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; } ; 518 struct cpu_itimer { cputime_t expires; cputime_t incr; u32 error; u32 incr_error; } ; 525 struct cputime { cputime_t utime; cputime_t stime; } ; 537 struct task_cputime { cputime_t utime; cputime_t stime; unsigned long long sum_exec_runtime; } ; 557 struct thread_group_cputimer { struct task_cputime cputime; int running; raw_spinlock_t lock; } ; 599 struct autogroup ; 600 struct tty_struct ; 600 struct taskstats ; 600 struct tty_audit_buf ; 600 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; seqlock_t stats_lock; cputime_t utime; cputime_t stime; cputime_t cutime; cputime_t cstime; cputime_t gtime; cputime_t cgtime; struct cputime prev_cputime; unsigned long nvcsw; unsigned long nivcsw; unsigned long cnvcsw; unsigned long cnivcsw; unsigned long min_flt; unsigned long maj_flt; unsigned long cmin_flt; unsigned long cmaj_flt; unsigned long inblock; unsigned long oublock; unsigned long cinblock; unsigned long coublock; unsigned long maxrss; unsigned long cmaxrss; struct task_io_accounting ioac; unsigned long long sum_sched_runtime; struct rlimit rlim[16U]; struct pacct_struct pacct; struct taskstats *stats; unsigned int audit_tty; unsigned int audit_tty_log_passwd; struct tty_audit_buf *tty_audit_buf; struct rw_semaphore group_rwsem; oom_flags_t oom_flags; short oom_score_adj; short oom_score_adj_min; struct mutex cred_guard_mutex; } ; 781 struct user_struct { atomic_t __count; atomic_t processes; atomic_t sigpending; atomic_t inotify_watches; atomic_t inotify_devs; atomic_t fanotify_listeners; atomic_long_t epoll_watches; unsigned long mq_bytes; unsigned long locked_shm; struct key *uid_keyring; struct key *session_keyring; struct hlist_node uidhash_node; kuid_t uid; atomic_long_t locked_vm; } ; 824 struct backing_dev_info ; 825 struct reclaim_state ; 826 struct sched_info { unsigned long pcount; unsigned long long run_delay; unsigned long long last_arrival; unsigned long long last_queued; } ; 840 struct task_delay_info { spinlock_t lock; unsigned int flags; u64 blkio_start; u64 blkio_delay; u64 swapin_delay; u32 blkio_count; u32 swapin_count; u64 freepages_start; u64 freepages_delay; u32 freepages_count; } ; 1073 struct io_context ; 1107 struct pipe_inode_info ; 1108 struct uts_namespace ; 1109 struct load_weight { unsigned long weight; u32 inv_weight; } ; 1116 struct sched_avg { u32 runnable_avg_sum; u32 runnable_avg_period; u64 last_runnable_update; s64 decay_count; unsigned long load_avg_contrib; } ; 1128 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; } ; 1163 struct sched_entity { struct load_weight load; struct rb_node run_node; struct list_head group_node; unsigned int on_rq; u64 exec_start; u64 sum_exec_runtime; u64 vruntime; u64 prev_sum_exec_runtime; u64 nr_migrations; struct sched_statistics statistics; int depth; struct sched_entity *parent; struct cfs_rq *cfs_rq; struct cfs_rq *my_q; struct sched_avg avg; } ; 1195 struct rt_rq ; 1195 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; } ; 1211 struct sched_dl_entity { struct rb_node rb_node; u64 dl_runtime; u64 dl_deadline; u64 dl_period; u64 dl_bw; s64 runtime; u64 deadline; unsigned int flags; int dl_throttled; int dl_new; int dl_boosted; int dl_yielded; struct hrtimer dl_timer; } ; 1277 struct memcg_oom_info { struct mem_cgroup *memcg; gfp_t gfp_mask; int order; unsigned char may_oom; } ; 1702 struct sched_class ; 1702 struct files_struct ; 1702 struct css_set ; 1702 struct compat_robust_list_head ; 1702 struct numa_group ; 1702 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; unsigned long rcu_tasks_nvcsw; bool rcu_tasks_holdout; struct list_head rcu_tasks_holdout_list; int rcu_tasks_idle_cpu; struct sched_info sched_info; struct list_head tasks; struct plist_node pushable_tasks; struct rb_node pushable_dl_tasks; struct mm_struct *mm; struct mm_struct *active_mm; unsigned char brk_randomized; u32 vmacache_seqnum; struct vm_area_struct *vmacache[4U]; struct task_rss_stat rss_stat; int exit_state; int exit_code; int exit_signal; int pdeath_signal; unsigned int jobctl; unsigned int personality; unsigned char in_execve; unsigned char in_iowait; unsigned char sched_reset_on_fork; unsigned char sched_contributes_to_load; unsigned char memcg_kmem_skip_account; unsigned long atomic_flags; struct restart_block restart_block; pid_t pid; pid_t tgid; struct task_struct *real_parent; struct task_struct *parent; struct list_head children; struct list_head sibling; struct task_struct *group_leader; struct list_head ptraced; struct list_head ptrace_entry; struct pid_link pids[3U]; struct list_head thread_group; struct list_head thread_node; struct completion *vfork_done; int *set_child_tid; int *clear_child_tid; cputime_t utime; cputime_t stime; cputime_t utimescaled; cputime_t stimescaled; cputime_t gtime; struct cputime prev_cputime; unsigned long nvcsw; unsigned long nivcsw; u64 start_time; u64 real_start_time; unsigned long min_flt; unsigned long maj_flt; struct task_cputime cputime_expires; struct list_head cpu_timers[3U]; const struct cred *real_cred; const struct cred *cred; char comm[16U]; int link_count; int total_link_count; struct sysv_sem sysvsem; struct sysv_shm sysvshm; unsigned long last_switch_count; struct thread_struct thread; struct fs_struct *fs; struct files_struct *files; struct nsproxy *nsproxy; struct signal_struct *signal; struct sighand_struct *sighand; sigset_t blocked; sigset_t real_blocked; sigset_t saved_sigmask; struct sigpending pending; unsigned long sas_ss_sp; size_t sas_ss_size; int (*notifier)(void *); void *notifier_data; sigset_t *notifier_mask; struct callback_head *task_works; struct audit_context *audit_context; kuid_t loginuid; unsigned int sessionid; struct seccomp seccomp; u32 parent_exec_id; u32 self_exec_id; spinlock_t alloc_lock; raw_spinlock_t pi_lock; struct rb_root pi_waiters; struct rb_node *pi_waiters_leftmost; struct rt_mutex_waiter *pi_blocked_on; struct mutex_waiter *blocked_on; unsigned int irq_events; unsigned long hardirq_enable_ip; unsigned long hardirq_disable_ip; unsigned int hardirq_enable_event; unsigned int hardirq_disable_event; int hardirqs_enabled; int hardirq_context; unsigned long softirq_disable_ip; unsigned long softirq_enable_ip; unsigned int softirq_disable_event; unsigned int softirq_enable_event; int softirqs_enabled; int softirq_context; u64 curr_chain_key; int lockdep_depth; unsigned int lockdep_recursion; struct held_lock held_locks[48U]; gfp_t lockdep_reclaim_gfp; void *journal_info; struct bio_list *bio_list; struct blk_plug *plug; struct reclaim_state *reclaim_state; struct backing_dev_info *backing_dev_info; struct io_context *io_context; unsigned long ptrace_message; siginfo_t *last_siginfo; struct task_io_accounting ioac; u64 acct_rss_mem1; u64 acct_vm_mem1; cputime_t acct_timexpd; nodemask_t mems_allowed; seqcount_t mems_allowed_seq; int cpuset_mem_spread_rotor; int cpuset_slab_spread_rotor; struct css_set *cgroups; struct list_head cg_list; struct robust_list_head *robust_list; struct compat_robust_list_head *compat_robust_list; struct list_head pi_state_list; struct futex_pi_state *pi_state_cache; struct perf_event_context *perf_event_ctxp[2U]; struct mutex perf_event_mutex; struct list_head perf_event_list; struct mempolicy *mempolicy; short il_next; short pref_node_fork; int numa_scan_seq; unsigned int numa_scan_period; unsigned int numa_scan_period_max; int numa_preferred_nid; unsigned long numa_migrate_retry; u64 node_stamp; u64 last_task_numa_placement; u64 last_sum_exec_runtime; struct callback_head numa_work; struct list_head numa_entry; struct numa_group *numa_group; unsigned long *numa_faults; unsigned long total_numa_faults; unsigned long numa_faults_locality[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 int kasan_depth; unsigned long trace; unsigned long trace_recursion; struct memcg_oom_info memcg_oom; struct uprobe_task *utask; unsigned int sequential_io; unsigned int sequential_io_avg; unsigned long task_state_change; } ; 93 struct hlist_bl_node ; 93 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_192 { spinlock_t lock; int count; } ; 114 union __anonunion____missing_field_name_191 { struct __anonstruct____missing_field_name_192 __annonCompField57; } ; 114 struct lockref { union __anonunion____missing_field_name_191 __annonCompField58; } ; 50 struct path ; 51 struct vfsmount ; 52 struct __anonstruct____missing_field_name_194 { u32 hash; u32 len; } ; 52 union __anonunion____missing_field_name_193 { struct __anonstruct____missing_field_name_194 __annonCompField59; u64 hash_len; } ; 52 struct qstr { union __anonunion____missing_field_name_193 __annonCompField60; const unsigned char *name; } ; 90 struct dentry_operations ; 90 union __anonunion_d_u_195 { struct hlist_node d_alias; 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; struct list_head d_child; struct list_head d_subdirs; union __anonunion_d_u_195 d_u; } ; 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 ); } ; 555 struct path { struct vfsmount *mnt; struct dentry *dentry; } ; 19 struct shrink_control { gfp_t gfp_mask; unsigned long nr_to_scan; int nid; struct mem_cgroup *memcg; } ; 27 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; } ; 80 struct list_lru_one { struct list_head list; long nr_items; } ; 32 struct list_lru_memcg { struct list_lru_one *lru[0U]; } ; 37 struct list_lru_node { spinlock_t lock; struct list_lru_one lru; struct list_lru_memcg *memcg_lrus; } ; 47 struct list_lru { struct list_lru_node *node; struct list_head list; } ; 58 struct __anonstruct____missing_field_name_197 { struct radix_tree_node *parent; void *private_data; } ; 58 union __anonunion____missing_field_name_196 { struct __anonstruct____missing_field_name_197 __annonCompField61; struct callback_head callback_head; } ; 58 struct radix_tree_node { unsigned int path; unsigned int count; union __anonunion____missing_field_name_196 __annonCompField62; struct list_head private_list; void *slots[64U]; unsigned long tags[3U][1U]; } ; 105 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 ; 17 typedef void bio_end_io_t(struct bio *, int); 19 struct bio_vec { struct page *bv_page; unsigned int bv_len; unsigned int bv_offset; } ; 28 struct bvec_iter { sector_t bi_sector; unsigned int bi_size; unsigned int bi_idx; unsigned int bi_bvec_done; } ; 40 union __anonunion____missing_field_name_198 { struct bio_integrity_payload *bi_integrity; } ; 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; union __anonunion____missing_field_name_198 __annonCompField63; 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]; } ; 60 struct export_operations ; 61 struct hd_geometry ; 62 struct iovec ; 63 struct nameidata ; 64 struct kiocb ; 65 struct poll_table_struct ; 66 struct kstatfs ; 67 struct swap_info_struct ; 68 struct iov_iter ; 69 struct vm_fault ; 72 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; } ; 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_199 { projid_t val; } ; 23 typedef struct __anonstruct_kprojid_t_199 kprojid_t; 125 struct if_dqinfo { __u64 dqi_bgrace; __u64 dqi_igrace; __u32 dqi_flags; __u32 dqi_valid; } ; 164 enum quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 } ; 65 typedef long long qsize_t; 66 union __anonunion____missing_field_name_200 { kuid_t uid; kgid_t gid; kprojid_t projid; } ; 66 struct kqid { union __anonunion____missing_field_name_200 __annonCompField64; enum quota_type type; } ; 183 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; } ; 205 struct quota_format_type ; 206 struct mem_dqinfo { struct quota_format_type *dqi_format; int dqi_fmt_id; struct list_head dqi_dirty_list; unsigned long dqi_flags; unsigned int dqi_bgrace; unsigned int dqi_igrace; qsize_t dqi_max_spc_limit; qsize_t dqi_max_ino_limit; void *dqi_priv; } ; 271 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; } ; 298 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 *); } ; 309 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 *); } ; 323 struct qc_dqblk { int d_fieldmask; u64 d_spc_hardlimit; u64 d_spc_softlimit; u64 d_ino_hardlimit; u64 d_ino_softlimit; u64 d_space; u64 d_ino_count; s64 d_ino_timer; s64 d_spc_timer; int d_ino_warns; int d_spc_warns; u64 d_rt_spc_hardlimit; u64 d_rt_spc_softlimit; u64 d_rt_space; s64 d_rt_spc_timer; int d_rt_spc_warns; } ; 346 struct quotactl_ops { int (*quota_on)(struct super_block *, int, int, struct path *); int (*quota_off)(struct super_block *, int); int (*quota_enable)(struct super_block *, unsigned int); int (*quota_disable)(struct super_block *, unsigned int); int (*quota_sync)(struct super_block *, int); int (*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 qc_dqblk *); int (*set_dqblk)(struct super_block *, struct kqid , struct qc_dqblk *); int (*get_xstate)(struct super_block *, struct fs_quota_stat *); int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); int (*rm_xquota)(struct super_block *, unsigned int); } ; 384 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; } ; 430 struct quota_info { unsigned int flags; struct mutex dqio_mutex; struct mutex dqonoff_mutex; struct inode *files[2U]; struct mem_dqinfo info[2U]; const struct quota_format_ops *ops[2U]; } ; 460 struct writeback_control ; 337 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 *, struct iov_iter *, loff_t ); int (*migratepage)(struct address_space *, struct page *, struct page *, enum migrate_mode ); int (*launder_page)(struct page *); int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); void (*is_dirty_writeback)(struct page *, bool *, bool *); int (*error_remove_page)(struct address_space *, struct page *); int (*swap_activate)(struct swap_info_struct *, struct file *, sector_t *); void (*swap_deactivate)(struct file *); } ; 394 struct address_space { struct inode *host; struct radix_tree_root page_tree; spinlock_t tree_lock; atomic_t i_mmap_writable; struct rb_root i_mmap; struct rw_semaphore i_mmap_rwsem; unsigned long nrpages; unsigned long nrshadows; unsigned long writeback_index; const struct address_space_operations *a_ops; unsigned long flags; spinlock_t private_lock; struct list_head private_list; void *private_data; } ; 414 struct request_queue ; 415 struct hd_struct ; 415 struct gendisk ; 415 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; } ; 531 struct posix_acl ; 532 struct inode_operations ; 532 union __anonunion____missing_field_name_203 { const unsigned int i_nlink; unsigned int __i_nlink; } ; 532 union __anonunion____missing_field_name_204 { struct hlist_head i_dentry; struct callback_head i_rcu; } ; 532 struct file_lock_context ; 532 struct cdev ; 532 union __anonunion____missing_field_name_205 { struct pipe_inode_info *i_pipe; struct block_device *i_bdev; struct cdev *i_cdev; } ; 532 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_203 __annonCompField65; 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_204 __annonCompField66; u64 i_version; atomic_t i_count; atomic_t i_dio_count; atomic_t i_writecount; atomic_t i_readcount; const struct file_operations *i_fop; struct file_lock_context *i_flctx; struct address_space i_data; struct list_head i_devices; union __anonunion____missing_field_name_205 __annonCompField67; __u32 i_generation; __u32 i_fsnotify_mask; struct hlist_head i_fsnotify_marks; void *i_private; } ; 768 struct fown_struct { rwlock_t lock; struct pid *pid; enum pid_type pid_type; kuid_t uid; kuid_t euid; int signum; } ; 776 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; } ; 799 union __anonunion_f_u_206 { struct llist_node fu_llist; struct callback_head fu_rcuhead; } ; 799 struct file { union __anonunion_f_u_206 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; } ; 883 typedef void *fl_owner_t; 884 struct file_lock ; 885 struct file_lock_operations { void (*fl_copy_lock)(struct file_lock *, struct file_lock *); void (*fl_release_private)(struct file_lock *); } ; 891 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_get_owner)(struct file_lock *, struct file_lock *); void (*lm_put_owner)(struct file_lock *); void (*lm_notify)(struct file_lock *); int (*lm_grant)(struct file_lock *, int); bool (*lm_break)(struct file_lock *); int (*lm_change)(struct file_lock *, int, struct list_head *); void (*lm_setup)(struct file_lock *, void **); } ; 907 struct net ; 912 struct nlm_lockowner ; 913 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_208 { struct list_head link; int state; } ; 19 union __anonunion_fl_u_207 { struct nfs_lock_info nfs_fl; struct nfs4_lock_info nfs4_fl; struct __anonstruct_afs_208 afs; } ; 19 struct file_lock { struct file_lock *fl_next; struct list_head fl_list; struct hlist_node fl_link; struct list_head fl_block; fl_owner_t fl_owner; unsigned int fl_flags; unsigned char fl_type; unsigned int fl_pid; int fl_link_cpu; struct pid *fl_nspid; wait_queue_head_t fl_wait; struct file *fl_file; loff_t fl_start; loff_t fl_end; struct fasync_struct *fl_fasync; unsigned long fl_break_time; unsigned long fl_downgrade_time; const struct file_lock_operations *fl_ops; const struct lock_manager_operations *fl_lmops; union __anonunion_fl_u_207 fl_u; } ; 965 struct file_lock_context { spinlock_t flc_lock; struct list_head flc_flock; struct list_head flc_posix; struct list_head flc_lease; } ; 1021 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; } ; 1194 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]; } ; 1223 struct super_operations ; 1223 struct xattr_handler ; 1223 struct mtd_info ; 1223 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; unsigned int s_quota_types; struct quota_info s_dquot; struct sb_writers s_writers; char s_id[32U]; u8 s_uuid[16U]; void *s_fs_info; unsigned int s_max_links; fmode_t s_mode; u32 s_time_gran; struct mutex s_vfs_rename_mutex; char *s_subtype; char *s_options; 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 hlist_head s_pins; struct list_lru s_dentry_lru; struct list_lru s_inode_lru; struct callback_head rcu; int s_stack_depth; } ; 1461 struct fiemap_extent_info { unsigned int fi_flags; unsigned int fi_extents_mapped; unsigned int fi_extents_max; struct fiemap_extent *fi_extents_start; } ; 1475 struct dir_context ; 1500 struct dir_context { int (*actor)(struct dir_context *, const char *, int, loff_t , u64 , unsigned int); loff_t pos; } ; 1506 struct block_device_operations ; 1507 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 ); ssize_t (*read_iter)(struct kiocb *, struct iov_iter *); ssize_t (*write_iter)(struct kiocb *, struct iov_iter *); int (*iterate)(struct file *, struct dir_context *); unsigned int (*poll)(struct file *, struct poll_table_struct *); long 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 *); void (*mremap)(struct file *, struct vm_area_struct *); int (*open)(struct inode *, struct file *); int (*flush)(struct file *, fl_owner_t ); int (*release)(struct inode *, struct file *); int (*fsync)(struct file *, loff_t , loff_t , int); int (*aio_fsync)(struct kiocb *, int); int (*fasync)(int, struct file *, int); int (*lock)(struct file *, int, struct file_lock *); ssize_t (*sendpage)(struct file *, struct page *, int, size_t , loff_t *, int); unsigned long 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 **, void **); long int (*fallocate)(struct file *, int, loff_t , loff_t ); void (*show_fdinfo)(struct seq_file *, struct file *); } ; 1570 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 (*rename2)(struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int); int (*setattr)(struct dentry *, struct iattr *); int (*getattr)(struct vfsmount *, struct dentry *, struct kstat *); int (*setxattr)(struct dentry *, 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); int (*dentry_open)(struct dentry *, struct file *, const struct cred *); } ; 1624 struct super_operations { struct inode * (*alloc_inode)(struct super_block *); void (*destroy_inode)(struct inode *); void (*dirty_inode)(struct inode *, int); int (*write_inode)(struct inode *, struct writeback_control *); int (*drop_inode)(struct inode *); void (*evict_inode)(struct inode *); void (*put_super)(struct super_block *); int (*sync_fs)(struct super_block *, int); int (*freeze_super)(struct super_block *); int (*freeze_fs)(struct super_block *); int (*thaw_super)(struct super_block *); int (*unfreeze_fs)(struct super_block *); int (*statfs)(struct dentry *, struct kstatfs *); int (*remount_fs)(struct super_block *, int *, char *); void (*umount_begin)(struct super_block *); int (*show_options)(struct seq_file *, struct dentry *); int (*show_devname)(struct seq_file *, struct dentry *); int (*show_path)(struct seq_file *, struct dentry *); int (*show_stats)(struct seq_file *, struct dentry *); ssize_t (*quota_read)(struct super_block *, int, char *, size_t , loff_t ); ssize_t (*quota_write)(struct super_block *, int, const char *, size_t , loff_t ); struct dquot ** (*get_dquots)(struct inode *); int (*bdev_try_to_free_page)(struct super_block *, struct page *, gfp_t ); long int (*nr_cached_objects)(struct super_block *, struct shrink_control *); long int (*free_cached_objects)(struct super_block *, struct shrink_control *); } ; 1856 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; } ; 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; } ; 623 struct klist_node ; 624 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 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 *); } ; 186 struct pinctrl ; 187 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; } ; 48 struct dma_map_ops ; 48 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; const struct iommu_ops *iommu_ops; struct subsys_private *p; struct lock_class_key lock_key; } ; 138 struct device_type ; 196 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; } ; 322 struct class_attribute ; 322 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; } ; 415 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 ); } ; 483 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; } ; 511 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 ); } ; 643 struct device_dma_parameters { unsigned int max_segment_size; unsigned long segment_boundary_mask; } ; 652 struct acpi_device ; 653 struct acpi_dev_node { struct acpi_device *companion; } ; 659 struct dma_coherent_mem ; 659 struct cma ; 659 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; void *driver_data; struct dev_pm_info power; struct dev_pm_domain *pm_domain; struct dev_pin_info *pins; int numa_node; u64 *dma_mask; u64 coherent_dma_mask; unsigned long dma_pfn_offset; struct device_dma_parameters *dma_parms; struct list_head dma_pools; struct dma_coherent_mem *dma_mem; struct cma *cma_area; struct dev_archdata archdata; struct device_node *of_node; struct 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; } ; 806 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; } ; 70 struct hotplug_slot ; 70 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; 190 typedef unsigned short pci_bus_flags_t; 247 struct pcie_link_state ; 248 struct pci_vpd ; 249 struct pci_sriov ; 250 struct pci_ats ; 251 struct proc_dir_entry ; 251 struct pci_driver ; 251 union __anonunion____missing_field_name_214 { struct pci_sriov *sriov; struct pci_dev *physfn; } ; 251 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; u8 dma_alias_devfn; struct pci_driver *driver; u64 dma_mask; struct device_dma_parameters dma_parms; pci_power_t current_state; u8 pm_cap; unsigned char pme_support; 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 char ignore_hotplug; 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 no_64bit_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; unsigned char irq_managed; 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_214 __annonCompField70; struct pci_ats *ats; phys_addr_t rom; size_t romlen; char *driver_override; } ; 438 struct pci_ops ; 438 struct msi_controller ; 438 struct pci_bus { struct list_head node; struct pci_bus *parent; struct list_head children; struct list_head devices; struct pci_dev *self; struct list_head slots; struct resource *resource[4U]; struct list_head resources; struct resource busn_res; struct pci_ops *ops; struct msi_controller *msi; void *sysdata; struct proc_dir_entry *procdir; unsigned char number; unsigned char primary; unsigned char max_bus_speed; unsigned char cur_bus_speed; char name[48U]; unsigned short bridge_ctl; pci_bus_flags_t bus_flags; struct device *bridge; struct device dev; struct bin_attribute *legacy_io; struct bin_attribute *legacy_mem; unsigned char is_added; } ; 558 struct pci_ops { void * (*map_bus)(struct pci_bus *, unsigned int, int); int (*read)(struct pci_bus *, unsigned int, int, int, u32 *); int (*write)(struct pci_bus *, unsigned int, int, int, u32 ); } ; 580 struct pci_dynids { spinlock_t lock; struct list_head list; } ; 594 typedef unsigned int pci_ers_result_t; 604 struct pci_error_handlers { pci_ers_result_t (*error_detected)(struct pci_dev *, enum pci_channel_state ); pci_ers_result_t (*mmio_enabled)(struct pci_dev *); pci_ers_result_t (*link_reset)(struct pci_dev *); pci_ers_result_t (*slot_reset)(struct pci_dev *); void (*reset_notify)(struct pci_dev *, bool ); void (*resume)(struct pci_dev *); } ; 637 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; } ; 1182 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; } ; 39 struct msix_entry { u32 vector; u16 entry; } ; 206 struct vm_fault { unsigned int flags; unsigned long pgoff; void *virtual_address; struct page *cow_page; struct page *page; unsigned long max_pgoff; pte_t *pte; } ; 238 struct vm_operations_struct { void (*open)(struct vm_area_struct *); void (*close)(struct vm_area_struct *); int (*fault)(struct vm_area_struct *, struct vm_fault *); void (*map_pages)(struct vm_area_struct *, struct vm_fault *); int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); int (*access)(struct vm_area_struct *, unsigned long, void *, int, int); const char * (*name)(struct vm_area_struct *); int (*set_policy)(struct vm_area_struct *, struct mempolicy *); struct mempolicy * (*get_policy)(struct vm_area_struct *, unsigned long); struct page * (*find_special_page)(struct vm_area_struct *, unsigned long); } ; 1281 struct kvec ; 34 struct dma_attrs { unsigned long flags[1U]; } ; 70 enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; 77 struct sg_table { struct scatterlist *sgl; unsigned int nents; unsigned int orig_nents; } ; 351 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; } ; 1889 struct firmware { size_t size; const u8 *data; struct page **pages; void *priv; } ; 62 struct exception_table_entry { int insn; int fixup; } ; 739 enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED = 1, IRQ_WAKE_THREAD = 2 } ; 16 typedef enum irqreturn irqreturn_t; 652 struct cdev { struct kobject kobj; struct module *owner; const struct file_operations *ops; struct list_head list; dev_t dev; unsigned int count; } ; 64 struct scsi_cmnd ; 381 struct scsi_lun { __u8 scsi_lun[8U]; } ; 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; } ; 72 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 ; 37 typedef int congested_fn(void *, int); 46 struct bdi_writeback { struct backing_dev_info *bdi; 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; struct list_head b_dirty_time; spinlock_t list_lock; } ; 61 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_219 { struct list_head q_node; struct kmem_cache *__rcu_icq_cache; } ; 77 union __anonunion____missing_field_name_220 { 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_219 __annonCompField74; union __anonunion____missing_field_name_220 __annonCompField75; 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; } ; 312 struct bio_integrity_payload { struct bio *bip_bio; struct bvec_iter bip_iter; bio_end_io_t *bip_end_io; unsigned short bip_slab; unsigned short bip_vcnt; unsigned short bip_max_vcnt; unsigned short bip_flags; struct work_struct bip_work; struct bio_vec *bip_vec; struct bio_vec bip_inline_vecs[0U]; } ; 525 struct bio_list { struct bio *head; struct bio *tail; } ; 646 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; } ; 64 struct bsg_class_device { struct device *class_dev; struct device *parent; int minor; struct request_queue *queue; struct kref ref; void (*release)(struct device *); } ; 21 struct percpu_ref ; 55 typedef void percpu_ref_func_t(struct percpu_ref *); 68 struct percpu_ref { atomic_long_t count; unsigned long percpu_count_ptr; percpu_ref_func_t *release; percpu_ref_func_t *confirm_switch; bool force_atomic; struct callback_head rcu; } ; 328 struct elevator_queue ; 331 struct request ; 333 struct bsg_job ; 334 struct blkcg_gq ; 335 struct blk_flush_queue ; 51 typedef void rq_end_io_fn(struct request *, int); 52 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; } ; 71 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 } ; 83 union __anonunion____missing_field_name_221 { struct call_single_data csd; unsigned long fifo_time; } ; 83 struct blk_mq_ctx ; 83 union __anonunion____missing_field_name_222 { struct hlist_node hash; struct list_head ipi_list; } ; 83 union __anonunion____missing_field_name_223 { struct rb_node rb_node; void *completion_data; } ; 83 struct __anonstruct_elv_225 { struct io_cq *icq; void *priv[2U]; } ; 83 struct __anonstruct_flush_226 { unsigned int seq; struct list_head list; rq_end_io_fn *saved_end_io; } ; 83 union __anonunion____missing_field_name_224 { struct __anonstruct_elv_225 elv; struct __anonstruct_flush_226 flush; } ; 83 struct request { struct list_head queuelist; union __anonunion____missing_field_name_221 __annonCompField76; 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; union __anonunion____missing_field_name_222 __annonCompField77; union __anonunion____missing_field_name_223 __annonCompField78; union __anonunion____missing_field_name_224 __annonCompField79; struct gendisk *rq_disk; struct hd_struct *part; unsigned long start_time; struct request_list *rl; unsigned long long start_time_ns; unsigned long long io_start_time_ns; unsigned short nr_phys_segments; unsigned short nr_integrity_segments; unsigned short ioprio; void *special; int tag; int errors; unsigned char __cmd[16U]; unsigned char *cmd; unsigned short cmd_len; unsigned int extra_len; unsigned int sense_len; unsigned int resid_len; void *sense; unsigned long deadline; struct list_head timeout_list; unsigned int timeout; int retries; rq_end_io_fn *end_io; void *end_io_data; struct request *next_rq; } ; 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]; } ; 236 typedef void request_fn_proc(struct request_queue *); 237 typedef void make_request_fn(struct request_queue *, struct bio *); 238 typedef int prep_rq_fn(struct request_queue *, struct request *); 239 typedef void unprep_rq_fn(struct request_queue *, struct request *); 240 struct bvec_merge_data { struct block_device *bi_bdev; sector_t bi_sector; unsigned int bi_size; unsigned long bi_rw; } ; 248 typedef int merge_bvec_fn(struct request_queue *, struct bvec_merge_data *, struct bio_vec *); 250 typedef void softirq_done_fn(struct request *); 251 typedef int dma_drain_needed_fn(struct request *); 252 typedef int lld_busy_fn(struct request_queue *); 253 typedef int bsg_job_fn(struct bsg_job *); 254 enum blk_eh_timer_return { BLK_EH_NOT_HANDLED = 0, BLK_EH_HANDLED = 1, BLK_EH_RESET_TIMER = 2 } ; 261 typedef enum blk_eh_timer_return rq_timed_out_fn(struct request *); 267 struct blk_queue_tag { struct request **tag_index; unsigned long *tag_map; int busy; int max_depth; int real_max_depth; atomic_t refcnt; int alloc_policy; int next_tag; } ; 278 struct queue_limits { unsigned long bounce_pfn; unsigned long seg_boundary_mask; unsigned int max_hw_sectors; unsigned int chunk_sectors; unsigned int max_sectors; unsigned int max_segment_size; unsigned int physical_block_size; unsigned int alignment_offset; unsigned int io_min; unsigned int io_opt; unsigned int max_discard_sectors; unsigned int max_write_same_sectors; unsigned int discard_granularity; unsigned int discard_alignment; unsigned short logical_block_size; unsigned short max_segments; unsigned short max_integrity_segments; unsigned char misaligned; unsigned char discard_misaligned; unsigned char cluster; unsigned char discard_zeroes_data; unsigned char raid_partial_stripes_expensive; } ; 311 struct blk_mq_ops ; 311 struct blk_mq_hw_ctx ; 311 struct throtl_data ; 311 struct blk_mq_tag_set ; 311 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; struct blk_flush_queue *fq; struct list_head requeue_list; spinlock_t requeue_lock; struct work_struct requeue_work; struct mutex sysfs_lock; int bypass_depth; int mq_freeze_depth; bsg_job_fn *bsg_job_fn; int bsg_job_size; struct bsg_class_device bsg_dev; struct throtl_data *td; struct callback_head callback_head; wait_queue_head_t mq_freeze_wq; struct percpu_ref mq_usage_counter; struct list_head all_q_node; struct blk_mq_tag_set *tag_set; struct list_head tag_set_list; } ; 1069 struct blk_plug { struct list_head list; struct list_head mq_list; struct list_head cb_list; } ; 1447 struct blk_integrity_iter { void *prot_buf; void *data_buf; sector_t seed; unsigned int data_size; unsigned short interval; const char *disk_name; } ; 1476 typedef int integrity_processing_fn(struct blk_integrity_iter *); 1477 struct blk_integrity { integrity_processing_fn *generate_fn; integrity_processing_fn *verify_fn; unsigned short flags; unsigned short tuple_size; unsigned short interval; unsigned short tag_size; const char *name; struct kobject kobj; } ; 1531 struct block_device_operations { int (*open)(struct block_device *, fmode_t ); void (*release)(struct gendisk *, fmode_t ); int (*rw_page)(struct block_device *, sector_t , struct page *, int); int (*ioctl)(struct block_device *, fmode_t , unsigned int, unsigned long); int (*compat_ioctl)(struct block_device *, fmode_t , unsigned int, unsigned long); long int (*direct_access)(struct block_device *, sector_t , void **, unsigned long *, long); unsigned int (*check_events)(struct gendisk *, unsigned int); int (*media_changed)(struct gendisk *); void (*unlock_native_capacity)(struct gendisk *); int (*revalidate_disk)(struct gendisk *); int (*getgeo)(struct block_device *, struct hd_geometry *); void (*swap_slot_free_notify)(struct block_device *, unsigned long); struct module *owner; } ; 1627 struct blk_mq_tags ; 1628 struct blk_mq_cpu_notifier { struct list_head list; void *data; int (*notify)(void *, unsigned long, unsigned int); } ; 14 struct blk_align_bitmap ; 14 struct blk_mq_ctxmap { unsigned int map_size; unsigned int bits_per_word; struct blk_align_bitmap *map; } ; 20 struct __anonstruct____missing_field_name_228 { spinlock_t lock; struct list_head dispatch; } ; 20 struct blk_mq_hw_ctx { struct __anonstruct____missing_field_name_228 __annonCompField80; unsigned long state; struct delayed_work run_work; struct delayed_work delay_work; cpumask_var_t cpumask; int next_cpu; int next_cpu_batch; unsigned long flags; struct request_queue *queue; struct blk_flush_queue *fq; void *driver_data; struct blk_mq_ctxmap ctx_map; unsigned int nr_ctx; struct blk_mq_ctx **ctxs; atomic_t wait_index; struct blk_mq_tags *tags; unsigned long queued; unsigned long run; unsigned long dispatched[10U]; unsigned int numa_node; unsigned int queue_num; atomic_t nr_active; struct blk_mq_cpu_notifier cpu_notifier; struct kobject kobj; } ; 63 struct blk_mq_tag_set { struct blk_mq_ops *ops; unsigned int nr_hw_queues; unsigned int queue_depth; unsigned int reserved_tags; unsigned int cmd_size; int numa_node; unsigned int timeout; unsigned int flags; void *driver_data; struct blk_mq_tags **tags; struct mutex tag_list_lock; struct list_head tag_list; } ; 80 struct blk_mq_queue_data { struct request *rq; struct list_head *list; bool last; } ; 87 typedef int queue_rq_fn(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *); 88 typedef struct blk_mq_hw_ctx * map_queue_fn(struct request_queue *, const int); 89 typedef enum blk_eh_timer_return timeout_fn(struct request *, bool ); 90 typedef int init_hctx_fn(struct blk_mq_hw_ctx *, void *, unsigned int); 91 typedef void exit_hctx_fn(struct blk_mq_hw_ctx *, unsigned int); 92 typedef int init_request_fn(void *, struct request *, unsigned int, unsigned int, unsigned int); 94 typedef void exit_request_fn(void *, struct request *, unsigned int, unsigned int); 98 struct blk_mq_ops { queue_rq_fn *queue_rq; map_queue_fn *map_queue; timeout_fn *timeout; softirq_done_fn *complete; init_hctx_fn *init_hctx; exit_hctx_fn *exit_hctx; init_request_fn *init_request; exit_request_fn *exit_request; } ; 240 struct scsi_device ; 241 struct scsi_host_cmd_pool ; 242 struct scsi_target ; 243 struct Scsi_Host ; 244 struct scsi_transport_template ; 246 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 (*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 (*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 int max_sectors; unsigned long dma_boundary; short cmd_per_lun; unsigned char present; int tag_alloc_policy; unsigned char use_blk_tags; unsigned char track_queue_depth; unsigned char supported_mode; unsigned char unchecked_isa_dma; unsigned char use_clustering; unsigned char emulated; unsigned char skip_settle_delay; 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; unsigned int cmd_size; struct scsi_host_cmd_pool *cmd_pool; bool disable_blk_mq; } ; 507 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 } ; 517 union __anonunion____missing_field_name_229 { struct blk_queue_tag *bqt; struct blk_mq_tag_set tag_set; } ; 517 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; union __anonunion____missing_field_name_229 __annonCompField81; atomic_t host_busy; atomic_t host_blocked; unsigned int host_failed; unsigned int host_eh_scheduled; unsigned int host_no; int eh_deadline; unsigned long last_reset; unsigned int max_channel; unsigned int max_id; u64 max_lun; 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 int max_sectors; unsigned long dma_boundary; unsigned int nr_hw_queues; unsigned long cmd_serial_number; unsigned char active_mode; unsigned char unchecked_isa_dma; unsigned char use_clustering; unsigned char host_self_blocked; unsigned char reverse_ordering; unsigned char tmf_in_progress; unsigned char async_scan; unsigned char eh_noresume; unsigned char no_write_same; unsigned char use_blk_mq; unsigned char use_cmd_list; char work_q_name[20U]; struct workqueue_struct *work_q; struct workqueue_struct *tmf_work_q; unsigned char no_scsi2_lun_in_cdb; 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]; } ; 935 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; atomic_t device_busy; atomic_t device_blocked; 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 channel; u64 lun; 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; int vpd_pg83_len; unsigned char *vpd_pg83; int vpd_pg80_len; unsigned char *vpd_pg80; unsigned char current_tag; struct scsi_target *sdev_target; unsigned int sdev_bflags; unsigned int eh_timeout; 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 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 try_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; unsigned char broken_fua; unsigned char lun_in_cdb; 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 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]; } ; 204 struct scsi_device_handler { struct list_head list; struct module *module; const char *name; int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); struct scsi_dh_data * (*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 *); } ; 219 struct scsi_dh_data { struct scsi_device_handler *scsi_dh; struct scsi_device *sdev; struct kref kref; } ; 249 enum scsi_target_state { STARGET_CREATED = 1, STARGET_RUNNING = 2, STARGET_DEL = 3 } ; 255 struct scsi_target { struct scsi_device *starget_sdev_user; struct list_head siblings; struct list_head devices; struct device dev; struct kref 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; atomic_t target_busy; atomic_t target_blocked; unsigned int can_queue; unsigned int max_target_blocked; char scsi_level; enum scsi_target_state state; void *hostdata; unsigned long starget_data[0U]; } ; 535 struct scsi_data_buffer { struct sg_table table; unsigned int length; int resid; } ; 39 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; } ; 55 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 char prot_flags; 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; int flags; unsigned char tag; } ; 99 struct iovec { void *iov_base; __kernel_size_t iov_len; } ; 21 struct kvec { void *iov_base; size_t iov_len; } ; 27 union __anonunion____missing_field_name_232 { const struct iovec *iov; const struct kvec *kvec; const struct bio_vec *bvec; } ; 27 struct iov_iter { int type; size_t iov_offset; size_t count; union __anonunion____missing_field_name_232 __annonCompField82; unsigned long nr_segs; } ; 3236 struct mnt_namespace ; 3237 struct ipc_namespace ; 3238 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; } ; 96 enum fc_port_type { FC_PORTTYPE_UNKNOWN = 0, FC_PORTTYPE_OTHER = 1, FC_PORTTYPE_NOTPRESENT = 2, FC_PORTTYPE_NPORT = 3, FC_PORTTYPE_NLPORT = 4, FC_PORTTYPE_LPORT = 5, FC_PORTTYPE_PTP = 6, FC_PORTTYPE_NPIV = 7 } ; 107 enum fc_port_state { FC_PORTSTATE_UNKNOWN = 0, FC_PORTSTATE_NOTPRESENT = 1, FC_PORTSTATE_ONLINE = 2, FC_PORTSTATE_OFFLINE = 3, FC_PORTSTATE_BLOCKED = 4, FC_PORTSTATE_BYPASSED = 5, FC_PORTSTATE_DIAGNOSTICS = 6, FC_PORTSTATE_LINKDOWN = 7, FC_PORTSTATE_ERROR = 8, FC_PORTSTATE_LOOPBACK = 9, FC_PORTSTATE_DELETED = 10 } ; 121 enum fc_vport_state { FC_VPORT_UNKNOWN = 0, FC_VPORT_ACTIVE = 1, FC_VPORT_DISABLED = 2, FC_VPORT_LINKDOWN = 3, FC_VPORT_INITIALIZING = 4, FC_VPORT_NO_FABRIC_SUPP = 5, FC_VPORT_NO_FABRIC_RSCS = 6, FC_VPORT_FABRIC_LOGOUT = 7, FC_VPORT_FABRIC_REJ_WWN = 8, FC_VPORT_FAILED = 9 } ; 141 struct fc_vport_identifiers { u64 node_name; u64 port_name; u32 roles; bool disable; enum fc_port_type vport_type; char symbolic_name[64U]; } ; 194 struct fc_vport { enum fc_vport_state vport_state; enum fc_vport_state vport_last_state; u64 node_name; u64 port_name; u32 roles; u32 vport_id; enum fc_port_type vport_type; char symbolic_name[64U]; void *dd_data; struct Scsi_Host *shost; unsigned int channel; u32 number; u8 flags; struct list_head peers; struct device dev; struct work_struct vport_delete_work; } ; 293 struct fc_rport { u32 maxframe_size; u32 supported_classes; u32 dev_loss_tmo; u64 node_name; u64 port_name; u32 port_id; u32 roles; enum fc_port_state port_state; u32 scsi_target_id; u32 fast_io_fail_tmo; void *dd_data; unsigned int channel; u32 number; u8 flags; struct list_head peers; struct device dev; struct delayed_work dev_loss_work; struct work_struct scan_work; struct delayed_work fail_io_work; struct work_struct stgt_delete_work; struct work_struct rport_delete_work; struct request_queue *rqst_q; } ; 393 struct fc_host_statistics { u64 seconds_since_last_reset; u64 tx_frames; u64 tx_words; u64 rx_frames; u64 rx_words; u64 lip_count; u64 nos_count; u64 error_frames; u64 dumped_frames; u64 link_failure_count; u64 loss_of_sync_count; u64 loss_of_signal_count; u64 prim_seq_protocol_err_count; u64 invalid_tx_word_count; u64 invalid_crc_count; u64 fcp_input_requests; u64 fcp_output_requests; u64 fcp_control_requests; u64 fcp_input_megabytes; u64 fcp_output_megabytes; u64 fcp_packet_alloc_failures; u64 fcp_packet_aborts; u64 fcp_frame_alloc_failures; u64 fc_no_free_exch; u64 fc_no_free_exch_xid; u64 fc_xid_not_found; u64 fc_xid_busy; u64 fc_seq_not_found; u64 fc_non_bls_resp; } ; 859 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; } ; 100 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 , u64 ); 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); } ; 317 struct __anonstruct_u32_249 { u32 rsvd; u32 u32; } ; 317 union __anonunion_data_248 { struct __anonstruct_u32_249 u32; u64 u64; } ; 317 struct bfa_trc_s { u16 line; u16 fileno; u32 timestamp; union __anonunion_data_248 data; } ; 64 struct bfa_trc_mod_s { u32 head; u32 tail; u32 ntrc; u32 stopped; u32 ticks; u32 rsvd[3U]; struct bfa_trc_s trc[4096U]; } ; 285 struct bfa_wc_s { void (*wc_resume)(void *); void *wc_cbarg; int wc_count; } ; 333 union __anonunion_w_251 { u64 wwn; u8 byte[8U]; } ; 23 typedef u64 wwn_t; 24 struct mac_s { u8 mac[6U]; } ; 42 struct fchs_s { unsigned char cat_info; unsigned char routing; unsigned int d_id; unsigned char cs_ctl; unsigned int s_id; unsigned char type; unsigned int f_ctl; u8 seq_id; u8 df_ctl; u16 seq_cnt; __be16 ox_id; u16 rx_id; u32 ro; } ; 1002 enum fc_cos { FC_CLASS_2 = 4, FC_CLASS_3 = 8, FC_CLASS_2_3 = 12 } ; 1018 struct fc_alpabm_s { u8 alpa_bm[16U]; } ; 1093 enum fcp_tm_cmnd { FCP_TM_ABORT_TASK_SET = 2, FCP_TM_CLEAR_TASK_SET = 4, FCP_TM_LUN_RESET = 16, FCP_TM_TARGET_RESET = 32, FCP_TM_CLEAR_ACA = 64 } ; 1658 struct bfa_mfg_vpd_s { u8 version; u8 vpd_sig[3U]; u8 chksum; u8 vendor; u8 len; u8 rsv; u8 data[512U]; } ; 120 enum bfa_status { BFA_STATUS_OK = 0, BFA_STATUS_FAILED = 1, BFA_STATUS_EINVAL = 2, BFA_STATUS_ENOMEM = 3, BFA_STATUS_ETIMER = 5, BFA_STATUS_EPROTOCOL = 6, BFA_STATUS_BADFLASH = 9, BFA_STATUS_SFP_UNSUPP = 10, BFA_STATUS_UNKNOWN_VFID = 11, BFA_STATUS_DATACORRUPTED = 12, BFA_STATUS_DEVBUSY = 13, BFA_STATUS_HDMA_FAILED = 16, BFA_STATUS_FLASH_BAD_LEN = 17, BFA_STATUS_UNKNOWN_LWWN = 18, BFA_STATUS_UNKNOWN_RWWN = 19, BFA_STATUS_VPORT_EXISTS = 21, BFA_STATUS_VPORT_MAX = 22, BFA_STATUS_UNSUPP_SPEED = 23, BFA_STATUS_INVLD_DFSZ = 24, BFA_STATUS_CMD_NOTSUPP = 26, BFA_STATUS_FABRIC_RJT = 29, BFA_STATUS_UNKNOWN_VWWN = 30, BFA_STATUS_PORT_OFFLINE = 34, BFA_STATUS_VPORT_WWN_BP = 46, BFA_STATUS_PORT_NOT_DISABLED = 47, BFA_STATUS_NO_FCPIM_NEXUS = 52, BFA_STATUS_IOC_FAILURE = 56, BFA_STATUS_INVALID_WWN = 57, BFA_STATUS_ADAPTER_ENABLED = 60, BFA_STATUS_IOC_NON_OP = 61, BFA_STATUS_VERSION_FAIL = 70, BFA_STATUS_DIAG_BUSY = 71, BFA_STATUS_BEACON_ON = 72, BFA_STATUS_ENOFSAVE = 78, BFA_STATUS_IOC_DISABLED = 82, BFA_STATUS_ERROR_TRL_ENABLED = 87, BFA_STATUS_ERROR_QOS_ENABLED = 88, BFA_STATUS_NO_SFP_DEV = 89, BFA_STATUS_MEMTEST_FAILED = 90, BFA_STATUS_LEDTEST_OP = 109, BFA_STATUS_INVALID_MAC = 134, BFA_STATUS_CMD_NOTSUPP_CNA = 146, BFA_STATUS_PBC = 154, BFA_STATUS_BAD_FWCFG = 156, BFA_STATUS_INVALID_VENDOR = 158, BFA_STATUS_SFP_NOT_READY = 159, BFA_STATUS_TRUNK_ENABLED = 164, BFA_STATUS_TRUNK_DISABLED = 165, BFA_STATUS_IOPROFILE_OFF = 175, BFA_STATUS_PHY_NOT_PRESENT = 183, BFA_STATUS_FEATURE_NOT_SUPPORTED = 192, BFA_STATUS_ENTRY_EXISTS = 193, BFA_STATUS_ENTRY_NOT_EXISTS = 194, BFA_STATUS_NO_CHANGE = 195, BFA_STATUS_FAA_ENABLED = 197, BFA_STATUS_FAA_DISABLED = 198, BFA_STATUS_FAA_ACQUIRED = 199, BFA_STATUS_FAA_ACQ_ADDR = 200, BFA_STATUS_BBCR_FC_ONLY = 201, BFA_STATUS_ERROR_TRUNK_ENABLED = 203, BFA_STATUS_MAX_ENTRY_REACHED = 212, BFA_STATUS_TOPOLOGY_LOOP = 230, BFA_STATUS_LOOP_UNSUPP_MEZZ = 231, BFA_STATUS_INVALID_BW = 233, BFA_STATUS_QOS_BW_INVALID = 234, BFA_STATUS_DPORT_ENABLED = 235, BFA_STATUS_DPORT_DISABLED = 236, BFA_STATUS_CMD_NOTSUPP_MEZZ = 239, BFA_STATUS_FRU_NOT_PRESENT = 240, BFA_STATUS_DPORT_NO_SFP = 243, BFA_STATUS_DPORT_ERR = 245, BFA_STATUS_DPORT_ENOSYS = 254, BFA_STATUS_DPORT_CANT_PERF = 255, BFA_STATUS_DPORT_LOGICALERR = 256, BFA_STATUS_DPORT_SWBUSY = 257, BFA_STATUS_ERR_BBCR_SPEED_UNSUPPORT = 258, BFA_STATUS_ERROR_BBCR_ENABLED = 259, BFA_STATUS_INVALID_BBSCN = 260, BFA_STATUS_DDPORT_ERR = 261, BFA_STATUS_DPORT_SFPWRAP_ERR = 262, BFA_STATUS_BBCR_CFG_NO_CHANGE = 265, BFA_STATUS_DPORT_SW_NOTREADY = 268, BFA_STATUS_DPORT_INV_SFP = 271, BFA_STATUS_DPORT_CMD_NOTSUPP = 273, BFA_STATUS_MAX_VAL = 274 } ; 208 enum bfa_eproto_status { BFA_EPROTO_BAD_ACCEPT = 0, BFA_EPROTO_UNKNOWN_RSP = 1 } ; 213 enum bfa_boolean { BFA_FALSE = 0, BFA_TRUE = 1 } ; 326 struct bfa_ioc_pci_attr_s { u16 vendor_id; u16 device_id; u16 ssid; u16 ssvid; u32 pcifn; u32 rsvd; char chip_rev[8U]; } ; 371 struct bfa_ioc_drv_stats_s { u32 ioc_isrs; u32 ioc_enables; u32 ioc_disables; u32 ioc_hbfails; u32 ioc_boots; u32 stats_tmos; u32 hb_count; u32 disable_reqs; u32 enable_reqs; u32 disable_replies; u32 enable_replies; u32 rsvd; } ; 420 enum bfa_aen_category { BFA_AEN_CAT_ADAPTER = 1, BFA_AEN_CAT_PORT = 2, BFA_AEN_CAT_LPORT = 3, BFA_AEN_CAT_RPORT = 4, BFA_AEN_CAT_ITNIM = 5, BFA_AEN_CAT_AUDIT = 8, BFA_AEN_CAT_IOC = 9 } ; 435 struct bfa_adapter_aen_data_s { char serial_num[12U]; u32 nports; wwn_t pwwn; } ; 470 struct bfa_port_aen_data_s { wwn_t pwwn; wwn_t fwwn; u32 phy_port_num; u16 ioc_type; u16 level; struct mac_s mac; u16 rsvd; } ; 496 struct bfa_lport_aen_data_s { u16 vf_id; u16 roles; u32 rsvd; wwn_t ppwwn; wwn_t lpwwn; } ; 511 struct bfa_itnim_aen_data_s { u16 vf_id; u16 rsvd[3U]; wwn_t ppwwn; wwn_t lpwwn; wwn_t rpwwn; } ; 527 struct bfa_audit_aen_data_s { wwn_t pwwn; int partition_inst; int partition_type; } ; 546 struct bfa_ioc_aen_data_s { wwn_t pwwn; u16 ioc_type; struct mac_s mac; } ; 641 enum bfa_port_speed { BFA_PORT_SPEED_UNKNOWN = 0, BFA_PORT_SPEED_1GBPS = 1, BFA_PORT_SPEED_2GBPS = 2, BFA_PORT_SPEED_4GBPS = 4, BFA_PORT_SPEED_8GBPS = 8, BFA_PORT_SPEED_10GBPS = 10, BFA_PORT_SPEED_16GBPS = 16, BFA_PORT_SPEED_AUTO = 15 } ; 750 enum bfa_mode_s { BFA_MODE_HBA = 1, BFA_MODE_CNA = 2, BFA_MODE_NIC = 3 } ; 770 struct bfa_ablk_cfg_pf_s { u16 pers; u8 port_id; u8 optrom; u8 valid; u8 sriov; u8 max_vfs; u8 rsvd[1U]; u16 num_qpairs; u16 num_vectors; u16 bw_min; u16 bw_max; } ; 784 struct bfa_ablk_cfg_port_s { u8 mode; u8 type; u8 max_pfs; u8 rsvd[5U]; } ; 791 struct bfa_ablk_cfg_inst_s { u8 nports; u8 max_pfs; u8 rsvd[6U]; struct bfa_ablk_cfg_pf_s pf_cfg[16U]; struct bfa_ablk_cfg_port_s port_cfg[2U]; } ; 799 struct bfa_ablk_cfg_s { struct bfa_ablk_cfg_inst_s inst[2U]; } ; 803 enum bfa_defs_sfp_media_e { BFA_SFP_MEDIA_UNKNOWN = 0, BFA_SFP_MEDIA_CU = 1, BFA_SFP_MEDIA_LW = 2, BFA_SFP_MEDIA_SW = 3, BFA_SFP_MEDIA_EL = 4, BFA_SFP_MEDIA_UNSUPPORT = 5 } ; 825 struct sfp_srlid_base_s { u8 id; u8 extid; u8 connector; u8 xcvr[8U]; u8 encoding; u8 br_norm; u8 rate_id; u8 len_km; u8 len_100m; u8 len_om2; u8 len_om1; u8 len_cu; u8 len_om3; u8 vendor_name[16U]; u8 unalloc1; u8 vendor_oui[3U]; u8 vendor_pn[16U]; u8 vendor_rev[4U]; u8 wavelen[2U]; u8 unalloc2; u8 cc_base; } ; 870 struct sfp_srlid_ext_s { u8 options[2U]; u8 br_max; u8 br_min; u8 vendor_sn[16U]; u8 date_code[8U]; u8 diag_mon_type; u8 en_options; u8 sff_8472; u8 cc_ext; } ; 886 struct sfp_diag_base_s { u8 temp_high_alarm[2U]; u8 temp_low_alarm[2U]; u8 temp_high_warning[2U]; u8 temp_low_warning[2U]; u8 volt_high_alarm[2U]; u8 volt_low_alarm[2U]; u8 volt_high_warning[2U]; u8 volt_low_warning[2U]; u8 bias_high_alarm[2U]; u8 bias_low_alarm[2U]; u8 bias_high_warning[2U]; u8 bias_low_warning[2U]; u8 tx_pwr_high_alarm[2U]; u8 tx_pwr_low_alarm[2U]; u8 tx_pwr_high_warning[2U]; u8 tx_pwr_low_warning[2U]; u8 rx_pwr_high_alarm[2U]; u8 rx_pwr_low_alarm[2U]; u8 rx_pwr_high_warning[2U]; u8 rx_pwr_low_warning[2U]; u8 unallocate_1[16U]; u8 rx_pwr[20U]; u8 tx_i[4U]; u8 tx_pwr[4U]; u8 temp[4U]; u8 volt[4U]; u8 unallocate_2[3U]; u8 cc_dmi; } ; 933 struct sfp_diag_ext_s { u8 diag[10U]; u8 unalloc1[4U]; u8 status_ctl; u8 rsvd; u8 alarm_flags[2U]; u8 unalloc2[2U]; u8 warning_flags[2U]; u8 ext_status_ctl[2U]; } ; 948 struct sfp_usr_eeprom_s { u8 rsvd1[2U]; u8 ewrap; u8 rsvd2[2U]; u8 owrap; u8 rsvd3[2U]; u8 prbs; u8 rsvd4[2U]; u8 tx_eqz_16; u8 tx_eqz_8; u8 rsvd5[2U]; u8 rx_emp_16; u8 rx_emp_8; u8 rsvd6[2U]; u8 tx_eye_adj; u8 rsvd7[3U]; u8 tx_eye_qctl; u8 tx_eye_qres; u8 rsvd8[2U]; u8 poh[3U]; u8 rsvd9[2U]; } ; 976 struct sfp_mem_s { struct sfp_srlid_base_s srlid_base; struct sfp_srlid_ext_s srlid_ext; struct sfp_diag_base_s diag_base; struct sfp_diag_ext_s diag_ext; struct sfp_usr_eeprom_s usr_eeprom; } ; 1208 struct bfa_diag_dport_subtest_result_s { u8 status; u8 rsvd[7U]; u64 start_time; } ; 1214 struct bfa_diag_dport_result_s { wwn_t rp_pwwn; wwn_t rp_nwwn; u64 start_time; u64 end_time; u8 status; u8 mode; u8 rsvd; u8 speed; u16 buffer_required; u16 frmsz; u32 lpcnt; u32 pat; u32 roundtrip_latency; u32 est_cable_distance; struct bfa_diag_dport_subtest_result_s subtest[4U]; } ; 1290 union __anonunion_log_entry_261 { char string_log[32U]; u32 int_log[8U]; } ; 1290 struct bfa_plog_rec_s { u64 tv; u8 port; u8 mid; u8 eid; u8 log_type; u8 log_num_ints; u8 rsvd; u16 misc; union __anonunion_log_entry_261 log_entry; } ; 56 enum bfa_plog_mid { BFA_PL_MID_INVALID = 0, BFA_PL_MID_DEBUG = 1, BFA_PL_MID_DRVR = 2, BFA_PL_MID_HAL = 3, BFA_PL_MID_HAL_FCXP = 4, BFA_PL_MID_HAL_UF = 5, BFA_PL_MID_FCS = 6, BFA_PL_MID_LPS = 7, BFA_PL_MID_MAX = 8 } ; 83 enum bfa_plog_eid { BFA_PL_EID_INVALID = 0, BFA_PL_EID_IOC_DISABLE = 1, BFA_PL_EID_IOC_ENABLE = 2, BFA_PL_EID_PORT_DISABLE = 3, BFA_PL_EID_PORT_ENABLE = 4, BFA_PL_EID_PORT_ST_CHANGE = 5, BFA_PL_EID_TX = 6, BFA_PL_EID_TX_ACK1 = 7, BFA_PL_EID_TX_RJT = 8, BFA_PL_EID_TX_BSY = 9, BFA_PL_EID_RX = 10, BFA_PL_EID_RX_ACK1 = 11, BFA_PL_EID_RX_RJT = 12, BFA_PL_EID_RX_BSY = 13, BFA_PL_EID_CT_IN = 14, BFA_PL_EID_CT_OUT = 15, BFA_PL_EID_DRIVER_START = 16, BFA_PL_EID_RSCN = 17, BFA_PL_EID_DEBUG = 18, BFA_PL_EID_MISC = 19, BFA_PL_EID_FIP_FCF_DISC = 20, BFA_PL_EID_FIP_FCF_CVL = 21, BFA_PL_EID_LOGIN = 22, BFA_PL_EID_LOGO = 23, BFA_PL_EID_TRUNK_SCN = 24, BFA_PL_EID_MAX = 25 } ; 126 struct bfa_plog_s { char plog_sig[8U]; u8 plog_enabled; u8 rsvd[7U]; u32 ticks; u16 head; u16 tail; struct bfa_plog_rec_s plog_recs[256U]; } ; 152 struct __anonstruct_h2i_263 { u8 qid; u8 fn_lpu; } ; 152 union __anonunion_mtag_262 { struct __anonstruct_h2i_263 h2i; u16 i2htok; } ; 152 struct bfi_mhdr_s { u8 msg_class; u8 msg_id; union __anonunion_mtag_262 mtag; } ; 73 struct __anonstruct_a32_264 { __be32 addr_lo; __be32 addr_hi; } ; 73 union bfi_addr_u { struct __anonstruct_a32_264 a32; } ; 118 struct bfi_sge_s { unsigned int sg_len; unsigned char rsvd; unsigned char flags; union bfi_addr_u sga; } ; 134 struct bfi_alen_s { union bfi_addr_u al_addr; u32 al_len; } ; 142 struct bfi_sgpg_s { struct bfi_sge_s sges[8U]; u32 rsvd[8U]; } ; 153 struct bfi_msg_s { struct bfi_mhdr_s mhdr; u32 pl[31U]; } ; 171 struct bfi_mbmsg_s { struct bfi_mhdr_s mh; u32 pl[7U]; } ; 180 enum bfi_pcifn_class { BFI_PCIFN_CLASS_FC = 3076, BFI_PCIFN_CLASS_ETH = 512 } ; 211 enum bfi_asic_gen { BFI_ASIC_GEN_CB = 1, BFI_ASIC_GEN_CT = 2, BFI_ASIC_GEN_CT2 = 3 } ; 217 enum bfi_asic_mode { BFI_ASIC_MODE_FC = 1, BFI_ASIC_MODE_FC16 = 2, BFI_ASIC_MODE_ETH = 3, BFI_ASIC_MODE_COMBO = 4 } ; 267 struct bfi_ioc_attr_s { wwn_t mfg_pwwn; wwn_t mfg_nwwn; struct mac_s mfg_mac; u8 port_mode; u8 rsvd_a; wwn_t pwwn; wwn_t nwwn; struct mac_s mac; u16 rsvd_b; struct mac_s fcoe_mac; u16 rsvd_c; char brcd_serialnum[12U]; u8 pcie_gen; u8 pcie_lanes_orig; u8 pcie_lanes; u8 rx_bbcredit; u32 adapter_prop; u16 maxfrsize; char asic_rev; u8 rsvd_d; char fw_version[64U]; char optrom_version[64U]; struct bfa_mfg_vpd_s vpd; u32 card_type; u8 mfg_day; u8 mfg_month; u16 mfg_year; u8 uuid[16U]; } ; 376 enum bfi_port_mode { BFI_PORT_MODE_FC = 1, BFI_PORT_MODE_ETH = 2 } ; 399 enum bfi_ioc_state { BFI_IOC_UNINIT = 0, BFI_IOC_INITING = 1, BFI_IOC_HWINIT = 2, BFI_IOC_CFG = 3, BFI_IOC_OP = 4, BFI_IOC_DISABLING = 5, BFI_IOC_DISABLED = 6, BFI_IOC_CFG_DISABLED = 7, BFI_IOC_FAIL = 8, BFI_IOC_MEMTEST = 9 } ; 495 struct bfi_pbc_blun_s { wwn_t tgt_pwwn; struct scsi_lun tgt_lun; } ; 514 struct bfi_pbc_vport_s { wwn_t vp_pwwn; wwn_t vp_nwwn; } ; 522 struct bfi_pbc_s { u8 port_enabled; u8 boot_enabled; u8 nbluns; u8 nvports; u8 port_speed; u8 rsvd_a; u16 hss; wwn_t pbc_pwwn; wwn_t pbc_nwwn; struct bfi_pbc_blun_s blun[8U]; struct bfi_pbc_vport_s vport[16U]; } ; 853 enum bfi_sfp_mem_e { BFI_SFP_MEM_ALL = 1, BFI_SFP_MEM_DIAGEXT = 2 } ; 1123 struct bfi_diag_dport_req_s { struct bfi_mhdr_s mh; u8 req; u8 rsvd[3U]; u32 lpcnt; u32 payload; } ; 1135 struct bfi_diag_dport_rsp_s { struct bfi_mhdr_s mh; enum bfa_status status; wwn_t pwwn; wwn_t nwwn; } ; 1142 struct bfi_diag_dport_scn_teststart_s { wwn_t pwwn; wwn_t nwwn; u8 type; u8 mode; u8 rsvd[2U]; u32 numfrm; } ; 1151 struct bfi_diag_dport_scn_testcomp_s { u8 status; u8 speed; u16 numbuffer; u8 subtest_status[4U]; u32 latency; u32 distance; u16 frm_sz; u8 rsvd[2U]; } ; 1163 union __anonunion_info_265 { struct bfi_diag_dport_scn_teststart_s teststart; struct bfi_diag_dport_scn_testcomp_s testcomp; } ; 1163 struct bfi_diag_dport_scn_s { struct bfi_mhdr_s mh; u8 state; u8 rsvd[3U]; union __anonunion_info_265 info; } ; 1173 union bfi_diag_dport_msg_u { struct bfi_diag_dport_req_s req; struct bfi_diag_dport_rsp_s rsp; struct bfi_diag_dport_scn_s scn; } ; 1322 struct bfa_iocfc_intr_attr_s { u8 coalesce; u8 rsvd[3U]; __be16 latency; __be16 delay; } ; 40 struct bfa_iocfc_fwcfg_s { u16 num_fabrics; u16 num_lports; u16 num_rports; u16 num_ioim_reqs; u16 num_tskim_reqs; u16 num_fwtio_reqs; u16 num_fcxp_reqs; u16 num_uf_bufs; u8 num_cqs; u8 fw_tick_res; u8 rsvd[6U]; } ; 57 struct bfa_iocfc_drvcfg_s { u16 num_reqq_elems; u16 num_rspq_elems; u16 num_sgpgs; u16 num_sboot_tgts; u16 num_sboot_luns; u16 ioc_recover; u16 min_cfg; u16 path_tov; u16 num_tio_reqs; u8 port_mode; u8 rsvd_a; enum bfa_boolean delay_comp; u16 num_ttsk_reqs; u32 rsvd; } ; 76 struct bfa_iocfc_cfg_s { struct bfa_iocfc_fwcfg_s fwcfg; struct bfa_iocfc_drvcfg_s drvcfg; } ; 532 struct bfa_qos_bw_s { u8 qos_bw_set; u8 high; u8 med; u8 low; } ; 552 struct bfa_qos_attr_s { u8 state; u8 rsvd1[3U]; u32 total_bb_cr; struct bfa_qos_bw_s qos_bw; struct bfa_qos_bw_s qos_bw_op; } ; 577 struct bfa_bbcr_attr_s { u8 state; u8 peer_bb_scn; u8 reason; u8 rsvd; } ; 584 struct bfa_qos_vc_info_s { u8 vc_credit; u8 borrow_credit; u8 priority; u8 resvd; } ; 599 struct bfa_qos_vc_attr_s { u16 total_vc_count; u16 shared_credit; u32 elp_opmode_flags; struct bfa_qos_vc_info_s vc_info[16U]; } ; 606 struct bfa_qos_stats_s { u32 flogi_sent; u32 flogi_acc_recvd; u32 flogi_rjt_recvd; u32 flogi_retries; u32 elp_recvd; u32 elp_accepted; u32 elp_rejected; u32 elp_dropped; u32 qos_rscn_recvd; u32 rsvd; } ; 625 struct bfa_fcoe_stats_s { u64 secs_reset; u64 cee_linkups; u64 cee_linkdns; u64 fip_linkups; u64 fip_linkdns; u64 fip_fails; u64 mac_invalids; u64 vlan_req; u64 vlan_notify; u64 vlan_err; u64 vlan_timeouts; u64 vlan_invalids; u64 disc_req; u64 disc_rsp; u64 disc_err; u64 disc_unsol; u64 disc_timeouts; u64 disc_fcf_unavail; u64 linksvc_unsupp; u64 linksvc_err; u64 logo_req; u64 clrvlink_req; u64 op_unsupp; u64 untagged; u64 txf_ucast; u64 txf_ucast_vlan; u64 txf_ucast_octets; u64 txf_mcast; u64 txf_mcast_vlan; u64 txf_mcast_octets; u64 txf_bcast; u64 txf_bcast_vlan; u64 txf_bcast_octets; u64 txf_timeout; u64 txf_parity_errors; u64 txf_fid_parity_errors; u64 rxf_ucast_octets; u64 rxf_ucast; u64 rxf_ucast_vlan; u64 rxf_mcast_octets; u64 rxf_mcast; u64 rxf_mcast_vlan; u64 rxf_bcast_octets; u64 rxf_bcast; u64 rxf_bcast_vlan; } ; 676 union bfa_fcport_stats_u { struct bfa_qos_stats_s fcqos; struct bfa_fcoe_stats_s fcoe; } ; 684 struct bfa_fcpim_del_itn_stats_s { u32 del_itn_iocomp_aborted; u32 del_itn_iocomp_timedout; u32 del_itn_iocom_sqer_needed; u32 del_itn_iocom_res_free; u32 del_itn_iocom_hostabrts; u32 del_itn_total_ios; u32 del_io_iocdowns; u32 del_tm_iocdowns; } ; 696 struct bfa_itnim_iostats_s { u32 total_ios; u32 input_reqs; u32 output_reqs; u32 io_comps; u32 wr_throughput; u32 rd_throughput; u32 iocomp_ok; u32 iocomp_underrun; u32 iocomp_overrun; u32 qwait; u32 qresumes; u32 no_iotags; u32 iocomp_timedout; u32 iocom_nexus_abort; u32 iocom_proto_err; u32 iocom_dif_err; u32 iocom_sqer_needed; u32 iocom_res_free; u32 io_aborts; u32 iocom_hostabrts; u32 io_cleanups; u32 path_tov_expired; u32 iocomp_aborted; u32 io_iocdowns; u32 iocom_utags; u32 io_tmaborts; u32 tm_io_comps; u32 creates; u32 fw_create; u32 create_comps; u32 onlines; u32 offlines; u32 fw_delete; u32 delete_comps; u32 deletes; u32 sler_events; u32 ioc_disabled; u32 cleanup_comps; u32 tm_cmnds; u32 tm_fw_rsps; u32 tm_success; u32 tm_failures; u32 no_tskims; u32 tm_qwait; u32 tm_qresumes; u32 tm_iocdowns; u32 tm_cleanups; u32 tm_cleanup_comps; u32 rsvd[6U]; } ; 778 enum bfa_port_type { BFA_PORT_TYPE_UNKNOWN = 1, BFA_PORT_TYPE_NPORT = 5, BFA_PORT_TYPE_NLPORT = 6, BFA_PORT_TYPE_LPORT = 20, BFA_PORT_TYPE_P2P = 21, BFA_PORT_TYPE_VPORT = 22 } ; 787 enum bfa_port_topology { BFA_PORT_TOPOLOGY_NONE = 0, BFA_PORT_TOPOLOGY_P2P_OLD_VER = 1, BFA_PORT_TOPOLOGY_LOOP = 2, BFA_PORT_TOPOLOGY_AUTO_OLD_VER = 3, BFA_PORT_TOPOLOGY_AUTO = 4, BFA_PORT_TOPOLOGY_P2P = 5 } ; 805 enum bfa_port_linkstate { BFA_PORT_LINKUP = 1, BFA_PORT_LINKDOWN = 2 } ; 863 enum bfa_fec_state_s { BFA_FEC_ONLINE = 1, BFA_FEC_OFFLINE = 2, BFA_FEC_OFFLINE_NOT_16G = 3 } ; 869 struct bfa_lun_mask_s { wwn_t lp_wwn; wwn_t rp_wwn; struct scsi_lun lun; u8 ua; u8 rsvd[3U]; u16 rp_tag; u8 lp_tag; u8 state; } ; 921 struct bfa_lunmask_cfg_s { u32 status; u32 rsvd; struct bfa_lun_mask_s lun_list[16U]; } ; 928 struct bfa_throttle_cfg_s { u16 is_valid; u16 value; u32 rsvd; } ; 941 struct bfa_port_cfg_s { u8 topology; u8 speed; u8 trunked; u8 qos_enabled; u8 cfg_hardalpa; u8 hardalpa; __be16 maxfrsize; u8 rx_bbcredit; u8 tx_bbcredit; u8 ratelimit; u8 trl_def_speed; u8 bb_cr_enabled; u8 bb_scn; u8 faa_state; u8 rsvd1; u16 path_tov; u16 q_depth; struct bfa_qos_bw_s qos_bw; } ; 1047 struct bfa_fcport_fcf_s { wwn_t name; wwn_t fabric_name; u8 fipenabled; u8 fipfailed; u8 resv[2U]; u8 pri; u8 version; u8 available; u8 fka_disabled; u8 maxsz_verified; u8 fc_map[3U]; __be16 vlan; u32 fka_adv_per; struct mac_s mac; } ; 1065 enum bfa_trunk_state { BFA_TRUNK_DISABLED = 0, BFA_TRUNK_ONLINE = 1, BFA_TRUNK_OFFLINE = 2 } ; 1071 struct bfa_trunk_vc_attr_s { u32 bb_credit; u32 elp_opmode_flags; u32 req_credit; u16 vc_credits[8U]; } ; 1084 struct bfa_fcport_loop_info_s { u8 myalpa; u8 alpabm_val; u8 resvd[6U]; struct fc_alpabm_s alpabm; } ; 1091 union __anonunion_vc_fcf_267 { struct bfa_qos_vc_attr_s qos_vc_attr; struct bfa_trunk_vc_attr_s trunk_vc_attr; struct bfa_fcport_fcf_s fcf; } ; 1091 union __anonunion_attr_266 { struct bfa_fcport_loop_info_s loop_info; struct bfa_bbcr_attr_s bbcr_attr; union __anonunion_vc_fcf_267 vc_fcf; } ; 1091 struct bfa_port_link_s { u8 linkstate; u8 linkstate_rsn; u8 topology; u8 speed; u32 linkstate_opt; u8 trunked; u8 fec_state; u8 resvd[6U]; struct bfa_qos_attr_s qos_attr; union __anonunion_attr_266 attr; } ; 1117 enum bfa_trunk_link_fctl { BFA_TRUNK_LINK_FCTL_NORMAL = 0, BFA_TRUNK_LINK_FCTL_VC = 1, BFA_TRUNK_LINK_FCTL_VC_QOS = 2 } ; 1123 enum bfa_trunk_link_state { BFA_TRUNK_LINK_STATE_UP = 1, BFA_TRUNK_LINK_STATE_DN_LINKDN = 2, BFA_TRUNK_LINK_STATE_DN_GRP_MIS = 3, BFA_TRUNK_LINK_STATE_DN_SPD_MIS = 4, BFA_TRUNK_LINK_STATE_DN_MODE_MIS = 5 } ; 1131 struct bfa_trunk_link_attr_s { wwn_t trunk_wwn; enum bfa_trunk_link_fctl fctl; enum bfa_trunk_link_state link_state; enum bfa_port_speed speed; u32 deskew; } ; 1141 struct bfa_trunk_attr_s { enum bfa_trunk_state state; enum bfa_port_speed speed; u32 port_id; u32 rsvd; struct bfa_trunk_link_attr_s link_attr[2U]; } ; 1149 struct bfa_rport_hal_stats_s { u32 sm_un_cr; u32 sm_un_unexp; u32 sm_cr_on; u32 sm_cr_del; u32 sm_cr_hwf; u32 sm_cr_unexp; u32 sm_fwc_rsp; u32 sm_fwc_del; u32 sm_fwc_off; u32 sm_fwc_hwf; u32 sm_fwc_unexp; u32 sm_on_off; u32 sm_on_del; u32 sm_on_hwf; u32 sm_on_unexp; u32 sm_fwd_rsp; u32 sm_fwd_del; u32 sm_fwd_hwf; u32 sm_fwd_unexp; u32 sm_off_del; u32 sm_off_on; u32 sm_off_hwf; u32 sm_off_unexp; u32 sm_del_fwrsp; u32 sm_del_hwf; u32 sm_del_unexp; u32 sm_delp_fwrsp; u32 sm_delp_hwf; u32 sm_delp_unexp; u32 sm_offp_fwrsp; u32 sm_offp_del; u32 sm_offp_hwf; u32 sm_offp_unexp; u32 sm_iocd_off; u32 sm_iocd_del; u32 sm_iocd_on; u32 sm_iocd_unexp; u32 rsvd; } ; 1190 struct bfa_rport_qos_attr_s { u8 qos_priority; u8 rsvd[3U]; u32 qos_flow_id; } ; 1199 struct bfa_itnim_latency_s { u32 min[14U]; u32 max[14U]; u32 count[14U]; u32 avg[14U]; } ; 1209 struct bfa_itnim_ioprofile_s { u32 clock_res_mul; u32 clock_res_div; u32 index; u32 io_profile_start_time; u32 iocomps[14U]; struct bfa_itnim_latency_s io_latency; } ; 1231 struct bfa_port_fc_stats_s { u64 secs_reset; u64 tx_frames; u64 tx_words; u64 tx_lip; u64 tx_lip_f7f7; u64 tx_lip_f8f7; u64 tx_arbf0; u64 tx_nos; u64 tx_ols; u64 tx_lr; u64 tx_lrr; u64 rx_frames; u64 rx_words; u64 lip_count; u64 rx_lip_f7f7; u64 rx_lip_f8f7; u64 rx_arbf0; u64 nos_count; u64 ols_count; u64 lr_count; u64 lrr_count; u64 invalid_crcs; u64 invalid_crc_gd_eof; u64 undersized_frm; u64 oversized_frm; u64 bad_eof_frm; u64 error_frames; u64 dropped_frames; u64 link_failures; u64 loss_of_syncs; u64 loss_of_signals; u64 primseq_errs; u64 bad_os_count; u64 err_enc_out; u64 err_enc; u64 bbcr_frames_lost; u64 bbcr_rrdys_lost; u64 bbcr_link_resets; u64 bbcr_frame_lost_intrs; u64 bbcr_rrdy_lost_intrs; u64 loop_timeouts; } ; 1278 struct bfa_port_eth_stats_s { u64 secs_reset; u64 frame_64; u64 frame_65_127; u64 frame_128_255; u64 frame_256_511; u64 frame_512_1023; u64 frame_1024_1518; u64 frame_1519_1522; u64 tx_bytes; u64 tx_packets; u64 tx_mcast_packets; u64 tx_bcast_packets; u64 tx_control_frame; u64 tx_drop; u64 tx_jabber; u64 tx_fcs_error; u64 tx_fragments; u64 rx_bytes; u64 rx_packets; u64 rx_mcast_packets; u64 rx_bcast_packets; u64 rx_control_frames; u64 rx_unknown_opcode; u64 rx_drop; u64 rx_jabber; u64 rx_fcs_error; u64 rx_alignment_error; u64 rx_frame_length_error; u64 rx_code_error; u64 rx_fragments; u64 rx_pause; u64 rx_zero_pause; u64 tx_pause; u64 tx_zero_pause; u64 rx_fcoe_pause; u64 rx_fcoe_zero_pause; u64 tx_fcoe_pause; u64 tx_fcoe_zero_pause; u64 rx_iscsi_pause; u64 rx_iscsi_zero_pause; u64 tx_iscsi_pause; u64 tx_iscsi_zero_pause; } ; 1326 union bfa_port_stats_u { struct bfa_port_fc_stats_s fc; struct bfa_port_eth_stats_s eth; } ; 1340 struct bfa_cee_lldp_str_s { u8 sub_type; u8 len; u8 rsvd[2U]; u8 value[128U]; } ; 1353 struct bfa_cee_lldp_cfg_s { struct bfa_cee_lldp_str_s chassis_id; struct bfa_cee_lldp_str_s port_id; struct bfa_cee_lldp_str_s port_desc; struct bfa_cee_lldp_str_s sys_name; struct bfa_cee_lldp_str_s sys_desc; struct bfa_cee_lldp_str_s mgmt_addr; u16 time_to_live; u16 enabled_system_cap; } ; 1364 struct bfa_cee_dcbx_cfg_s { u8 pgid[8U]; u8 pg_percentage[8U]; u8 pfc_primap; u8 fcoe_primap; u8 iscsi_primap; u8 dcbx_version; u8 lls_fcoe; u8 lls_lan; u8 rsvd[2U]; } ; 1377 struct bfa_cee_attr_s { u8 cee_status; u8 error_reason; struct bfa_cee_lldp_cfg_s lldp_remote; struct bfa_cee_dcbx_cfg_s dcbx_remote; struct mac_s src_mac; u8 link_speed; u8 nw_priority; u8 filler[2U]; } ; 1389 struct bfa_cee_stats_s { u32 lldp_tx_frames; u32 lldp_rx_frames; u32 lldp_rx_frames_invalid; u32 lldp_rx_frames_new; u32 lldp_tlvs_unrecognized; u32 lldp_rx_shutdown_tlvs; u32 lldp_info_aged_out; u32 dcbx_phylink_ups; u32 dcbx_phylink_downs; u32 dcbx_rx_tlvs; u32 dcbx_rx_tlvs_invalid; u32 dcbx_control_tlv_error; u32 dcbx_feature_tlv_error; u32 dcbx_cee_cfg_new; u32 cee_status_down; u32 cee_status_up; u32 cee_hw_cfg_changed; u32 cee_rx_invalid_cfg; } ; 1419 union __anonunion_priv_268 { struct bfa_rport_qos_attr_s qos; } ; 1419 struct bfa_rport_aen_data_s { u16 vf_id; u16 rsvd[3U]; wwn_t ppwwn; wwn_t lpwwn; wwn_t rpwwn; union __anonunion_priv_268 priv; } ; 1439 union bfa_aen_data_u { struct bfa_adapter_aen_data_s adapter; struct bfa_port_aen_data_s port; struct bfa_lport_aen_data_s lport; struct bfa_rport_aen_data_s rport; struct bfa_itnim_aen_data_s itnim; struct bfa_audit_aen_data_s audit; struct bfa_ioc_aen_data_s ioc; } ; 1449 struct bfa_aen_entry_s { struct list_head qe; enum bfa_aen_category aen_category; u32 aen_type; union bfa_aen_data_u aen_data; struct timeval aen_tv; u32 seq_num; u32 bfad_num; } ; 34 struct bfa_timer_s { struct list_head qe; void (*timercb)(void *); void *arg; int timeout; } ; 44 struct bfa_timer_mod_s { struct list_head timer_q; } ; 59 struct bfa_sge_s { u32 sg_len; void *sg_addr; } ; 67 struct bfa_mem_dma_s { struct list_head qe; u32 mem_len; u8 *kva; u64 dma; u8 *kva_curp; u64 dma_curp; } ; 98 struct bfa_mem_kva_s { struct list_head qe; u32 mem_len; u8 *kva; u8 *kva_curp; } ; 106 struct bfa_meminfo_s { struct bfa_mem_dma_s dma_info; struct bfa_mem_kva_s kva_info; } ; 112 struct bfa_pcidev_s { int pci_slot; u8 pci_func; u16 device_id; u16 ssid; void *pci_bar_kva; } ; 159 struct bfa_dma_s { void *kva; u64 pa; } ; 196 struct bfa_ioc_regs_s { void *hfn_mbox_cmd; void *hfn_mbox; void *lpu_mbox_cmd; void *lpu_mbox; void *lpu_read_stat; void *pss_ctl_reg; void *pss_err_status_reg; void *app_pll_fast_ctl_reg; void *app_pll_slow_ctl_reg; void *ioc_sem_reg; void *ioc_usage_sem_reg; void *ioc_init_sem_reg; void *ioc_usage_reg; void *host_page_num_fn; void *heartbeat; void *ioc_fwstate; void *alt_ioc_fwstate; void *ll_halt; void *alt_ll_halt; void *err_set; void *ioc_fail_sync; void *shirq_isr_next; void *shirq_msk_next; void *smem_page_start; u32 smem_pg0; } ; 224 struct bfa_mbox_cmd_s { struct list_head qe; u32 msg[8U]; } ; 240 struct __anonstruct_mbhdlr_269 { void (*cbfn)(void *, struct bfi_mbmsg_s *); void *cbarg; } ; 240 struct bfa_ioc_mbox_mod_s { struct list_head cmd_q; int nmclass; struct __anonstruct_mbhdlr_269 mbhdlr[35U]; } ; 256 struct bfa_ioc_cbfn_s { void (*enable_cbfn)(void *, enum bfa_status ); void (*disable_cbfn)(void *); void (*hbfail_cbfn)(void *); void (*reset_cbfn)(void *); } ; 262 enum bfa_ioc_event_e { BFA_IOC_E_ENABLED = 1, BFA_IOC_E_DISABLED = 2, BFA_IOC_E_FAILED = 3 } ; 273 struct bfa_ioc_notify_s { struct list_head qe; void (*cbfn)(void *, enum bfa_ioc_event_e ); void *cbarg; } ; 279 struct bfa_ioc_s ; 279 struct bfa_iocpf_s { void (*fsm)(void *, int); struct bfa_ioc_s *ioc; enum bfa_boolean fw_mismatch_notified; enum bfa_boolean auto_recover; u32 poll_time; } ; 295 struct bfa_s ; 295 struct bfa_ioc_hwif_s ; 295 struct bfa_ioc_s { void (*fsm)(void *, int); struct bfa_s *bfa; struct bfa_pcidev_s pcidev; struct bfa_timer_mod_s *timer_mod; struct bfa_timer_s ioc_timer; struct bfa_timer_s sem_timer; struct bfa_timer_s hb_timer; u32 hb_count; struct list_head notify_q; void *dbg_fwsave; int dbg_fwsave_len; enum bfa_boolean dbg_fwsave_once; enum bfi_pcifn_class clscode; struct bfa_ioc_regs_s ioc_regs; struct bfa_trc_mod_s *trcmod; struct bfa_ioc_drv_stats_s stats; enum bfa_boolean fcmode; enum bfa_boolean pllinit; enum bfa_boolean stats_busy; u8 port_id; struct bfa_dma_s attr_dma; struct bfi_ioc_attr_s *attr; struct bfa_ioc_cbfn_s *cbfn; struct bfa_ioc_mbox_mod_s mbox_mod; struct bfa_ioc_hwif_s *ioc_hwif; struct bfa_iocpf_s iocpf; enum bfi_asic_gen asic_gen; enum bfi_asic_mode asic_mode; enum bfi_port_mode port0_mode; enum bfi_port_mode port1_mode; enum bfa_mode_s port_mode; u8 ad_cap_bm; u8 port_mode_cfg; int ioc_aen_seq; } ; 332 struct bfa_ioc_hwif_s { enum bfa_status (*ioc_pll_init)(void *, enum bfi_asic_mode ); enum bfa_boolean (*ioc_firmware_lock)(struct bfa_ioc_s *); void (*ioc_firmware_unlock)(struct bfa_ioc_s *); void (*ioc_reg_init)(struct bfa_ioc_s *); void (*ioc_map_port)(struct bfa_ioc_s *); void (*ioc_isr_mode_set)(struct bfa_ioc_s *, enum bfa_boolean ); void (*ioc_notify_fail)(struct bfa_ioc_s *); void (*ioc_ownership_reset)(struct bfa_ioc_s *); enum bfa_boolean (*ioc_sync_start)(struct bfa_ioc_s *); void (*ioc_sync_join)(struct bfa_ioc_s *); void (*ioc_sync_leave)(struct bfa_ioc_s *); void (*ioc_sync_ack)(struct bfa_ioc_s *); enum bfa_boolean (*ioc_sync_complete)(struct bfa_ioc_s *); enum bfa_boolean (*ioc_lpu_read_stat)(struct bfa_ioc_s *); void (*ioc_set_fwstate)(struct bfa_ioc_s *, enum bfi_ioc_state ); enum bfi_ioc_state (*ioc_get_fwstate)(struct bfa_ioc_s *); void (*ioc_set_alt_fwstate)(struct bfa_ioc_s *, enum bfi_ioc_state ); enum bfi_ioc_state (*ioc_get_alt_fwstate)(struct bfa_ioc_s *); } ; 356 struct bfa_reqq_wait_s { struct list_head qe; void (*qresume)(void *); void *cbarg; } ; 368 struct bfa_cb_qe_s { struct list_head qe; void (*cbfn)(void *, enum bfa_boolean ); enum bfa_boolean once; enum bfa_boolean pre_rmv; enum bfa_status fw_status; void *cbarg; } ; 402 struct bfa_ablk_s { struct bfa_ioc_s *ioc; struct bfa_ablk_cfg_s *cfg; u16 *pcifn; struct bfa_dma_s dma_addr; enum bfa_boolean busy; struct bfa_mbox_cmd_s mb; void (*cbfn)(void *, enum bfa_status ); void *cbarg; struct bfa_ioc_notify_s ioc_notify; struct bfa_mem_dma_s ablk_dma; } ; 421 struct bfa_sfp_s { void *dev; struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; struct sfp_mem_s *sfpmem; void (*cbfn)(void *, enum bfa_status ); void *cbarg; enum bfi_sfp_mem_e memtype; u32 status; struct bfa_mbox_cmd_s mbcmd; u8 *dbuf_kva; u64 dbuf_pa; struct bfa_ioc_notify_s ioc_notify; enum bfa_defs_sfp_media_e *media; enum bfa_port_speed portspeed; void (*state_query_cbfn)(void *, enum bfa_status ); void *state_query_cbarg; u8 lock; u8 data_valid; u8 state; u8 state_query_lock; struct bfa_mem_dma_s sfp_dma; u8 is_elb; } ; 473 struct bfa_flash_s { struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; u32 type; u8 instance; u8 rsv[3U]; u32 op_busy; u32 residue; u32 offset; enum bfa_status status; u8 *dbuf_kva; u64 dbuf_pa; struct bfa_reqq_wait_s reqq_wait; void (*cbfn)(void *, enum bfa_status ); void *cbarg; u8 *ubuf; struct bfa_cb_qe_s hcb_qe; u32 addr_off; struct bfa_mbox_cmd_s mb; struct bfa_ioc_notify_s ioc_notify; struct bfa_mem_dma_s flash_dma; } ; 527 struct bfa_diag_results_fwping { u32 data; u32 status; u32 dmastatus; u8 rsvd[4U]; } ; 538 struct bfa_diag_qtest_result_s { u32 status; u16 count; u8 queue; u8 rsvd; } ; 545 struct bfa_diag_fwping_s { struct bfa_diag_results_fwping *result; void (*cbfn)(void *, enum bfa_status ); void *cbarg; u32 data; u8 lock; u8 rsv[3U]; u32 status; u32 count; struct bfa_mbox_cmd_s mbcmd; u8 *dbuf_kva; u64 dbuf_pa; } ; 562 struct bfa_diag_results_tempsensor_s { u32 status; u16 temp; u16 brd_temp; u8 ts_junc; u8 ts_brd; u8 rsvd[6U]; } ; 574 struct bfa_diag_tsensor_s { void (*cbfn)(void *, enum bfa_status ); void *cbarg; struct bfa_diag_results_tempsensor_s *temp; u8 lock; u8 rsv[3U]; u32 status; struct bfa_mbox_cmd_s mbcmd; } ; 584 struct bfa_diag_sfpshow_s { struct sfp_mem_s *sfpmem; void (*cbfn)(void *, enum bfa_status ); void *cbarg; u8 lock; u8 static_data; u8 rsv[2U]; u32 status; struct bfa_mbox_cmd_s mbcmd; u8 *dbuf_kva; u64 dbuf_pa; } ; 597 struct bfa_diag_led_s { struct bfa_mbox_cmd_s mbcmd; enum bfa_boolean lock; } ; 602 struct bfa_diag_beacon_s { struct bfa_mbox_cmd_s mbcmd; enum bfa_boolean state; enum bfa_boolean link_e2e; } ; 608 struct bfa_diag_s { void *dev; struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; struct bfa_diag_fwping_s fwping; struct bfa_diag_tsensor_s tsensor; struct bfa_diag_sfpshow_s sfpshow; struct bfa_diag_led_s ledtest; struct bfa_diag_beacon_s beacon; void *result; struct bfa_timer_s timer; void (*cbfn_beacon)(void *, enum bfa_boolean , enum bfa_boolean ); void (*cbfn)(void *, enum bfa_status ); void *cbarg; u8 block; u8 timer_active; u8 rsvd[2U]; u32 status; struct bfa_ioc_notify_s ioc_notify; struct bfa_mem_dma_s diag_dma; } ; 666 struct bfa_phy_s { struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; u8 instance; u8 op_busy; u8 rsv[2U]; u32 residue; u32 offset; enum bfa_status status; u8 *dbuf_kva; u64 dbuf_pa; struct bfa_reqq_wait_s reqq_wait; void (*cbfn)(void *, enum bfa_status ); void *cbarg; u8 *ubuf; struct bfa_cb_qe_s hcb_qe; u32 addr_off; struct bfa_mbox_cmd_s mb; struct bfa_ioc_notify_s ioc_notify; struct bfa_mem_dma_s phy_dma; } ; 716 struct bfa_fru_s { struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; u8 op_busy; u8 rsv[3U]; u32 residue; u32 offset; enum bfa_status status; u8 *dbuf_kva; u64 dbuf_pa; struct bfa_reqq_wait_s reqq_wait; void (*cbfn)(void *, enum bfa_status ); void *cbarg; u8 *ubuf; struct bfa_cb_qe_s hcb_qe; u32 addr_off; struct bfa_mbox_cmd_s mb; struct bfa_ioc_notify_s ioc_notify; struct bfa_mem_dma_s fru_dma; u8 trfr_cmpl; } ; 761 struct bfa_dconf_hdr_s { u32 signature; u32 version; } ; 773 struct bfa_dconf_s { struct bfa_dconf_hdr_s hdr; struct bfa_lunmask_cfg_s lun_mask; struct bfa_throttle_cfg_s throttle_cfg; } ; 779 struct bfa_dconf_mod_s { void (*sm)(void *, int); u8 instance; enum bfa_boolean read_data_valid; enum bfa_boolean min_cfg; struct bfa_timer_s timer; struct bfa_s *bfa; void *bfad; void *trcmod; struct bfa_dconf_s *dconf; struct bfa_mem_kva_s kva_seg; } ; 159 struct bfa_iocfc_regs_s { void *intr_status; void *intr_mask; void *cpe_q_pi[4U]; void *cpe_q_ci[4U]; void *cpe_q_ctrl[4U]; void *rme_q_ci[4U]; void *rme_q_pi[4U]; void *rme_q_ctrl[4U]; } ; 175 typedef void (*bfa_msix_handler_t)(struct bfa_s *, int); 176 struct bfa_msix_s { int nvecs; bfa_msix_handler_t handler[22U]; } ; 180 struct bfa_hwif_s { void (*hw_reginit)(struct bfa_s *); void (*hw_reqq_ack)(struct bfa_s *, int); void (*hw_rspq_ack)(struct bfa_s *, int, u32 ); void (*hw_msix_init)(struct bfa_s *, int); void (*hw_msix_ctrl_install)(struct bfa_s *); void (*hw_msix_queue_install)(struct bfa_s *); void (*hw_msix_uninstall)(struct bfa_s *); void (*hw_isr_mode_set)(struct bfa_s *, enum bfa_boolean ); void (*hw_msix_getvecs)(struct bfa_s *, u32 *, u32 *, u32 *); void (*hw_msix_get_rme_range)(struct bfa_s *, u32 *, u32 *); int cpe_vec_q0; int rme_vec_q0; } ; 201 struct bfa_faa_cbfn_s { void (*faa_cbfn)(void *, enum bfa_status ); void *faa_cbarg; } ; 206 struct bfa_faa_attr_s { wwn_t faa; u8 faa_state; u8 pwwn_source; u8 rsvd[6U]; } ; 219 struct bfa_faa_args_s { struct bfa_faa_attr_s *faa_attr; struct bfa_faa_cbfn_s faa_cb; u8 faa_state; enum bfa_boolean busy; } ; 226 struct bfi_iocfc_cfg_s ; 226 struct bfi_iocfc_cfgrsp_s ; 226 struct bfa_iocfc_s { void (*fsm)(void *, int); struct bfa_s *bfa; struct bfa_iocfc_cfg_s cfg; u32 req_cq_pi[4U]; u32 rsp_cq_ci[4U]; u8 hw_qid[4U]; struct bfa_cb_qe_s init_hcb_qe; struct bfa_cb_qe_s stop_hcb_qe; struct bfa_cb_qe_s dis_hcb_qe; struct bfa_cb_qe_s en_hcb_qe; struct bfa_cb_qe_s stats_hcb_qe; enum bfa_boolean submod_enabled; enum bfa_boolean cb_reqd; enum bfa_status op_status; struct bfa_dma_s cfg_info; struct bfi_iocfc_cfg_s *cfginfo; struct bfa_dma_s cfgrsp_dma; struct bfi_iocfc_cfgrsp_s *cfgrsp; struct bfa_dma_s req_cq_ba[4U]; struct bfa_dma_s req_cq_shadow_ci[4U]; struct bfa_dma_s rsp_cq_ba[4U]; struct bfa_dma_s rsp_cq_shadow_pi[4U]; struct bfa_iocfc_regs_s bfa_regs; struct bfa_hwif_s hwif; void (*updateq_cbfn)(void *, enum bfa_status ); void *updateq_cbarg; u32 intr_mask; struct bfa_faa_args_s faa_args; struct bfa_mem_dma_s ioc_dma; struct bfa_mem_dma_s iocfc_dma; struct bfa_mem_dma_s reqq_dma[4U]; struct bfa_mem_dma_s rspq_dma[4U]; struct bfa_mem_kva_s kva_seg; } ; 453 struct bfi_iocfc_cfg_s { u8 num_cqs; u8 sense_buf_len; u16 rsvd_1; u32 endian_sig; u8 rsvd_2; u8 single_msix_vec; u8 rsvd[2U]; __be16 num_ioim_reqs; __be16 num_fwtio_reqs; union bfi_addr_u req_cq_ba[4U]; union bfi_addr_u req_shadow_ci[4U]; __be16 req_cq_elems[4U]; union bfi_addr_u rsp_cq_ba[4U]; union bfi_addr_u rsp_shadow_pi[4U]; __be16 rsp_cq_elems[4U]; union bfi_addr_u stats_addr; union bfi_addr_u cfgrsp_addr; union bfi_addr_u ioim_snsbase[4U]; struct bfa_iocfc_intr_attr_s intr_attr; } ; 71 struct bfi_iocfc_bootwwns { wwn_t wwn[4U]; u8 nwwns; u8 rsvd[7U]; } ; 81 struct bfi_iocfc_qreg_s { u32 cpe_q_ci_off[4U]; u32 cpe_q_pi_off[4U]; u32 cpe_qctl_off[4U]; u32 rme_q_ci_off[4U]; u32 rme_q_pi_off[4U]; u32 rme_qctl_off[4U]; u8 hw_qid[4U]; } ; 94 struct bfi_iocfc_cfgrsp_s { struct bfa_iocfc_fwcfg_s fwcfg; struct bfa_iocfc_intr_attr_s intr_attr; struct bfi_iocfc_bootwwns bootwwns; struct bfi_pbc_s pbc_cfg; struct bfi_iocfc_qreg_s qreg; } ; 246 struct bfi_fcport_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 rsvd[3U]; struct bfa_port_cfg_s port_cfg; u32 msgtag; } ; 281 struct bfi_fcport_event_s { struct bfi_mhdr_s mh; struct bfa_port_link_s link_state; } ; 289 struct bfi_fcport_trunk_link_s { wwn_t trunk_wwn; u8 fctl; u8 state; u8 speed; u8 rsvd; __be32 deskew; } ; 301 struct bfi_fcport_trunk_scn_s { struct bfi_mhdr_s mh; u8 trunk_state; u8 trunk_speed; u8 rsvd_a[2U]; struct bfi_fcport_trunk_link_s tlink[2U]; } ; 322 union bfi_fcport_i2h_msg_u { struct bfi_msg_s *msg; struct bfi_fcport_rsp_s *penable_rsp; struct bfi_fcport_rsp_s *pdisable_rsp; struct bfi_fcport_rsp_s *psetsvcparams_rsp; struct bfi_fcport_rsp_s *pstatsget_rsp; struct bfi_fcport_rsp_s *pstatsclear_rsp; struct bfi_fcport_event_s *event; struct bfi_fcport_trunk_scn_s *trunk_scn; } ; 387 struct bfi_uf_buf_post_s { struct bfi_mhdr_s mh; u16 buf_tag; __be16 buf_len; struct bfi_alen_s alen; } ; 430 struct bfi_lps_login_rsp_s { struct bfi_mhdr_s mh; u8 fw_tag; u8 status; u8 lsrjt_rsn; u8 lsrjt_expl; wwn_t port_name; wwn_t node_name; __be16 bb_credit; u8 f_port; u8 npiv_en; unsigned int lp_pid; unsigned char auth_req; struct mac_s lp_mac; struct mac_s fcf_mac; u8 ext_status; u8 brcd_switch; u8 bfa_tag; u8 rsvd; } ; 828 enum bfi_tskim_status { BFI_TSKIM_STS_OK = 0, BFI_TSKIM_STS_NOT_SUPP = 4, BFI_TSKIM_STS_FAILED = 5, BFI_TSKIM_STS_TIMEOUT = 10, BFI_TSKIM_STS_ABORTED = 11, BFI_TSKIM_STS_UTAG = 12 } ; 869 struct bfa_sgpg_wqe_s { struct list_head qe; int nsgpg; int nsgpg_total; void (*cbfn)(void *); void *cbarg; struct list_head sgpg_q; } ; 45 struct bfa_sgpg_s { struct list_head qe; struct bfi_sgpg_s *sgpg; union bfi_addr_u sgpg_pa; } ; 51 struct bfa_sgpg_mod_s { struct bfa_s *bfa; int num_sgpgs; int free_sgpgs; struct list_head sgpg_q; struct list_head sgpg_wait_q; struct bfa_mem_dma_s dma_seg[8U]; struct bfa_mem_kva_s kva_seg; } ; 81 struct bfa_fcxp_s ; 81 struct bfa_fcxp_mod_s { struct bfa_s *bfa; struct bfa_fcxp_s *fcxp_list; u16 num_fcxps; struct list_head fcxp_req_free_q; struct list_head fcxp_rsp_free_q; struct list_head fcxp_active_q; struct list_head req_wait_q; struct list_head rsp_wait_q; struct list_head fcxp_req_unused_q; struct list_head fcxp_rsp_unused_q; u32 req_pld_sz; u32 rsp_pld_sz; struct bfa_mem_dma_s dma_seg[13U]; struct bfa_mem_kva_s kva_seg; } ; 129 struct bfa_rport_s ; 129 struct bfa_fcxp_req_info_s { struct bfa_rport_s *bfa_rport; struct fchs_s fchs; u8 cts; u8 class; u16 max_frmsz; u16 vf_id; u8 lp_tag; u32 req_tot_len; } ; 151 struct bfa_fcxp_rsp_info_s { struct fchs_s rsp_fchs; u8 rsp_timeout; u8 rsvd2[3U]; u32 rsp_maxlen; } ; 161 struct bfa_fcxp_s { struct list_head qe; void (*sm)(void *, int); void *caller; struct bfa_fcxp_mod_s *fcxp_mod; u16 fcxp_tag; struct bfa_fcxp_req_info_s req_info; struct bfa_fcxp_rsp_info_s rsp_info; u8 use_ireqbuf; u8 use_irspbuf; u32 nreq_sgles; u32 nrsp_sgles; struct list_head req_sgpg_q; struct list_head req_sgpg_wqe; struct list_head rsp_sgpg_q; struct list_head rsp_sgpg_wqe; u64 (*req_sga_cbfn)(void *, int); u32 (*req_sglen_cbfn)(void *, int); u64 (*rsp_sga_cbfn)(void *, int); u32 (*rsp_sglen_cbfn)(void *, int); void (*send_cbfn)(void *, struct bfa_fcxp_s *, void *, enum bfa_status , u32 , u32 , struct fchs_s *); void *send_cbarg; struct bfa_sge_s req_sge[2U]; struct bfa_sge_s rsp_sge[2U]; u8 rsp_status; u32 rsp_len; u32 residue_len; struct fchs_s rsp_fchs; struct bfa_cb_qe_s hcb_qe; struct bfa_reqq_wait_s reqq_wqe; enum bfa_boolean reqq_waiting; enum bfa_boolean req_rsp; } ; 205 struct bfa_fcxp_wqe_s { struct list_head qe; void (*alloc_cbfn)(void *, struct bfa_fcxp_s *); void *alloc_cbarg; void *caller; struct bfa_s *bfa; int nreq_sgles; int nrsp_sgles; u64 (*req_sga_cbfn)(void *, int); u32 (*req_sglen_cbfn)(void *, int); u64 (*rsp_sga_cbfn)(void *, int); u32 (*rsp_sglen_cbfn)(void *, int); } ; 247 struct bfa_rport_mod_s { struct bfa_rport_s *rps_list; struct list_head rp_free_q; struct list_head rp_active_q; struct list_head rp_unused_q; u16 num_rports; struct bfa_mem_kva_s kva_seg; } ; 278 struct bfa_rport_info_s { u16 max_frmsz; unsigned int pid; unsigned char lp_tag; unsigned int local_pid; unsigned char cisc; u8 fc_class; u8 vf_en; u16 vf_id; enum bfa_port_speed speed; } ; 293 union a { enum bfa_status status; void *fw_msg; } ; 314 struct bfa_rport_s { struct list_head qe; void (*sm)(void *, int); struct bfa_s *bfa; void *rport_drv; u16 fw_handle; u16 rport_tag; u8 lun_mask; struct bfa_rport_info_s rport_info; struct bfa_reqq_wait_s reqq_wait; struct bfa_cb_qe_s hcb_qe; struct bfa_rport_hal_stats_s stats; struct bfa_rport_qos_attr_s qos_attr; union a event_arg; } ; 315 struct bfa_uf_s { struct list_head qe; struct bfa_s *bfa; u16 uf_tag; u16 vf_id; u16 src_rport_handle; u16 rsvd; u8 *data_ptr; u16 data_len; u16 pb_len; void *buf_kva; u64 buf_pa; struct bfa_cb_qe_s hcb_qe; struct bfa_sge_s sges[2U]; } ; 356 struct bfa_uf_mod_s { struct bfa_s *bfa; struct bfa_uf_s *uf_list; u16 num_ufs; struct list_head uf_free_q; struct list_head uf_posted_q; struct list_head uf_unused_q; struct bfi_uf_buf_post_s *uf_buf_posts; void (*ufrecv)(void *, struct bfa_uf_s *); void *cbarg; struct bfa_mem_dma_s dma_seg[5U]; struct bfa_mem_kva_s kva_seg; } ; 386 struct bfa_lps_s { struct list_head qe; struct bfa_s *bfa; void (*sm)(void *, int); u8 bfa_tag; u8 fw_tag; u8 reqq; u8 alpa; u32 lp_pid; enum bfa_boolean fdisc; enum bfa_boolean auth_en; enum bfa_boolean auth_req; enum bfa_boolean npiv_en; enum bfa_boolean fport; enum bfa_boolean brcd_switch; enum bfa_status status; u16 pdusz; u16 pr_bbcred; u8 lsrjt_rsn; u8 lsrjt_expl; u8 lun_mask; wwn_t pwwn; wwn_t nwwn; wwn_t pr_pwwn; wwn_t pr_nwwn; struct mac_s lp_mac; struct mac_s fcf_mac; struct bfa_reqq_wait_s wqe; void *uarg; struct bfa_cb_qe_s hcb_qe; struct bfi_lps_login_rsp_s *loginrsp; enum bfa_eproto_status ext_status; } ; 423 struct bfa_lps_mod_s { struct list_head lps_free_q; struct list_head lps_active_q; struct list_head lps_login_q; struct bfa_lps_s *lps_arr; int num_lps; struct bfa_mem_kva_s kva_seg; } ; 441 struct bfa_fcport_s ; 441 struct bfa_fcport_ln_s { struct bfa_fcport_s *fcport; void (*sm)(void *, int); struct bfa_cb_qe_s ln_qe; enum bfa_port_linkstate ln_event; } ; 458 struct bfa_fcport_trunk_s { struct bfa_trunk_attr_s attr; } ; 462 union __anonunion_event_arg_270 { union bfi_fcport_i2h_msg_u i2hmsg; } ; 462 struct bfa_fcport_s { struct bfa_s *bfa; void (*sm)(void *, int); wwn_t nwwn; wwn_t pwwn; enum bfa_port_speed speed_sup; enum bfa_port_speed speed; enum bfa_port_topology topology; u8 rsvd[3U]; u8 myalpa; u8 alpabm_valid; struct fc_alpabm_s alpabm; struct bfa_port_cfg_s cfg; enum bfa_boolean use_flash_cfg; struct bfa_qos_attr_s qos_attr; struct bfa_qos_vc_attr_s qos_vc_attr; struct bfa_reqq_wait_s reqq_wait; struct bfa_reqq_wait_s svcreq_wait; struct bfa_reqq_wait_s stats_reqq_wait; void *event_cbarg; void (*event_cbfn)(void *, enum bfa_port_linkstate ); union __anonunion_event_arg_270 event_arg; void *bfad; struct bfa_fcport_ln_s ln; struct bfa_cb_qe_s hcb_qe; struct bfa_timer_s timer; u32 msgtag; u8 *stats_kva; u64 stats_pa; union bfa_fcport_stats_u *stats; enum bfa_status stats_status; struct list_head stats_pending_q; struct list_head statsclr_pending_q; enum bfa_boolean stats_qfull; u32 stats_reset_time; enum bfa_boolean diag_busy; enum bfa_boolean beacon; enum bfa_boolean link_e2e_beacon; struct bfa_fcport_trunk_s trunk; u16 fcoe_vlan; struct bfa_mem_dma_s fcport_dma; enum bfa_boolean stats_dma_ready; struct bfa_bbcr_attr_s bbcr_attr; enum bfa_fec_state_s fec_state; } ; 690 struct bfa_fcdiag_qtest_s { struct bfa_diag_qtest_result_s *result; void (*cbfn)(void *, enum bfa_status ); void *cbarg; struct bfa_timer_s timer; u32 status; u32 count; u8 lock; u8 queue; u8 all; u8 timer_active; } ; 707 struct bfa_fcdiag_lb_s { void (*cbfn)(void *, enum bfa_status ); void *cbarg; void *result; enum bfa_boolean lock; u32 status; } ; 715 struct bfa_dport_s { struct bfa_s *bfa; void (*sm)(void *, int); struct bfa_reqq_wait_s reqq_wait; void (*cbfn)(void *, enum bfa_status ); void *cbarg; union bfi_diag_dport_msg_u i2hmsg; u8 test_state; u8 dynamic; u8 rsvd[2U]; u32 lpcnt; u32 payload; wwn_t rp_pwwn; wwn_t rp_nwwn; struct bfa_diag_dport_result_s result; } ; 732 struct bfa_fcdiag_s { struct bfa_s *bfa; struct bfa_trc_mod_s *trcmod; struct bfa_fcdiag_lb_s lb; struct bfa_fcdiag_qtest_s qtest; struct bfa_dport_s dport; } ; 761 struct bfa_fcp_mod_s ; 762 struct bfa_iotag_s { struct list_head qe; u16 tag; } ; 36 struct bfa_itn_s { void (*isr)(struct bfa_s *, struct bfi_msg_s *); } ; 105 struct bfa_ioim_s ; 106 struct bfa_tskim_s ; 107 struct bfad_ioim_s ; 108 struct bfad_tskim_s ; 115 struct bfa_itnim_s ; 115 struct bfa_ioim_sp_s ; 115 struct bfa_fcpim_s { struct bfa_s *bfa; struct bfa_fcp_mod_s *fcp; struct bfa_itnim_s *itnim_arr; struct bfa_ioim_s *ioim_arr; struct bfa_ioim_sp_s *ioim_sp_arr; struct bfa_tskim_s *tskim_arr; int num_itnims; int num_tskim_reqs; u32 path_tov; u16 q_depth; u8 reqq; struct list_head itnim_q; struct list_head ioim_resfree_q; struct list_head ioim_comp_q; struct list_head tskim_free_q; struct list_head tskim_unused_q; u32 ios_active; u32 delay_comp; struct bfa_fcpim_del_itn_stats_s del_itn_stats; enum bfa_boolean ioredirect; enum bfa_boolean io_profile; u32 io_profile_start_time; void (*profile_comp)(struct bfa_ioim_s *); void (*profile_start)(struct bfa_ioim_s *); } ; 142 struct bfa_fcp_mod_s { struct bfa_s *bfa; struct list_head iotag_ioim_free_q; struct list_head iotag_tio_free_q; struct list_head iotag_unused_q; struct bfa_iotag_s *iotag_arr; struct bfa_itn_s *itn_arr; int max_ioim_reqs; int num_ioim_reqs; int num_fwtio_reqs; int num_itns; struct bfa_dma_s snsbase[4U]; struct bfa_fcpim_s fcpim; struct bfa_mem_dma_s dma_seg[4U]; struct bfa_mem_kva_s kva_seg; int throttle_update_required; } ; 163 struct bfa_ioim_s { struct list_head qe; void (*sm)(void *, int); struct bfa_s *bfa; struct bfa_fcpim_s *fcpim; struct bfa_itnim_s *itnim; struct bfad_ioim_s *dio; u16 iotag; u16 abort_tag; u16 nsges; u16 nsgpgs; struct bfa_sgpg_s *sgpg; struct list_head sgpg_q; struct bfa_cb_qe_s hcb_qe; void (*io_cbfn)(void *, enum bfa_boolean ); struct bfa_ioim_sp_s *iosp; u8 reqq; u8 mode; u64 start_time; } ; 187 struct bfa_ioim_sp_s { struct bfi_msg_s comp_rspmsg; struct bfa_sgpg_wqe_s sgpg_wqe; struct bfa_reqq_wait_s reqq_wait; enum bfa_boolean abort_explicit; struct bfa_tskim_s *tskim; } ; 195 struct bfa_tskim_s { struct list_head qe; void (*sm)(void *, int); struct bfa_s *bfa; struct bfa_fcpim_s *fcpim; struct bfa_itnim_s *itnim; struct bfad_tskim_s *dtsk; enum bfa_boolean notify; struct scsi_lun lun; enum fcp_tm_cmnd tm_cmnd; u16 tsk_tag; u8 tsecs; struct bfa_reqq_wait_s reqq_wait; struct list_head io_q; struct bfa_wc_s wc; struct bfa_cb_qe_s hcb_qe; enum bfi_tskim_status tsk_status; } ; 217 struct bfa_itnim_s { struct list_head qe; void (*sm)(void *, int); struct bfa_s *bfa; struct bfa_rport_s *rport; void *ditn; struct bfi_mhdr_s mhdr; u8 msg_no; u8 reqq; struct bfa_cb_qe_s hcb_qe; struct list_head pending_q; struct list_head io_q; struct list_head io_cleanup_q; struct list_head tsk_q; struct list_head delay_comp_q; enum bfa_boolean seq_rec; enum bfa_boolean is_online; enum bfa_boolean iotov_active; struct bfa_wc_s wc; struct bfa_timer_s timer; struct bfa_reqq_wait_s reqq_wait; struct bfa_fcpim_s *fcpim; struct bfa_itnim_iostats_s stats; struct bfa_itnim_ioprofile_s ioprofile; } ; 27 struct bfa_port_s { void *dev; struct bfa_ioc_s *ioc; struct bfa_trc_mod_s *trcmod; u32 msgtag; enum bfa_boolean stats_busy; struct bfa_mbox_cmd_s stats_mb; void (*stats_cbfn)(void *, enum bfa_status ); void *stats_cbarg; enum bfa_status stats_status; u32 stats_reset_time; union bfa_port_stats_u *stats; struct bfa_dma_s stats_dma; enum bfa_boolean endis_pending; struct bfa_mbox_cmd_s endis_mb; void (*endis_cbfn)(void *, enum bfa_status ); void *endis_cbarg; enum bfa_status endis_status; struct bfa_ioc_notify_s ioc_notify; enum bfa_boolean pbc_disabled; enum bfa_boolean dport_enabled; struct bfa_mem_dma_s port_dma; } ; 79 struct bfa_cee_cbfn_s { void (*get_attr_cbfn)(void *, enum bfa_status ); void *get_attr_cbarg; void (*get_stats_cbfn)(void *, enum bfa_status ); void *get_stats_cbarg; void (*reset_stats_cbfn)(void *, enum bfa_status ); void *reset_stats_cbarg; } ; 88 struct bfa_cee_s { void *dev; enum bfa_boolean get_attr_pending; enum bfa_boolean get_stats_pending; enum bfa_boolean reset_stats_pending; enum bfa_status get_attr_status; enum bfa_status get_stats_status; enum bfa_status reset_stats_status; struct bfa_cee_cbfn_s cbfn; struct bfa_ioc_notify_s ioc_notify; struct bfa_trc_mod_s *trcmod; struct bfa_cee_attr_s *attr; struct bfa_cee_stats_s *stats; struct bfa_dma_s attr_dma; struct bfa_dma_s stats_dma; struct bfa_ioc_s *ioc; struct bfa_mbox_cmd_s get_cfg_mb; struct bfa_mbox_cmd_s get_stats_mb; struct bfa_mbox_cmd_s reset_stats_mb; struct bfa_mem_dma_s cee_dma; } ; 124 struct bfa_modules_s { struct bfa_fcdiag_s fcdiag; struct bfa_fcport_s fcport; struct bfa_fcxp_mod_s fcxp_mod; struct bfa_lps_mod_s lps_mod; struct bfa_uf_mod_s uf_mod; struct bfa_rport_mod_s rport_mod; struct bfa_fcp_mod_s fcp_mod; struct bfa_sgpg_mod_s sgpg_mod; struct bfa_port_s port; struct bfa_ablk_s ablk; struct bfa_cee_s cee; struct bfa_sfp_s sfp; struct bfa_flash_s flash; struct bfa_diag_s diag_mod; struct bfa_phy_s phy; struct bfa_dconf_mod_s dconf_mod; struct bfa_fru_s fru; } ; 109 struct bfa_s { void *bfad; struct bfa_plog_s *plog; struct bfa_trc_mod_s *trcmod; struct bfa_ioc_s ioc; struct bfa_iocfc_s iocfc; struct bfa_timer_mod_s timer_mod; struct bfa_modules_s modules; struct list_head comp_q; enum bfa_boolean queue_process; struct list_head reqq_waitq[4U]; enum bfa_boolean fcs; struct bfa_msix_s msix; int bfa_aen_seq; enum bfa_boolean intr_enabled; } ; 149 struct bfa_vf_stats_s { u32 flogi_sent; u32 flogi_rsp_err; u32 flogi_acc_err; u32 flogi_accepts; u32 flogi_rejects; u32 flogi_unknown_rsp; u32 flogi_alloc_wait; u32 flogi_rcvd; u32 flogi_rejected; u32 fabric_onlines; u32 fabric_offlines; u32 resvd; } ; 66 struct bfa_lport_symname_s { char symname[128U]; } ; 77 enum bfa_lport_role { BFA_LPORT_ROLE_FCP_IM = 1, BFA_LPORT_ROLE_FCP_MAX = 1 } ; 82 struct bfa_lport_cfg_s { wwn_t pwwn; wwn_t nwwn; struct bfa_lport_symname_s sym_name; struct bfa_lport_symname_s node_sym_name; enum bfa_lport_role roles; u32 rsvd; enum bfa_boolean preboot_vp; u8 tag[16U]; u8 padding[4U]; } ; 154 struct bfa_lport_stats_s { u32 ns_plogi_sent; u32 ns_plogi_rsp_err; u32 ns_plogi_acc_err; u32 ns_plogi_accepts; u32 ns_rejects; u32 ns_plogi_unknown_rsp; u32 ns_plogi_alloc_wait; u32 ns_retries; u32 ns_timeouts; u32 ns_rspnid_sent; u32 ns_rspnid_accepts; u32 ns_rspnid_rsp_err; u32 ns_rspnid_rejects; u32 ns_rspnid_alloc_wait; u32 ns_rftid_sent; u32 ns_rftid_accepts; u32 ns_rftid_rsp_err; u32 ns_rftid_rejects; u32 ns_rftid_alloc_wait; u32 ns_rffid_sent; u32 ns_rffid_accepts; u32 ns_rffid_rsp_err; u32 ns_rffid_rejects; u32 ns_rffid_alloc_wait; u32 ns_gidft_sent; u32 ns_gidft_accepts; u32 ns_gidft_rsp_err; u32 ns_gidft_rejects; u32 ns_gidft_unknown_rsp; u32 ns_gidft_alloc_wait; u32 ns_rnnid_sent; u32 ns_rnnid_accepts; u32 ns_rnnid_rsp_err; u32 ns_rnnid_rejects; u32 ns_rnnid_alloc_wait; u32 ns_rsnn_nn_sent; u32 ns_rsnn_nn_accepts; u32 ns_rsnn_nn_rsp_err; u32 ns_rsnn_nn_rejects; u32 ns_rsnn_nn_alloc_wait; u32 ms_retries; u32 ms_timeouts; u32 ms_plogi_sent; u32 ms_plogi_rsp_err; u32 ms_plogi_acc_err; u32 ms_plogi_accepts; u32 ms_rejects; u32 ms_plogi_unknown_rsp; u32 ms_plogi_alloc_wait; u32 num_rscn; u32 num_portid_rscn; u32 uf_recvs; u32 uf_recv_drops; u32 plogi_rcvd; u32 prli_rcvd; u32 adisc_rcvd; u32 prlo_rcvd; u32 logo_rcvd; u32 rpsc_rcvd; u32 un_handled_els_rcvd; u32 rport_plogi_timeouts; u32 rport_del_max_plogi_retry; } ; 272 struct bfa_vport_stats_s { struct bfa_lport_stats_s port_stats; u32 fdisc_sent; u32 fdisc_accepts; u32 fdisc_retries; u32 fdisc_timeouts; u32 fdisc_rsp_err; u32 fdisc_acc_bad; u32 fdisc_rejects; u32 fdisc_unknown_rsp; u32 fdisc_alloc_wait; u32 logo_alloc_wait; u32 logo_sent; u32 logo_accepts; u32 logo_rejects; u32 logo_rsp_err; u32 logo_unknown_rsp; u32 fab_no_npiv; u32 fab_offline; u32 fab_online; u32 fab_cleanup; u32 rsvd; } ; 336 enum bfa_rport_function { BFA_RPORT_INITIATOR = 1, BFA_RPORT_TARGET = 2 } ; 341 struct bfa_rport_symname_s { char symname[255U]; } ; 355 struct bfa_rport_stats_s { u32 offlines; u32 onlines; u32 rscns; u32 plogis; u32 plogi_accs; u32 plogi_timeouts; u32 plogi_rejects; u32 plogi_failed; u32 plogi_rcvd; u32 prli_rcvd; u32 adisc_rcvd; u32 adisc_rejects; u32 adisc_sent; u32 adisc_accs; u32 adisc_failed; u32 adisc_rejected; u32 logos; u32 logo_accs; u32 logo_failed; u32 logo_rejected; u32 logo_rcvd; u32 rpsc_rcvd; u32 rpsc_rejects; u32 rpsc_sent; u32 rpsc_accs; u32 rpsc_failed; u32 rpsc_rejected; u32 rjt_insuff_res; struct bfa_rport_hal_stats_s hal_stats; } ; 442 struct bfa_itnim_stats_s { u32 onlines; u32 offlines; u32 prli_sent; u32 fcxp_alloc_wait; u32 prli_rsp_err; u32 prli_rsp_acc; u32 initiator; u32 prli_rsp_parse_err; u32 prli_rsp_rjt; u32 timeout; u32 sler; u32 rsvd; } ; 495 struct bfa_fcs_s ; 496 struct bfa_fcs_lport_s ; 496 struct bfa_fcs_lport_ns_s { void (*sm)(void *, int); struct bfa_timer_s timer; struct bfa_fcs_lport_s *port; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; u8 num_rnnid_retries; u8 num_rsnn_nn_retries; } ; 78 struct bfa_fcs_lport_scn_s { void (*sm)(void *, int); struct bfa_timer_s timer; struct bfa_fcs_lport_s *port; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; } ; 87 struct bfa_fcs_lport_ms_s ; 87 struct bfa_fcs_lport_fdmi_s { void (*sm)(void *, int); struct bfa_timer_s timer; struct bfa_fcs_lport_ms_s *ms; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; u8 retry_cnt; u8 rsvd[3U]; } ; 98 struct bfa_fcs_lport_ms_s { void (*sm)(void *, int); struct bfa_timer_s timer; struct bfa_fcs_lport_s *port; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; struct bfa_fcs_lport_fdmi_s fdmi; u8 retry_cnt; u8 rsvd[3U]; } ; 110 struct bfa_fcs_lport_fab_s { struct bfa_fcs_lport_ns_s ns; struct bfa_fcs_lport_scn_s scn; struct bfa_fcs_lport_ms_s ms; } ; 117 struct bfa_fcs_lport_loop_s { u8 num_alpa; u8 alpabm_valid; u8 alpa_pos_map[127U]; struct bfa_fcs_lport_s *port; } ; 126 struct bfa_fcs_lport_n2n_s { u32 rsvd; __be16 reply_oxid; wwn_t rem_port_wwn; } ; 133 union bfa_fcs_lport_topo_u { struct bfa_fcs_lport_fab_s pfab; struct bfa_fcs_lport_loop_s ploop; struct bfa_fcs_lport_n2n_s pn2n; } ; 140 struct bfa_fcs_fabric_s ; 140 struct bfad_port_s ; 140 struct bfa_fcs_vport_s ; 140 struct bfa_fcs_lport_s { struct list_head qe; void (*sm)(void *, int); struct bfa_fcs_fabric_s *fabric; struct bfa_lport_cfg_s port_cfg; struct bfa_timer_s link_timer; unsigned int pid; u8 lp_tag; u16 num_rports; struct list_head rport_q; struct bfa_fcs_s *fcs; union bfa_fcs_lport_topo_u port_topo; struct bfad_port_s *bfad_port; struct bfa_fcs_vport_s *vport; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; struct bfa_lport_stats_s stats; struct bfa_wc_s wc; } ; 161 struct bfad_vf_s ; 162 enum bfa_fcs_fabric_type { BFA_FCS_FABRIC_UNKNOWN = 0, BFA_FCS_FABRIC_SWITCHED = 1, BFA_FCS_FABRIC_N2N = 2, BFA_FCS_FABRIC_LOOP = 3 } ; 169 union __anonunion_event_arg_271 { u16 swp_vfid; } ; 169 struct bfa_fcs_fabric_s { struct list_head qe; void (*sm)(void *, int); struct bfa_fcs_s *fcs; struct bfa_fcs_lport_s bport; enum bfa_fcs_fabric_type fab_type; enum bfa_port_type oper_type; u8 is_vf; u8 is_npiv; u8 is_auth; u16 bb_credit; u16 vf_id; u16 num_vports; u16 rsvd; struct list_head vport_q; struct list_head vf_q; struct bfad_vf_s *vf_drv; struct bfa_timer_s link_timer; wwn_t fabric_name; enum bfa_boolean auth_reqd; struct bfa_timer_s delay_timer; union __anonunion_event_arg_271 event_arg; struct bfa_wc_s wc; struct bfa_vf_stats_s stats; struct bfa_lps_s *lps; u8 fabric_ip_addr[16U]; struct bfa_wc_s stop_wc; } ; 330 struct bfa_fcs_rport_s ; 356 struct bfad_vport_s ; 356 struct bfa_fcs_vport_s { struct list_head qe; void (*sm)(void *, int); struct bfa_fcs_lport_s lport; struct bfa_timer_s timer; struct bfad_vport_s *vport_drv; struct bfa_vport_stats_s vport_stats; struct bfa_lps_s *lps; int fdisc_retries; } ; 397 struct bfad_rport_s ; 398 struct bfa_fcs_itnim_s ; 399 struct bfa_fcs_tin_s ; 400 struct bfa_fcs_iprp_s ; 401 struct bfa_fcs_rpf_s { void (*sm)(void *, int); struct bfa_fcs_rport_s *rport; struct bfa_timer_s timer; struct bfa_fcxp_s *fcxp; struct bfa_fcxp_wqe_s fcxp_wqe; int rpsc_retries; enum bfa_port_speed rpsc_speed; enum bfa_port_speed assigned_speed; } ; 422 struct bfa_fcs_rport_s { struct list_head qe; struct bfa_fcs_lport_s *port; struct bfa_fcs_s *fcs; struct bfad_rport_s *rp_drv; u32 pid; u32 old_pid; u16 maxfrsize; __be16 reply_oxid; enum fc_cos fc_cos; enum bfa_boolean cisc; enum bfa_boolean prlo; enum bfa_boolean plogi_pending; wwn_t pwwn; wwn_t nwwn; struct bfa_rport_symname_s psym_name; void (*sm)(void *, int); struct bfa_timer_s timer; struct bfa_fcs_itnim_s *itnim; struct bfa_fcs_tin_s *tin; struct bfa_fcs_iprp_s *iprp; struct bfa_rport_s *bfa_rport; struct bfa_fcxp_s *fcxp; int plogi_retries; int ns_retries; struct bfa_fcxp_wqe_s fcxp_wqe; struct bfa_rport_stats_s stats; enum bfa_rport_function scsi_function; struct bfa_fcs_rpf_s rpf; enum bfa_boolean scn_online; } ; 499 struct bfad_itnim_s ; 500 struct bfa_fcs_itnim_s { void (*sm)(void *, int); struct bfa_fcs_rport_s *rport; struct bfad_itnim_s *itnim_drv; struct bfa_fcs_s *fcs; struct bfa_timer_s timer; struct bfa_itnim_s *bfa_itnim; u32 prli_retries; enum bfa_boolean seq_rec; enum bfa_boolean rec_support; enum bfa_boolean conf_comp; enum bfa_boolean task_retry_id; struct bfa_fcxp_wqe_s fcxp_wqe; struct bfa_fcxp_s *fcxp; struct bfa_itnim_stats_s stats; } ; 678 struct __anonstruct_uf_272 { u32 untagged; u32 tagged; u32 vfid_unknown; } ; 678 struct bfa_fcs_stats_s { struct __anonstruct_uf_272 uf; } ; 686 struct bfa_fcs_driver_info_s { u8 version[64U]; u8 host_machine_name[64U]; u8 host_os_name[64U]; u8 host_os_patch[64U]; u8 os_device_name[64U]; } ; 694 struct bfad_s ; 694 struct bfa_fcs_s { struct bfa_s *bfa; struct bfad_s *bfad; struct bfa_trc_mod_s *trcmod; enum bfa_boolean vf_enabled; enum bfa_boolean fdmi_enabled; enum bfa_boolean min_cfg; u16 port_vfid; struct bfa_fcs_driver_info_s driver_info; struct bfa_fcs_fabric_s fabric; struct bfa_fcs_stats_s stats; struct bfa_wc_s wc; int fcs_aen_seq; u32 num_rport_logins; } ; 882 struct bfad_msix_s { struct bfad_s *bfad; struct msix_entry msix; char name[32U]; } ; 117 enum bfad_port_pvb_type { BFAD_PORT_PHYS_BASE = 0, BFAD_PORT_PHYS_VPORT = 1, BFAD_PORT_VF_BASE = 2, BFAD_PORT_VF_VPORT = 3 } ; 124 struct bfad_im_port_s ; 124 struct bfad_port_s { struct list_head list_entry; struct bfad_s *bfad; struct bfa_fcs_lport_s *fcs_port; u32 roles; s32 flags; u32 supported_fc4s; enum bfad_port_pvb_type pvb_type; struct bfad_im_port_s *im_port; struct dentry *port_debugfs_root; } ; 144 struct bfad_vport_s { struct bfad_port_s drv_port; struct bfa_fcs_vport_s fcs_vport; struct completion *comp_del; struct list_head list_entry; } ; 154 struct bfad_vf_s { struct bfa_fcs_fabric_s fcs_vf; struct bfad_port_s base_port; struct bfad_s *bfad; } ; 163 struct bfad_cfg_param_s { u32 rport_del_timeout; u32 ioc_queue_depth; u32 lun_queue_depth; u32 io_max_sge; u32 binding_method; } ; 171 union bfad_tmp_buf { char manufacturer[8U]; char serial_num[12U]; char model[16U]; char fw_ver[64U]; char optrom_ver[64U]; u8 chip_rev[8U]; wwn_t wwn[256U]; } ; 185 struct bfad_im_s ; 185 struct bfad_s { void (*sm)(void *, int); struct list_head list_entry; struct bfa_s bfa; struct bfa_fcs_s bfa_fcs; struct pci_dev *pcidev; const char *pci_name; struct bfa_pcidev_s hal_pcidev; struct bfa_ioc_pci_attr_s pci_attr; void *pci_bar0_kva; void *pci_bar2_kva; struct completion comp; struct completion suspend; struct completion enable_comp; struct completion disable_comp; enum bfa_boolean disable_active; struct bfad_port_s pport; struct bfa_meminfo_s meminfo; struct bfa_iocfc_cfg_s ioc_cfg; u32 inst_no; u32 bfad_flags; spinlock_t bfad_lock; struct task_struct *bfad_tsk; struct bfad_cfg_param_s cfg_data; struct bfad_msix_s msix_tab[22U]; int nvec; char adapter_name[64U]; char port_name[64U]; struct timer_list hal_tmo; unsigned long hs_start; struct bfad_im_s *im; struct bfa_trc_mod_s *trcmod; struct bfa_plog_s plog_buf; int ref_count; union bfad_tmp_buf tmp_buf; struct fc_host_statistics link_stats; struct list_head pbc_vport_list; char *regdata; u32 reglen; struct dentry *bfad_dentry_files[5U]; struct list_head free_aen_q; struct list_head active_aen_q; struct bfa_aen_entry_s aen_list[512U]; spinlock_t bfad_aen_spinlock; struct list_head vport_list; } ; 236 enum bfad_sm_event { BFAD_E_CREATE = 1, BFAD_E_KTHREAD_CREATE_FAILED = 2, BFAD_E_INIT = 3, BFAD_E_INIT_SUCCESS = 4, BFAD_E_HAL_INIT_FAILED = 5, BFAD_E_INIT_FAILED = 6, BFAD_E_FCS_EXIT_COMP = 7, BFAD_E_EXIT_COMP = 8, BFAD_E_STOP = 9 } ; 248 struct bfad_rport_s { struct bfa_fcs_rport_s fcs_rport; } ; 284 struct bfad_hal_comp { enum bfa_status status; struct completion comp; } ; 57 struct bfad_im_port_s { struct bfad_s *bfad; struct bfad_port_s *port; struct work_struct port_delete_work; int idr_id; u16 cur_scsi_id; u16 flags; struct list_head binding_list; struct Scsi_Host *shost; struct list_head itnim_mapped_list; struct fc_vport *fc_vport; } ; 70 enum bfad_itnim_state { ITNIM_STATE_NONE = 0, ITNIM_STATE_ONLINE = 1, ITNIM_STATE_OFFLINE_PENDING = 2, ITNIM_STATE_OFFLINE = 3, ITNIM_STATE_TIMEOUT = 4, ITNIM_STATE_FREE = 5 } ; 79 struct bfad_itnim_s { struct list_head list_entry; struct bfa_fcs_itnim_s fcs_itnim; struct work_struct itnim_work; u32 flags; enum bfad_itnim_state state; struct bfad_im_s *im; struct bfad_im_port_s *im_port; struct bfad_rport_s *drv_rport; struct fc_rport *fc_rport; struct bfa_itnim_s *bfa_itnim; u16 scsi_tgt_id; u16 channel; u16 queue_work; unsigned long last_ramp_up_time; unsigned long last_queue_full_time; } ; 115 struct bfad_im_s { struct bfad_s *bfad; struct workqueue_struct *drv_workq; char drv_workq_name[20U]; struct work_struct aen_im_notify_work; } ; 106 typedef __u8 uint8_t; 111 typedef __u64 uint64_t; 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; } ; 134 enum fc_tgtid_binding_type { FC_TGTID_BIND_NONE = 0, FC_TGTID_BIND_BY_WWPN = 1, FC_TGTID_BIND_BY_WWNN = 2, FC_TGTID_BIND_BY_ID = 3 } ; 251 struct fc_rport_identifiers { u64 node_name; u64 port_name; u32 port_id; u32 roles; } ; 461 struct fc_host_attrs { u64 node_name; u64 port_name; u64 permanent_port_name; u32 supported_classes; u8 supported_fc4s[32U]; u32 supported_speeds; u32 maxframe_size; u16 max_npiv_vports; char serial_number[80U]; char manufacturer[80U]; char model[256U]; char model_description[256U]; char hardware_version[64U]; char driver_version[64U]; char firmware_version[64U]; char optionrom_version[64U]; u32 port_id; enum fc_port_type port_type; enum fc_port_state port_state; u8 active_fc4s[32U]; u32 speed; u64 fabric_name; char symbolic_name[256U]; char system_hostname[256U]; u32 dev_loss_tmo; enum fc_tgtid_binding_type tgtid_bind_type; struct list_head rports; struct list_head rport_bindings; struct list_head vports; u32 next_rport_number; u32 next_target_id; u32 next_vport_number; u16 npiv_vports_inuse; char work_q_name[20U]; struct workqueue_struct *work_q; char devloss_work_q_name[20U]; struct workqueue_struct *devloss_work_q; struct request_queue *rqst_q; } ; 546 struct fc_bsg_buffer { unsigned int payload_len; int sg_cnt; struct scatterlist *sg_list; } ; 631 struct fc_bsg_request ; 631 struct fc_bsg_reply ; 631 struct fc_bsg_job { struct Scsi_Host *shost; struct fc_rport *rport; struct device *dev; struct request *req; spinlock_t job_lock; unsigned int state_flags; unsigned int ref_cnt; void (*job_done)(struct fc_bsg_job *); struct fc_bsg_request *request; struct fc_bsg_reply *reply; unsigned int request_len; unsigned int reply_len; struct fc_bsg_buffer request_payload; struct fc_bsg_buffer reply_payload; void *dd_data; } ; 665 struct fc_function_template { void (*get_rport_dev_loss_tmo)(struct fc_rport *); void (*set_rport_dev_loss_tmo)(struct fc_rport *, u32 ); void (*get_starget_node_name)(struct scsi_target *); void (*get_starget_port_name)(struct scsi_target *); void (*get_starget_port_id)(struct scsi_target *); void (*get_host_port_id)(struct Scsi_Host *); void (*get_host_port_type)(struct Scsi_Host *); void (*get_host_port_state)(struct Scsi_Host *); void (*get_host_active_fc4s)(struct Scsi_Host *); void (*get_host_speed)(struct Scsi_Host *); void (*get_host_fabric_name)(struct Scsi_Host *); void (*get_host_symbolic_name)(struct Scsi_Host *); void (*set_host_system_hostname)(struct Scsi_Host *); struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *); void (*reset_fc_host_stats)(struct Scsi_Host *); int (*issue_fc_host_lip)(struct Scsi_Host *); void (*dev_loss_tmo_callbk)(struct fc_rport *); void (*terminate_rport_io)(struct fc_rport *); void (*set_vport_symbolic_name)(struct fc_vport *); int (*vport_create)(struct fc_vport *, bool ); int (*vport_disable)(struct fc_vport *, bool ); int (*vport_delete)(struct fc_vport *); int (*tsk_mgmt_response)(struct Scsi_Host *, u64 , u64 , int); int (*it_nexus_response)(struct Scsi_Host *, u64 , int); int (*bsg_request)(struct fc_bsg_job *); int (*bsg_timeout)(struct fc_bsg_job *); u32 dd_fcrport_size; u32 dd_fcvport_size; u32 dd_bsg_size; unsigned char show_rport_maxframe_size; unsigned char show_rport_supported_classes; unsigned char show_rport_dev_loss_tmo; unsigned char show_starget_node_name; unsigned char show_starget_port_name; unsigned char show_starget_port_id; unsigned char show_host_node_name; unsigned char show_host_port_name; unsigned char show_host_permanent_port_name; unsigned char show_host_supported_classes; unsigned char show_host_supported_fc4s; unsigned char show_host_supported_speeds; unsigned char show_host_maxframe_size; unsigned char show_host_serial_number; unsigned char show_host_manufacturer; unsigned char show_host_model; unsigned char show_host_model_description; unsigned char show_host_hardware_version; unsigned char show_host_driver_version; unsigned char show_host_firmware_version; unsigned char show_host_optionrom_version; unsigned char show_host_port_id; unsigned char show_host_port_type; unsigned char show_host_port_state; unsigned char show_host_active_fc4s; unsigned char show_host_speed; unsigned char show_host_fabric_name; unsigned char show_host_symbolic_name; unsigned char show_host_system_hostname; unsigned char disable_target_scan; } ; 121 struct fc_bsg_host_add_rport { uint8_t reserved; uint8_t port_id[3U]; } ; 88 struct fc_bsg_host_del_rport { uint8_t reserved; uint8_t port_id[3U]; } ; 109 struct fc_bsg_host_els { uint8_t command_code; uint8_t port_id[3U]; } ; 133 struct __anonstruct_rjt_data_240 { uint8_t action; uint8_t reason_code; uint8_t reason_explanation; uint8_t vendor_unique; } ; 133 struct fc_bsg_ctels_reply { uint32_t status; struct __anonstruct_rjt_data_240 rjt_data; } ; 178 struct fc_bsg_host_ct { uint8_t reserved; uint8_t port_id[3U]; uint32_t preamble_word0; uint32_t preamble_word1; uint32_t preamble_word2; } ; 203 struct fc_bsg_host_vendor { uint64_t vendor_id; uint32_t vendor_cmd[0U]; } ; 226 struct fc_bsg_host_vendor_reply { uint32_t vendor_rsp[0U]; } ; 233 struct fc_bsg_rport_els { uint8_t els_code; } ; 252 struct fc_bsg_rport_ct { uint32_t preamble_word0; uint32_t preamble_word1; uint32_t preamble_word2; } ; 272 union __anonunion_rqst_data_241 { struct fc_bsg_host_add_rport h_addrport; struct fc_bsg_host_del_rport h_delrport; struct fc_bsg_host_els h_els; struct fc_bsg_host_ct h_ct; struct fc_bsg_host_vendor h_vendor; struct fc_bsg_rport_els r_els; struct fc_bsg_rport_ct r_ct; } ; 272 struct fc_bsg_request { uint32_t msgcode; union __anonunion_rqst_data_241 rqst_data; } ; 294 union __anonunion_reply_data_242 { struct fc_bsg_host_vendor_reply vendor_reply; struct fc_bsg_ctels_reply ctels_reply; } ; 294 struct fc_bsg_reply { uint32_t result; uint32_t reply_payload_rcv_len; union __anonunion_reply_data_242 reply_data; } ; 333 union __anonunion_w_246 { u64 wwn; u8 byte[8U]; } ; 347 union __anonunion_f_248 { u32 fcid; u8 byte[4U]; } ; 228 struct bfa_adapter_attr_s { char manufacturer[8U]; char serial_num[12U]; u32 card_type; char model[16U]; char model_descr[128U]; wwn_t pwwn; char node_symname[256U]; char hw_ver[64U]; char fw_ver[64U]; char optrom_ver[64U]; char os_type[64U]; struct bfa_mfg_vpd_s vpd; struct mac_s mac; u8 nports; u8 max_speed; u8 prototype; char asic_rev; u8 pcie_gen; u8 pcie_lanes_orig; u8 pcie_lanes; u8 cna_capable; u8 is_mezz; u8 trunk_capable; u8 mfg_day; u8 mfg_month; u16 mfg_year; u16 rsvd; u8 uuid[16U]; } ; 310 struct bfa_ioc_driver_attr_s { char driver[16U]; char driver_ver[64U]; char fw_ver[64U]; char bios_ver[64U]; char efi_ver[64U]; char ob_ver[64U]; } ; 339 enum bfa_ioc_state { BFA_IOC_UNINIT = 1, BFA_IOC_RESET = 2, BFA_IOC_SEMWAIT = 3, BFA_IOC_HWINIT = 4, BFA_IOC_GETATTR = 5, BFA_IOC_OPERATIONAL = 6, BFA_IOC_INITFAIL = 7, BFA_IOC_FAIL = 8, BFA_IOC_DISABLING = 9, BFA_IOC_DISABLED = 10, BFA_IOC_FWMISMATCH = 11, BFA_IOC_ENABLING = 12, BFA_IOC_HWFAIL = 13, BFA_IOC_ACQ_ADDR = 14 } ; 397 enum bfa_ioc_type_e { BFA_IOC_TYPE_FC = 1, BFA_IOC_TYPE_FCoE = 2, BFA_IOC_TYPE_LL = 3 } ; 403 struct bfa_ioc_attr_s { enum bfa_ioc_type_e ioc_type; enum bfa_ioc_state state; struct bfa_adapter_attr_s adapter_attr; struct bfa_ioc_driver_attr_s driver_attr; struct bfa_ioc_pci_attr_s pci_attr; u8 port_id; u8 port_mode; u8 cap_bm; u8 port_mode_cfg; u8 def_fn; u8 rsvd[3U]; } ; 690 enum bfi_ioim_status { BFI_IOIM_STS_OK = 0, BFI_IOIM_STS_HOST_ABORTED = 1, BFI_IOIM_STS_ABORTED = 2, BFI_IOIM_STS_TIMEDOUT = 3, BFI_IOIM_STS_RES_FREE = 4, BFI_IOIM_STS_SQER_NEEDED = 5, BFI_IOIM_STS_PROTO_ERR = 6, BFI_IOIM_STS_UTAG = 7, BFI_IOIM_STS_PATHTOV = 8 } ; 41 struct bfad_itnim_data_s { struct bfad_itnim_s *itnim; } ; 100 enum bfad_binding_type { FCP_PWWN_BINDING = 1, FCP_NWWN_BINDING = 2, FCP_FCID_BINDING = 3 } ; 106 struct bfad_fcp_binding { struct list_head list_entry; enum bfad_binding_type binding_type; u16 scsi_target_id; u32 fc_id; wwn_t nwwn; wwn_t pwwn; } ; 107 typedef __u16 uint16_t; 361 struct fc_starget_attrs { u64 node_name; u64 port_name; u32 port_id; } ; 1008 struct fc_symname_s { u8 symname[256U]; } ; 757 enum bfa_port_states { BFA_PORT_ST_UNINIT = 1, BFA_PORT_ST_ENABLING_QWAIT = 2, BFA_PORT_ST_ENABLING = 3, BFA_PORT_ST_LINKDOWN = 4, BFA_PORT_ST_LINKUP = 5, BFA_PORT_ST_DISABLING_QWAIT = 6, BFA_PORT_ST_DISABLING = 7, BFA_PORT_ST_DISABLED = 8, BFA_PORT_ST_STOPPED = 9, BFA_PORT_ST_IOCDOWN = 10, BFA_PORT_ST_IOCDIS = 11, BFA_PORT_ST_FWMISMATCH = 12, BFA_PORT_ST_PREBOOT_DISABLED = 13, BFA_PORT_ST_TOGGLING_QWAIT = 14, BFA_PORT_ST_FAA_MISCONFIG = 15, BFA_PORT_ST_DPORT = 16, BFA_PORT_ST_DDPORT = 17, BFA_PORT_ST_MAX_STATE = 18 } ; 968 struct bfa_port_attr_s { wwn_t nwwn; wwn_t pwwn; wwn_t factorynwwn; wwn_t factorypwwn; enum fc_cos cos_supported; u32 rsvd; struct fc_symname_s port_symname; enum bfa_port_speed speed_supported; enum bfa_boolean pbind_enabled; struct bfa_port_cfg_s pport_cfg; enum bfa_port_states port_state; enum bfa_port_speed speed; enum bfa_port_topology topology; enum bfa_boolean beacon; enum bfa_boolean link_e2e_beacon; enum bfa_boolean bbsc_op_status; enum bfa_fec_state_s fec_state; u32 pid; enum bfa_port_type port_type; u32 loopback; u32 authfail; u16 fcoe_vlan; u8 rsvd1[2U]; } ; 103 enum bfa_lport_state { BFA_LPORT_UNINIT = 0, BFA_LPORT_FDISC = 1, BFA_LPORT_ONLINE = 2, BFA_LPORT_OFFLINE = 3 } ; 238 struct bfa_lport_attr_s { enum bfa_lport_state state; u32 pid; struct bfa_lport_cfg_s port_cfg; enum bfa_port_type port_type; u32 loopback; wwn_t fabric_name; u8 fabric_ip_addr[16U]; struct mac_s fpma_mac; u16 authfail; } ; 425 struct bfa_rport_qualifier_s { wwn_t pwwn; u32 pid; u32 rsvd; } ; 170 struct bfad_debug_info { char *debug_buffer; void *i_private; int buffer_len; } ; 356 struct bfa_fw_ioc_stats_s { u32 enable_reqs; u32 disable_reqs; u32 get_attr_reqs; u32 dbg_sync; u32 dbg_dump; u32 unknown_reqs; } ; 389 struct bfa_ioc_stats_s { struct bfa_ioc_drv_stats_s drv_stats; struct bfa_fw_ioc_stats_s fw_stats; } ; 664 struct bfa_boot_bootlun_s { wwn_t pwwn; struct scsi_lun lun; } ; 714 struct bfa_boot_cfg_s { u8 version; u8 rsvd1; u16 chksum; u8 enable; u8 speed; u8 topology; u8 bootopt; u32 nbluns; u32 rsvd2; struct bfa_boot_bootlun_s blun[4U]; struct bfa_boot_bootlun_s blun_disc[4U]; } ; 732 struct bfa_boot_pbc_s { u8 enable; u8 speed; u8 topology; u8 rsvd1; u32 nbluns; struct bfa_boot_bootlun_s pblun[8U]; } ; 741 struct bfa_ethboot_cfg_s { u8 version; u8 rsvd1; u16 chksum; u8 enable; u8 rsvd2; u16 vlan; } ; 756 struct bfa_adapter_cfg_mode_s { u16 max_pf; u16 max_vf; enum bfa_mode_s mode; } ; 1102 enum bfa_flash_part_type { BFA_FLASH_PART_OPTROM = 1, BFA_FLASH_PART_FWIMG = 2, BFA_FLASH_PART_FWCFG = 3, BFA_FLASH_PART_DRV = 4, BFA_FLASH_PART_BOOT = 5, BFA_FLASH_PART_ASIC = 6, BFA_FLASH_PART_MFG = 7, BFA_FLASH_PART_OPTROM2 = 8, BFA_FLASH_PART_VPD = 9, BFA_FLASH_PART_PBC = 10, BFA_FLASH_PART_BOOTOVL = 11, BFA_FLASH_PART_LOG = 12, BFA_FLASH_PART_PXECFG = 13, BFA_FLASH_PART_PXEOVL = 14, BFA_FLASH_PART_PORTCFG = 15, BFA_FLASH_PART_ASICBK = 16 } ; 1121 struct bfa_flash_part_attr_s { u32 part_type; u32 part_instance; u32 part_off; u32 part_size; u32 part_len; u32 part_status; char rsv[8U]; } ; 1140 struct bfa_flash_attr_s { u32 status; u32 npart; struct bfa_flash_part_attr_s part[32U]; } ; 1149 struct bfa_diag_memtest_s { u8 algo; u8 rsvd[7U]; } ; 1162 struct bfa_diag_memtest_result { u32 status; u32 addr; u32 exp; u32 act; u32 err_status; u32 err_status1; u32 err_addr; u8 algo; u8 rsv[3U]; } ; 1174 struct bfa_diag_loopback_result_s { u32 numtxmfrm; u32 numosffrm; u32 numrcvfrm; u32 badfrminf; u32 badfrmnum; u8 status; u8 rsvd[3U]; } ; 1232 struct bfa_diag_ledtest_s { u32 cmd; u32 color; u16 freq; u8 led; u8 rsvd[5U]; } ; 1254 struct bfa_phy_attr_s { u32 status; u32 length; u32 fw_ver; u32 an_status; u32 pma_pmd_status; u32 pma_pmd_signal; u32 pcs_status; } ; 1270 struct bfa_phy_stats_s { u32 status; u32 link_breaks; u32 pma_pmd_fault; u32 pcs_fault; u32 speed_neg; u32 tx_eq_training; u32 tx_eq_timeout; u32 crc_error; } ; 441 struct bfa_iocfc_attr_s { struct bfa_iocfc_cfg_s config; struct bfa_iocfc_intr_attr_s intr_attr; } ; 796 enum bfa_port_opmode { BFA_PORT_OPMODE_NORMAL = 0, BFA_PORT_OPMODE_LB_INT = 1, BFA_PORT_OPMODE_LB_SLW = 2, BFA_PORT_OPMODE_LB_EXT = 4, BFA_PORT_OPMODE_LB_CBL = 8, BFA_PORT_OPMODE_LB_NLINT = 32 } ; 934 struct bfa_defs_fcpim_throttle_s { u16 max_value; u16 cur_value; u16 cfg_value; u16 rsvd; } ; 1218 struct bfa_vhba_attr_s { wwn_t nwwn; wwn_t pwwn; u32 pid; enum bfa_boolean io_profile; enum bfa_boolean plog_enabled; u16 path_tov; u8 rsvd[2U]; } ; 1334 struct bfa_port_cfg_mode_s { u16 max_pf; u16 max_vf; enum bfa_mode_s mode; } ; 431 struct bfa_cb_pending_q_s { struct bfa_cb_qe_s hcb_qe; void *data; } ; 255 enum bfa_vport_state { BFA_FCS_VPORT_UNINIT = 0, BFA_FCS_VPORT_CREATED = 1, BFA_FCS_VPORT_OFFLINE = 1, BFA_FCS_VPORT_FDISC_SEND = 2, BFA_FCS_VPORT_FDISC = 3, BFA_FCS_VPORT_FDISC_RETRY = 4, BFA_FCS_VPORT_FDISC_RSP_WAIT = 5, BFA_FCS_VPORT_ONLINE = 6, BFA_FCS_VPORT_DELETING = 7, BFA_FCS_VPORT_CLEANUP = 8, BFA_FCS_VPORT_LOGO_SEND = 9, BFA_FCS_VPORT_LOGO = 10, BFA_FCS_VPORT_ERROR = 11, BFA_FCS_VPORT_MAX_STATE = 12 } ; 314 struct bfa_vport_attr_s { struct bfa_lport_attr_s port_attr; enum bfa_vport_state vport_state; u32 rsvd; } ; 323 enum bfa_rport_state { BFA_RPORT_UNINIT = 0, BFA_RPORT_OFFLINE = 1, BFA_RPORT_PLOGI = 2, BFA_RPORT_ONLINE = 3, BFA_RPORT_PLOGI_RETRY = 4, BFA_RPORT_NSQUERY = 5, BFA_RPORT_ADISC = 6, BFA_RPORT_LOGO = 7, BFA_RPORT_LOGORCV = 8, BFA_RPORT_NSDISC = 9 } ; 392 struct bfa_rport_attr_s { wwn_t nwwn; wwn_t pwwn; enum fc_cos cos_supported; u32 pid; u32 df_sz; enum bfa_rport_state state; enum fc_cos fc_cos; enum bfa_boolean cisc; struct bfa_rport_symname_s symname; enum bfa_rport_function scsi_function; struct bfa_rport_qos_attr_s qos_attr; enum bfa_port_speed curr_speed; enum bfa_boolean trl_enforced; enum bfa_port_speed assigned_speed; } ; 431 enum bfa_itnim_state { BFA_ITNIM_OFFLINE = 0, BFA_ITNIM_PRLI_SEND = 1, BFA_ITNIM_PRLI_SENT = 2, BFA_ITNIM_PRLI_RETRY = 3, BFA_ITNIM_HCB_ONLINE = 4, BFA_ITNIM_ONLINE = 5, BFA_ITNIM_HCB_OFFLINE = 6, BFA_ITNIM_INITIATIOR = 7 } ; 466 struct bfa_itnim_attr_s { enum bfa_itnim_state state; u8 retry; u8 task_retry_id; u8 rec_support; u8 conf_comp; } ; 256 struct bfad_buf_info { void *virt; dma_addr_t phys; u32 size; } ; 262 struct bfad_fcxp { struct bfad_port_s *port; struct bfa_rport_s *bfa_rport; enum bfa_status req_status; u16 tag; u16 rsp_len; u16 rsp_maxlen; u8 use_ireqbuf; u8 use_irspbuf; u32 num_req_sgles; u32 num_rsp_sgles; struct fchs_s fchs; void *reqbuf_info; void *rspbuf_info; struct bfa_sge_s *req_sge; struct bfa_sge_s *rsp_sge; void (*send_cbfn)(struct bfa_s *, struct bfa_fcxp_s *, void *, enum bfa_status , u32 , u32 , struct fchs_s *); void *send_cbarg; void *bfa_fcxp; struct completion comp; } ; 304 struct bfa_bsg_gen_s { enum bfa_status status; u16 bfad_num; u16 rsvd; } ; 165 struct bfa_bsg_portlogctl_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_boolean ctl; int inst_no; } ; 173 struct bfa_bsg_fcpim_profile_s { enum bfa_status status; u16 bfad_num; u16 rsvd; } ; 179 struct bfa_bsg_itnim_ioprofile_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t lpwwn; wwn_t rpwwn; struct bfa_itnim_ioprofile_s ioprofile; } ; 188 struct bfa_bsg_fcport_stats_s { enum bfa_status status; u16 bfad_num; u16 rsvd; union bfa_fcport_stats_u stats; } ; 195 struct bfa_bsg_ioc_name_s { enum bfa_status status; u16 bfad_num; u16 rsvd; char name[64U]; } ; 202 struct bfa_bsg_ioc_info_s { enum bfa_status status; u16 bfad_num; u16 rsvd; char serialnum[64U]; char hwpath[32U]; char adapter_hwpath[32U]; char guid[128U]; char name[64U]; char port_name[64U]; char eth_name[64U]; wwn_t pwwn; wwn_t nwwn; wwn_t factorypwwn; wwn_t factorynwwn; struct mac_s mac; struct mac_s factory_mac; struct mac_s current_mac; enum bfa_ioc_type_e ioc_type; u16 pvid; u16 rsvd1; u32 host; u32 bandwidth; u32 rsvd2; } ; 228 struct bfa_bsg_ioc_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_ioc_attr_s ioc_attr; } ; 235 struct bfa_bsg_ioc_stats_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_ioc_stats_s ioc_stats; } ; 242 struct bfa_bsg_ioc_fwstats_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 buf_size; u32 rsvd1; u64 buf_ptr; } ; 251 struct bfa_bsg_iocfc_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_iocfc_attr_s iocfc_attr; } ; 258 struct bfa_bsg_iocfc_intr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_iocfc_intr_attr_s attr; } ; 265 struct bfa_bsg_port_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_port_attr_s attr; } ; 272 struct bfa_bsg_port_cfg_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 param; u32 rsvd1; } ; 280 struct bfa_bsg_port_cfg_maxfrsize_s { enum bfa_status status; u16 bfad_num; u16 maxfrsize; } ; 286 struct bfa_bsg_port_stats_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 buf_size; u32 rsvd1; u64 buf_ptr; } ; 295 struct bfa_bsg_lport_attr_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; struct bfa_lport_attr_s port_attr; } ; 303 struct bfa_bsg_lport_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; struct bfa_lport_stats_s port_stats; } ; 311 struct bfa_bsg_lport_iostats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; struct bfa_itnim_iostats_s iostats; } ; 319 struct bfa_bsg_lport_get_rports_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; u64 rbuf_ptr; u32 nrports; u32 rsvd; } ; 329 struct bfa_bsg_rport_attr_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; wwn_t rpwwn; u32 pid; u32 rsvd; struct bfa_rport_attr_s attr; } ; 340 struct bfa_bsg_rport_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; wwn_t rpwwn; struct bfa_rport_stats_s stats; } ; 349 struct bfa_bsg_rport_scsi_addr_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; wwn_t rpwwn; u32 host; u32 bus; u32 target; u32 lun; } ; 361 struct bfa_bsg_rport_reset_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; wwn_t rpwwn; } ; 369 struct bfa_bsg_rport_set_speed_s { enum bfa_status status; u16 bfad_num; u16 vf_id; enum bfa_port_speed speed; u32 rsvd; wwn_t pwwn; wwn_t rpwwn; } ; 379 struct bfa_bsg_vport_attr_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t vpwwn; struct bfa_vport_attr_s vport_attr; } ; 387 struct bfa_bsg_vport_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t vpwwn; struct bfa_vport_stats_s vport_stats; } ; 395 struct bfa_bsg_reset_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t vpwwn; } ; 402 struct bfa_bsg_fabric_get_lports_s { enum bfa_status status; u16 bfad_num; u16 vf_id; u64 buf_ptr; u32 nports; u32 rsvd; } ; 411 struct bfa_bsg_trl_speed_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_port_speed speed; } ; 418 struct bfa_bsg_fcpim_s { enum bfa_status status; u16 bfad_num; u16 param; } ; 424 struct bfa_bsg_fcpim_modstats_s { enum bfa_status status; u16 bfad_num; struct bfa_itnim_iostats_s modstats; } ; 430 struct bfa_bsg_fcpim_del_itn_stats_s { enum bfa_status status; u16 bfad_num; struct bfa_fcpim_del_itn_stats_s modstats; } ; 436 struct bfa_bsg_fcpim_modstatsclr_s { enum bfa_status status; u16 bfad_num; } ; 441 struct bfa_bsg_itnim_attr_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t lpwwn; wwn_t rpwwn; struct bfa_itnim_attr_s attr; } ; 450 struct bfa_bsg_itnim_iostats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t lpwwn; wwn_t rpwwn; struct bfa_itnim_iostats_s iostats; } ; 459 struct bfa_bsg_itnim_itnstats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t lpwwn; wwn_t rpwwn; struct bfa_itnim_stats_s itnstats; } ; 468 struct bfa_bsg_pcifn_cfg_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_ablk_cfg_s pcifn_cfg; } ; 475 struct bfa_bsg_pcifn_s { enum bfa_status status; u16 bfad_num; u16 pcifn_id; u16 bw_min; u16 bw_max; u8 port; enum bfi_pcifn_class pcifn_class; u8 rsvd[1U]; } ; 486 struct bfa_bsg_adapter_cfg_mode_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_adapter_cfg_mode_s cfg; } ; 493 struct bfa_bsg_port_cfg_mode_s { enum bfa_status status; u16 bfad_num; u16 instance; struct bfa_port_cfg_mode_s cfg; } ; 500 struct bfa_bsg_bbcr_enable_s { enum bfa_status status; u16 bfad_num; u8 bb_scn; u8 rsvd; } ; 507 struct bfa_bsg_bbcr_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_bbcr_attr_s attr; } ; 514 struct bfa_bsg_faa_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_faa_attr_s faa_attr; } ; 521 struct bfa_bsg_cee_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 buf_size; u32 rsvd1; u64 buf_ptr; } ; 530 struct bfa_bsg_cee_stats_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 buf_size; u32 rsvd1; u64 buf_ptr; } ; 539 struct bfa_bsg_sfp_media_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_defs_sfp_media_e media; } ; 546 struct bfa_bsg_sfp_speed_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_port_speed speed; } ; 553 struct bfa_bsg_flash_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_flash_attr_s attr; } ; 560 struct bfa_bsg_flash_s { enum bfa_status status; u16 bfad_num; u8 instance; u8 rsvd; enum bfa_flash_part_type type; int bufsz; u64 buf_ptr; } ; 570 struct bfa_bsg_diag_get_temp_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_diag_results_tempsensor_s result; } ; 577 struct bfa_bsg_diag_memtest_s { enum bfa_status status; u16 bfad_num; u16 rsvd[3U]; u32 pat; struct bfa_diag_memtest_result result; struct bfa_diag_memtest_s memtest; } ; 586 struct bfa_bsg_diag_loopback_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_port_opmode opmode; enum bfa_port_speed speed; u32 lpcnt; u32 pat; struct bfa_diag_loopback_result_s result; } ; 597 struct bfa_bsg_diag_dport_show_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_diag_dport_result_s result; } ; 604 struct bfa_bsg_dport_enable_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u16 lpcnt; u16 pat; } ; 612 struct bfa_bsg_diag_fwping_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 cnt; u32 pattern; struct bfa_diag_results_fwping result; } ; 621 struct bfa_bsg_diag_qtest_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 force; u32 queue; struct bfa_diag_qtest_result_s result; } ; 630 struct bfa_bsg_sfp_show_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct sfp_mem_s sfp; } ; 637 struct bfa_bsg_diag_led_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_diag_ledtest_s ledtest; } ; 644 struct bfa_bsg_diag_beacon_s { enum bfa_status status; u16 bfad_num; u16 rsvd; enum bfa_boolean beacon; enum bfa_boolean link_e2e_beacon; u32 second; } ; 653 struct bfa_bsg_diag_lb_stat_s { enum bfa_status status; u16 bfad_num; u16 rsvd; } ; 659 struct bfa_bsg_phy_attr_s { enum bfa_status status; u16 bfad_num; u16 instance; struct bfa_phy_attr_s attr; } ; 666 struct bfa_bsg_phy_s { enum bfa_status status; u16 bfad_num; u16 instance; u64 bufsz; u64 buf_ptr; } ; 674 struct bfa_bsg_debug_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 bufsz; int inst_no; u64 buf_ptr; u64 offset; } ; 684 struct bfa_bsg_phy_stats_s { enum bfa_status status; u16 bfad_num; u16 instance; struct bfa_phy_stats_s stats; } ; 691 struct bfa_bsg_vhba_attr_s { enum bfa_status status; u16 bfad_num; u16 pcifn_id; struct bfa_vhba_attr_s attr; } ; 698 struct bfa_bsg_boot_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_boot_cfg_s cfg; } ; 705 struct bfa_bsg_preboot_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_boot_pbc_s cfg; } ; 712 struct bfa_bsg_ethboot_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_ethboot_cfg_s cfg; } ; 719 struct bfa_bsg_trunk_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_trunk_attr_s attr; } ; 726 struct bfa_bsg_qos_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_qos_attr_s attr; } ; 733 struct bfa_bsg_qos_vc_attr_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_qos_vc_attr_s attr; } ; 740 struct bfa_bsg_qos_bw_s { enum bfa_status status; u16 bfad_num; u16 rsvd; struct bfa_qos_bw_s qos_bw; } ; 747 struct bfa_bsg_vf_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; struct bfa_vf_stats_s stats; } ; 754 struct bfa_bsg_vf_reset_stats_s { enum bfa_status status; u16 bfad_num; u16 vf_id; } ; 760 struct bfa_bsg_fcpim_lunmask_query_s { enum bfa_status status; u16 bfad_num; struct bfa_lunmask_cfg_s lun_mask; } ; 766 struct bfa_bsg_fcpim_lunmask_s { enum bfa_status status; u16 bfad_num; u16 vf_id; wwn_t pwwn; wwn_t rpwwn; struct scsi_lun lun; } ; 775 struct bfa_bsg_fcpim_throttle_s { enum bfa_status status; u16 bfad_num; u16 vf_id; struct bfa_defs_fcpim_throttle_s throttle; } ; 782 struct bfa_bsg_tfru_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 offset; u32 len; u8 data[64U]; } ; 794 struct bfa_bsg_fruvpd_s { enum bfa_status status; u16 bfad_num; u16 rsvd1; u32 offset; u32 len; u8 data[4096U]; u8 trfr_cmpl; u8 rsvd2[3U]; } ; 805 struct bfa_bsg_fruvpd_max_size_s { enum bfa_status status; u16 bfad_num; u16 rsvd; u32 max_size; } ; 812 struct bfa_bsg_fcpt_s { enum bfa_status status; u16 vf_id; wwn_t lpwwn; wwn_t dpwwn; u32 tsecs; int cts; enum fc_cos cos; struct fchs_s fchs; } ; 823 struct bfa_bsg_data { int payload_len; u64 payload; } ; 220 struct bfa_sm_table_s { void (*sm)(void *, int); int state; char *name; } ; 445 enum bfa_port_aen_event { BFA_PORT_AEN_ONLINE = 1, BFA_PORT_AEN_OFFLINE = 2, BFA_PORT_AEN_RLIR = 3, BFA_PORT_AEN_SFP_INSERT = 4, BFA_PORT_AEN_SFP_REMOVE = 5, BFA_PORT_AEN_SFP_POM = 6, BFA_PORT_AEN_ENABLE = 7, BFA_PORT_AEN_DISABLE = 8, BFA_PORT_AEN_AUTH_ON = 9, BFA_PORT_AEN_AUTH_OFF = 10, BFA_PORT_AEN_DISCONNECT = 11, BFA_PORT_AEN_QOS_NEG = 12, BFA_PORT_AEN_FABRIC_NAME_CHANGE = 13, BFA_PORT_AEN_SFP_ACCESS_ERROR = 14, BFA_PORT_AEN_SFP_UNSUPPORT = 15 } ; 520 enum bfa_audit_aen_event { BFA_AUDIT_AEN_AUTH_ENABLE = 1, BFA_AUDIT_AEN_AUTH_DISABLE = 2, BFA_AUDIT_AEN_FLASH_ERASE = 3, BFA_AUDIT_AEN_FLASH_UPDATE = 4 } ; 534 enum bfa_ioc_aen_event { BFA_IOC_AEN_HBGOOD = 1, BFA_IOC_AEN_HBFAIL = 2, BFA_IOC_AEN_ENABLE = 3, BFA_IOC_AEN_DISABLE = 4, BFA_IOC_AEN_FWMISMATCH = 5, BFA_IOC_AEN_FWCFG_ERROR = 6, BFA_IOC_AEN_INVALID_VENDOR = 7, BFA_IOC_AEN_INVALID_NWWN = 8, BFA_IOC_AEN_INVALID_PWWN = 9 } ; 984 struct __anonstruct_r_250 { unsigned char ib_cu_p; unsigned char ib_cu_a; unsigned char ib_lx; unsigned char ib_sx; unsigned char e10g_sr; unsigned char e10g_lr; unsigned char e10g_lrm; unsigned char e10g_unall; } ; 984 union sfp_xcvr_e10g_code_u { u8 b; struct __anonstruct_r_250 r; } ; 1012 struct __anonstruct_r_251 { unsigned char escon; unsigned char oc192_reach; unsigned char so_reach; unsigned char oc48_reach; } ; 1012 union sfp_xcvr_so1_code_u { u8 b; struct __anonstruct_r_251 r; } ; 1022 struct __anonstruct_r_252 { unsigned char reserved; unsigned char oc12_reach; unsigned char reserved1; unsigned char oc3_reach; } ; 1022 union sfp_xcvr_so2_code_u { u8 b; struct __anonstruct_r_252 r; } ; 1032 struct __anonstruct_r_253 { unsigned char base_px; unsigned char base_bx10; unsigned char e100base_fx; unsigned char e100base_lx; unsigned char e1000base_t; unsigned char e1000base_cx; unsigned char e1000base_lx; unsigned char e1000base_sx; } ; 1032 union sfp_xcvr_eth_code_u { u8 b; struct __anonstruct_r_253 r; } ; 1046 struct sfp_xcvr_fc1_code_s { unsigned char link_len; unsigned char xmtr_tech2; unsigned char xmtr_tech1; unsigned char reserved1; } ; 1053 struct __anonstruct_r_254 { unsigned char tw_media; unsigned char tp_media; unsigned char mi_media; unsigned char tv_media; unsigned char m6_media; unsigned char m5_media; unsigned char reserved; unsigned char sm_media; } ; 1053 union sfp_xcvr_fc2_code_u { u8 b; struct __anonstruct_r_254 r; } ; 1067 struct __anonstruct_r_255 { unsigned char mb100; unsigned char rsv1; unsigned char mb200; unsigned char rsv2; unsigned char mb400; unsigned char mb1600; unsigned char mb800; unsigned char rsv4; } ; 1067 union sfp_xcvr_fc3_code_u { u8 b; struct __anonstruct_r_255 r; } ; 1092 struct sfp_xcvr_s { union sfp_xcvr_e10g_code_u e10g; union sfp_xcvr_so1_code_u so1; union sfp_xcvr_so2_code_u so2; union sfp_xcvr_eth_code_u eth; struct sfp_xcvr_fc1_code_s fc1; union sfp_xcvr_fc2_code_u fc2; union sfp_xcvr_fc3_code_u fc3; } ; 185 enum bfi_mclass { BFI_MC_IOC = 1, BFI_MC_DIAG = 2, BFI_MC_FLASH = 3, BFI_MC_CEE = 4, BFI_MC_FCPORT = 5, BFI_MC_IOCFC = 6, BFI_MC_ABLK = 7, BFI_MC_UF = 8, BFI_MC_FCXP = 9, BFI_MC_LPS = 10, BFI_MC_RPORT = 11, BFI_MC_ITN = 12, BFI_MC_IOIM_READ = 13, BFI_MC_IOIM_WRITE = 14, BFI_MC_IOIM_IO = 15, BFI_MC_IOIM = 16, BFI_MC_IOIM_IOCOM = 17, BFI_MC_TSKIM = 18, BFI_MC_PORT = 21, BFI_MC_SFP = 22, BFI_MC_PHY = 25, BFI_MC_FRU = 34, BFI_MC_MAX = 35 } ; 240 struct bfi_ioc_getattr_req_s { struct bfi_mhdr_s mh; union bfi_addr_u attr_addr; } ; 308 struct bfi_ioc_fwver_s { uint8_t major; uint8_t minor; uint8_t maint; uint8_t patch; uint8_t phase; uint8_t build; uint8_t rsvd[2U]; } ; 349 struct bfi_ioc_image_hdr_s { u32 signature; u8 asic_gen; u8 asic_mode; u8 port0_mode; u8 port1_mode; u32 exec; u32 bootenv; u32 rsvd_b[2U]; struct bfi_ioc_fwver_s fwver; u32 md5sum[4U]; } ; 363 enum bfi_ioc_img_ver_cmp_e { BFI_IOC_IMG_VER_INCOMP = 0, BFI_IOC_IMG_VER_OLD = 1, BFI_IOC_IMG_VER_SAME = 2, BFI_IOC_IMG_VER_BETTER = 3 } ; 425 struct bfi_ioc_ctrl_req_s { struct bfi_mhdr_s mh; u16 clscode; u16 rsvd; u32 tv_sec; } ; 459 struct bfi_ioc_ctrl_reply_s { struct bfi_mhdr_s mh; u8 status; u8 port_mode; u8 cap_bm; u8 rsvd; } ; 486 union bfi_ioc_i2h_msg_u { struct bfi_mhdr_s mh; struct bfi_ioc_ctrl_reply_s fw_event; u32 mboxmsg[8U]; } ; 708 struct bfi_ablk_h2i_query_s { struct bfi_mhdr_s mh; union bfi_addr_u addr; } ; 719 struct bfi_ablk_h2i_cfg_req_s { struct bfi_mhdr_s mh; u8 mode; u8 port; u8 max_pf; u8 max_vf; } ; 728 struct bfi_ablk_h2i_pf_req_s { struct bfi_mhdr_s mh; u8 pcifn; u8 port; u16 pers; u16 bw_min; u16 bw_max; } ; 740 struct bfi_ablk_h2i_optrom_s { struct bfi_mhdr_s mh; } ; 745 struct bfi_ablk_i2h_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 pcifn; u8 port_mode; } ; 829 struct bfi_sfp_scn_s { struct bfi_mhdr_s mhr; u8 event; u8 sfpid; u8 pomlvl; u8 is_elb; } ; 858 struct bfi_sfp_req_s { struct bfi_mhdr_s mh; u8 memtype; u8 rsvd[3U]; struct bfi_alen_s alen; } ; 871 struct bfi_sfp_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 state; u8 rsvd[2U]; } ; 895 struct bfi_flash_query_req_s { struct bfi_mhdr_s mh; struct bfi_alen_s alen; } ; 906 struct bfi_flash_erase_req_s { struct bfi_mhdr_s mh; u32 type; u8 instance; u8 rsv[3U]; } ; 916 struct bfi_flash_write_req_s { struct bfi_mhdr_s mh; struct bfi_alen_s alen; u32 type; u8 instance; u8 last; u8 rsv[2U]; u32 offset; u32 length; } ; 930 struct bfi_flash_read_req_s { struct bfi_mhdr_s mh; u32 type; u8 instance; u8 rsv[3U]; u32 offset; u32 length; struct bfi_alen_s alen; } ; 943 struct bfi_flash_query_rsp_s { struct bfi_mhdr_s mh; u32 status; } ; 951 struct bfi_flash_read_rsp_s { struct bfi_mhdr_s mh; u32 type; u8 instance; u8 rsv[3U]; u32 status; u32 length; } ; 963 struct bfi_flash_write_rsp_s { struct bfi_mhdr_s mh; u32 type; u8 instance; u8 rsv[3U]; u32 status; u32 length; } ; 975 struct bfi_flash_erase_rsp_s { struct bfi_mhdr_s mh; u32 type; u8 instance; u8 rsv[3U]; u32 status; } ; 986 struct bfi_flash_event_s { struct bfi_mhdr_s mh; enum bfa_status status; u32 param; } ; 1040 struct bfi_diag_fwping_req_s { struct bfi_mhdr_s mh; struct bfi_alen_s alen; u32 data; u32 count; u8 qtag; u8 rsv[3U]; } ; 1049 struct bfi_diag_fwping_rsp_s { struct bfi_mhdr_s mh; u32 data; u8 qtag; u8 dma_status; u8 rsv[2U]; } ; 1057 struct bfi_diag_ts_req_s { struct bfi_mhdr_s mh; u16 temp; u16 brd_temp; u8 status; u8 ts_junc; u8 ts_brd; u8 rsv; } ; 1070 struct bfi_diag_ledtest_req_s { struct bfi_mhdr_s mh; u8 cmd; u8 color; u8 portid; u8 led; u16 freq; u8 rsv[2U]; } ; 1081 struct bfi_diag_ledtest_rsp_s { struct bfi_mhdr_s mh; } ; 1086 struct bfi_diag_portbeacon_req_s { struct bfi_mhdr_s mh; u32 period; u8 beacon; u8 rsvd[3U]; } ; 1193 struct bfi_phy_query_req_s { struct bfi_mhdr_s mh; u8 instance; u8 rsv[3U]; struct bfi_alen_s alen; } ; 1206 struct bfi_phy_stats_req_s { struct bfi_mhdr_s mh; u8 instance; u8 rsv[3U]; struct bfi_alen_s alen; } ; 1216 struct bfi_phy_write_req_s { struct bfi_mhdr_s mh; u8 instance; u8 last; u8 rsv[2U]; u32 offset; u32 length; struct bfi_alen_s alen; } ; 1229 struct bfi_phy_read_req_s { struct bfi_mhdr_s mh; u8 instance; u8 rsv[3U]; u32 offset; u32 length; struct bfi_alen_s alen; } ; 1241 struct bfi_phy_query_rsp_s { struct bfi_mhdr_s mh; u32 status; } ; 1249 struct bfi_phy_stats_rsp_s { struct bfi_mhdr_s mh; u32 status; } ; 1257 struct bfi_phy_read_rsp_s { struct bfi_mhdr_s mh; u32 status; u32 length; } ; 1266 struct bfi_phy_write_rsp_s { struct bfi_mhdr_s mh; u32 status; u32 length; } ; 1275 enum bfi_fru_h2i_msgs { BFI_FRUVPD_H2I_WRITE_REQ = 1, BFI_FRUVPD_H2I_READ_REQ = 2, BFI_TFRU_H2I_WRITE_REQ = 3, BFI_TFRU_H2I_READ_REQ = 4 } ; 1289 struct bfi_fru_write_req_s { struct bfi_mhdr_s mh; u8 last; u8 rsv_1[3U]; u8 trfr_cmpl; u8 rsv_2[3U]; u32 offset; u32 length; struct bfi_alen_s alen; } ; 1303 struct bfi_fru_read_req_s { struct bfi_mhdr_s mh; u32 offset; u32 length; struct bfi_alen_s alen; } ; 1313 struct bfi_fru_rsp_s { struct bfi_mhdr_s mh; u32 status; u32 length; } ; 239 typedef void (*bfa_ioc_mbox_mcfunc_t)(void *, struct bfi_mbmsg_s *); 58 struct bfa_module_s { void (*meminfo)(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *, struct bfa_s *); void (*attach)(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *, struct bfa_pcidev_s *); void (*detach)(struct bfa_s *); void (*start)(struct bfa_s *); void (*stop)(struct bfa_s *); void (*iocdisable)(struct bfa_s *); } ; 118 enum ioc_event { IOC_E_RESET = 1, IOC_E_ENABLE = 2, IOC_E_DISABLE = 3, IOC_E_DETACH = 4, IOC_E_ENABLED = 5, IOC_E_FWRSP_GETATTR = 6, IOC_E_DISABLED = 7, IOC_E_PFFAILED = 8, IOC_E_HBFAIL = 9, IOC_E_HWERROR = 10, IOC_E_TIMEOUT = 11, IOC_E_HWFAILED = 12 } ; 187 enum iocpf_event { IOCPF_E_ENABLE = 1, IOCPF_E_DISABLE = 2, IOCPF_E_STOP = 3, IOCPF_E_FWREADY = 4, IOCPF_E_FWRSP_ENABLE = 5, IOCPF_E_FWRSP_DISABLE = 6, IOCPF_E_FAIL = 7, IOCPF_E_INITFAIL = 8, IOCPF_E_GETATTRFAIL = 9, IOCPF_E_SEMLOCKED = 10, IOCPF_E_TIMEOUT = 11, IOCPF_E_SEM_ERROR = 12 } ; 202 enum bfa_iocpf_state { BFA_IOCPF_RESET = 1, BFA_IOCPF_SEMWAIT = 2, BFA_IOCPF_HWINIT = 3, BFA_IOCPF_READY = 4, BFA_IOCPF_INITFAIL = 5, BFA_IOCPF_FAIL = 6, BFA_IOCPF_DISABLING = 7, BFA_IOCPF_DISABLED = 8, BFA_IOCPF_FWMISMATCH = 9 } ; 4364 union __anonunion_m_269 { struct bfi_flash_query_rsp_s *query; struct bfi_flash_erase_rsp_s *erase; struct bfi_flash_write_rsp_s *write; struct bfi_flash_read_rsp_s *read; struct bfi_flash_event_s *event; struct bfi_mbmsg_s *msg; } ; 5724 union __anonunion_m_271 { struct bfi_phy_query_rsp_s *query; struct bfi_phy_stats_rsp_s *stats; struct bfi_phy_write_rsp_s *write; struct bfi_phy_read_rsp_s *read; struct bfi_mbmsg_s *msg; } ; 5828 enum bfa_dconf_event { BFA_DCONF_SM_INIT = 1, BFA_DCONF_SM_FLASH_COMP = 2, BFA_DCONF_SM_WR = 3, BFA_DCONF_SM_TIMEOUT = 4, BFA_DCONF_SM_EXIT = 5, BFA_DCONF_SM_IOCDISABLE = 6 } ; 6679 struct __anonstruct_r_272 { unsigned char cmd; unsigned char addr_cnt; unsigned short read_cnt; unsigned short write_cnt; unsigned char rsv; unsigned char act; } ; 6679 union bfa_flash_cmd_reg_u { struct __anonstruct_r_272 r; u32 i; } ; 6718 struct __anonstruct_r_273 { unsigned char good; unsigned char bad; unsigned char present; unsigned char init_status; unsigned char busy; unsigned char fifo_cnt; unsigned int rsv; } ; 6718 union bfa_flash_dev_status_reg_u { struct __anonstruct_r_273 r; u32 i; } ; 6744 struct __anonstruct_r_274 { unsigned char dummy; unsigned int addr; } ; 6744 union bfa_flash_addr_reg_u { struct __anonstruct_r_274 r; u32 i; } ; 128 struct __anonstruct_iocreg_fnreg_268 { u32 hfn_mbox; u32 lpu_mbox; u32 hfn_pgn; } ; 136 struct __anonstruct_iocreg_mbcmd_269 { u32 hfn; u32 lpu; } ; 152 struct __anonstruct_ct_fnreg_268 { u32 hfn_mbox; u32 lpu_mbox; u32 hfn_pgn; } ; 162 struct __anonstruct_ct_p0reg_269 { u32 hfn; u32 lpu; } ; 172 struct __anonstruct_ct_p1reg_270 { u32 hfn; u32 lpu; } ; 180 struct __anonstruct_ct2_reg_271 { uint32_t hfn_mbox; uint32_t lpu_mbox; uint32_t hfn_pgn; uint32_t hfn; uint32_t lpu; uint32_t lpu_read; } ; 333 union __anonunion_w_246___0 { u64 wwn; u8 byte[8U]; } ; 165 struct fc_els_cmd_s { unsigned char els_code; unsigned int reserved; } ; 259 struct fc_plogi_csp_s { u8 verhi; u8 verlo; __be16 bbcred; unsigned char reserved2; unsigned char resolution; unsigned char altbbcred; unsigned char port_type; unsigned char npiv_supp; unsigned char rro; unsigned char ciro; unsigned char payload; unsigned char cisc; unsigned char dh_dup_supp; unsigned char r_t_tov; unsigned char sync_cap; unsigned char security; unsigned char query_dbc; unsigned char hg_supp; __be16 rxsz; __be16 conseq; __be16 ro_bitmap; __be32 e_d_tov; } ; 324 struct fc_plogi_clp_s { unsigned char reserved2; unsigned char sequential; unsigned char reserved1; unsigned char intermix; unsigned char class_valid; unsigned int reserved3; unsigned short reserved4; unsigned short rxsz; unsigned char reserved5; unsigned char conseq; unsigned short e2e_credit; unsigned char reserved7; unsigned char ospx; unsigned short reserved8; } ; 360 struct fc_logi_s { struct fc_els_cmd_s els_cmd; struct fc_plogi_csp_s csp; wwn_t port_name; wwn_t node_name; struct fc_plogi_clp_s class1; struct fc_plogi_clp_s class2; struct fc_plogi_clp_s class3; struct fc_plogi_clp_s class4; u8 vvl[16U]; } ; 1022 struct fc_vft_s { unsigned char r_ctl; unsigned char ver; unsigned char type; unsigned char res_a; unsigned char priority; unsigned short vf_id; unsigned char res_b; unsigned char hopct; unsigned int res_c; } ; 710 enum bfa_fcs_fabric_event { BFA_FCS_FABRIC_SM_CREATE = 1, BFA_FCS_FABRIC_SM_DELETE = 2, BFA_FCS_FABRIC_SM_LINK_DOWN = 3, BFA_FCS_FABRIC_SM_LINK_UP = 4, BFA_FCS_FABRIC_SM_CONT_OP = 5, BFA_FCS_FABRIC_SM_RETRY_OP = 6, BFA_FCS_FABRIC_SM_NO_FABRIC = 7, BFA_FCS_FABRIC_SM_PERF_EVFP = 8, BFA_FCS_FABRIC_SM_ISOLATE = 9, BFA_FCS_FABRIC_SM_NO_TAGGING = 10, BFA_FCS_FABRIC_SM_DELAYED = 11, BFA_FCS_FABRIC_SM_AUTH_FAILED = 12, BFA_FCS_FABRIC_SM_AUTH_SUCCESS = 13, BFA_FCS_FABRIC_SM_DELCOMP = 14, BFA_FCS_FABRIC_SM_LOOPBACK = 15, BFA_FCS_FABRIC_SM_START = 16, BFA_FCS_FABRIC_SM_STOP = 17, BFA_FCS_FABRIC_SM_STOPCOMP = 18, BFA_FCS_FABRIC_SM_LOGOCOMP = 19 } ; 28 struct bfa_fcs_mod_s { void (*attach)(struct bfa_fcs_s *); void (*modinit)(struct bfa_fcs_s *); void (*modexit)(struct bfa_fcs_s *); } ; 333 union __anonunion_w_246___1 { u64 wwn; u8 byte[8U]; } ; 637 struct fc_scr_s { unsigned char command; unsigned int res; unsigned char vu_reg_func; unsigned short res1; unsigned char reg_func; } ; 658 struct fc_ls_rjt_s { struct fc_els_cmd_s els_cmd; unsigned char res1; unsigned char reason_code; unsigned char reason_code_expl; unsigned char vendor_unique; } ; 724 struct fc_ba_acc_s { unsigned char seq_id_valid; unsigned char seq_id; unsigned short res2; unsigned short ox_id; unsigned short rx_id; unsigned short low_seq_cnt; unsigned short high_seq_cnt; } ; 801 enum fc_rscn_format { FC_RSCN_FORMAT_PORTID = 0, FC_RSCN_FORMAT_AREA = 1, FC_RSCN_FORMAT_DOMAIN = 2, FC_RSCN_FORMAT_FABRIC = 3 } ; 808 struct fc_rscn_event_s { unsigned char format; unsigned char qualifier; unsigned char resvd; unsigned int portid; } ; 820 struct fc_rscn_pl_s { u8 command; u8 pagelen; __be16 payldlen; struct fc_rscn_event_s event[1U]; } ; 827 struct fc_echo_s { struct fc_els_cmd_s els_cmd; } ; 834 struct fc_rnid_cmd_s { struct fc_els_cmd_s els_cmd; unsigned char node_id_data_format; unsigned int reserved; } ; 864 struct fc_rnid_common_id_data_s { wwn_t port_name; wwn_t node_name; } ; 873 struct fc_rnid_general_topology_data_s { u32 vendor_unique[4U]; __be32 asso_type; u32 phy_port_num; __be32 num_attached_nodes; unsigned char node_mgmt; unsigned char ip_version; unsigned short udp_tcp_port_num; u32 ip_address[4U]; unsigned short reserved; unsigned short vendor_specific; } ; 886 struct fc_rnid_acc_s { struct fc_els_cmd_s els_cmd; unsigned char node_id_data_format; unsigned char common_id_data_length; unsigned char reserved; unsigned char specific_id_data_length; struct fc_rnid_common_id_data_s common_id_data; struct fc_rnid_general_topology_data_s gen_topology_data; } ; 1147 struct ct_hdr_s { unsigned char rev_id; unsigned int in_id; unsigned char gs_type; unsigned char gs_sub_type; unsigned char options; unsigned char rsvrd; unsigned short cmd_rsp_code; unsigned short max_res_size; unsigned char frag_id; unsigned char reason_code; unsigned char exp_code; unsigned char vendor_unq; } ; 1345 struct fcgs_gidft_resp_s { unsigned char last; unsigned char reserved; unsigned int pid; } ; 1461 struct fcgs_gmal_resp_s { __be32 ms_len; u8 ms_ma[256U]; } ; 1470 struct fcgs_gmal_entry_s { u8 len; u8 prefix[7U]; u8 ip_addr[248U]; } ; 1516 struct fdmi_attr_s { __be16 type; __be16 len; u8 value[1U]; } ; 1575 struct fdmi_hba_attr_s { __be32 attr_count; struct fdmi_attr_s hba_attr; } ; 1583 struct fdmi_port_list_s { __be32 num_ports; wwn_t port_entry; } ; 1591 struct fdmi_port_attr_s { __be32 attr_count; struct fdmi_attr_s port_attr; } ; 1599 struct fdmi_rhba_s { wwn_t hba_id; struct fdmi_port_list_s port_list; struct fdmi_hba_attr_s hba_attr_blk; } ; 1608 struct fdmi_rprt_s { wwn_t hba_id; wwn_t port_name; struct fdmi_port_attr_s port_attr_blk; } ; 1617 struct fdmi_rpa_s { wwn_t port_name; struct fdmi_port_attr_s port_attr_blk; } ; 481 enum bfa_lport_aen_event { BFA_LPORT_AEN_NEW = 1, BFA_LPORT_AEN_DELETE = 2, BFA_LPORT_AEN_ONLINE = 3, BFA_LPORT_AEN_OFFLINE = 4, BFA_LPORT_AEN_DISCONNECT = 5, BFA_LPORT_AEN_NEW_PROP = 6, BFA_LPORT_AEN_DELETE_PROP = 7, BFA_LPORT_AEN_NEW_STANDARD = 8, BFA_LPORT_AEN_DELETE_STANDARD = 9, BFA_LPORT_AEN_NPIV_DUP_WWN = 10, BFA_LPORT_AEN_NPIV_FABRIC_MAX = 11, BFA_LPORT_AEN_NPIV_UNKNOWN = 12 } ; 123 struct bfa_lport_info_s { u8 port_type; u8 port_state; u8 offline_reason; wwn_t port_wwn; wwn_t node_wwn; u32 max_vports_supp; u32 num_vports_inuse; u32 max_rports_supp; u32 num_rports_inuse; } ; 613 struct bfa_fcs_fdmi_hba_attr_s { wwn_t node_name; u8 manufacturer[64U]; u8 serial_num[64U]; u8 model[16U]; u8 model_desc[128U]; u8 hw_version[8U]; u8 driver_version[64U]; u8 option_rom_ver[64U]; u8 fw_version[64U]; u8 os_name[256U]; __be32 max_ct_pyld; struct bfa_lport_symname_s node_sym_name; u8 vendor_info[8U]; __be32 num_ports; wwn_t fabric_name; u8 bios_ver[64U]; } ; 657 struct bfa_fcs_fdmi_port_attr_s { u8 supp_fc4_types[32U]; __be32 supp_speed; __be32 curr_speed; __be32 max_frm_size; u8 os_device_name[256U]; u8 host_name[256U]; wwn_t port_name; wwn_t node_name; struct bfa_lport_symname_s port_sym_name; __be32 port_type; enum fc_cos scos; wwn_t port_fabric_name; u8 port_act_fc4_type[32U]; __be32 port_state; __be32 num_ports; } ; 110 enum fc_parse_status { FC_PARSE_OK = 0, FC_PARSE_FAILURE = 1, FC_PARSE_BUSY = 2, FC_PARSE_LEN_INVAL = 3, FC_PARSE_ACC_INVAL = 4, FC_PARSE_PWWN_NOT_EQUAL = 5, FC_PARSE_NWWN_NOT_EQUAL = 6, FC_PARSE_RXSZ_INVAL = 7, FC_PARSE_NOT_FCP = 8, FC_PARSE_OPAFLAG_INVAL = 9, FC_PARSE_RPAFLAG_INVAL = 10, FC_PARSE_OPA_INVAL = 11, FC_PARSE_RPA_INVAL = 12 } ; 90 struct __anonstruct___port_action_268 { void (*init)(struct bfa_fcs_lport_s *); void (*online)(struct bfa_fcs_lport_s *); void (*offline)(struct bfa_fcs_lport_s *); } ; 100 enum bfa_fcs_lport_event { BFA_FCS_PORT_SM_CREATE = 1, BFA_FCS_PORT_SM_ONLINE = 2, BFA_FCS_PORT_SM_OFFLINE = 3, BFA_FCS_PORT_SM_DELETE = 4, BFA_FCS_PORT_SM_DELRPORT = 5, BFA_FCS_PORT_SM_STOP = 6 } ; 1420 enum port_fdmi_event { FDMISM_EVENT_PORT_ONLINE = 1, FDMISM_EVENT_PORT_OFFLINE = 2, FDMISM_EVENT_RSP_OK = 4, FDMISM_EVENT_RSP_ERROR = 5, FDMISM_EVENT_TIMEOUT = 6, FDMISM_EVENT_RHBA_SENT = 7, FDMISM_EVENT_RPRT_SENT = 8, FDMISM_EVENT_RPA_SENT = 9 } ; 2844 enum port_ms_event { MSSM_EVENT_PORT_ONLINE = 1, MSSM_EVENT_PORT_OFFLINE = 2, MSSM_EVENT_RSP_OK = 3, MSSM_EVENT_RSP_ERROR = 4, MSSM_EVENT_TIMEOUT = 5, MSSM_EVENT_FCXP_SENT = 6, MSSM_EVENT_PORT_FABRIC_RSCN = 7 } ; 3631 enum vport_ns_event { NSSM_EVENT_PORT_ONLINE = 1, NSSM_EVENT_PORT_OFFLINE = 2, NSSM_EVENT_PLOGI_SENT = 3, NSSM_EVENT_RSP_OK = 4, NSSM_EVENT_RSP_ERROR = 5, NSSM_EVENT_TIMEOUT = 6, NSSM_EVENT_NS_QUERY = 7, NSSM_EVENT_RSPNID_SENT = 8, NSSM_EVENT_RFTID_SENT = 9, NSSM_EVENT_RFFID_SENT = 10, NSSM_EVENT_GIDFT_SENT = 11, NSSM_EVENT_RNNID_SENT = 12, NSSM_EVENT_RSNN_NN_SENT = 13 } ; 5239 enum port_scn_event { SCNSM_EVENT_PORT_ONLINE = 1, SCNSM_EVENT_PORT_OFFLINE = 2, SCNSM_EVENT_RSP_OK = 3, SCNSM_EVENT_RSP_ERROR = 4, SCNSM_EVENT_TIMEOUT = 5, SCNSM_EVENT_SCR_SENT = 6 } ; 5989 enum bfa_fcs_vport_event { BFA_FCS_VPORT_SM_CREATE = 1, BFA_FCS_VPORT_SM_DELETE = 2, BFA_FCS_VPORT_SM_START = 3, BFA_FCS_VPORT_SM_STOP = 4, BFA_FCS_VPORT_SM_ONLINE = 5, BFA_FCS_VPORT_SM_OFFLINE = 6, BFA_FCS_VPORT_SM_FRMSENT = 7, BFA_FCS_VPORT_SM_RSP_OK = 8, BFA_FCS_VPORT_SM_RSP_ERROR = 9, BFA_FCS_VPORT_SM_TIMEOUT = 10, BFA_FCS_VPORT_SM_DELCOMP = 11, BFA_FCS_VPORT_SM_RSP_DUP_WWN = 12, BFA_FCS_VPORT_SM_RSP_FAILED = 13, BFA_FCS_VPORT_SM_STOPCOMP = 14, BFA_FCS_VPORT_SM_FABRIC_MAX = 15 } ; 333 union __anonunion_w_246___2 { u64 wwn; u8 byte[8U]; } ; 378 struct fc_logo_s { struct fc_els_cmd_s els_cmd; unsigned char res1; unsigned int nport_id; wwn_t orig_port_name; } ; 388 struct fc_adisc_s { struct fc_els_cmd_s els_cmd; unsigned char res1; unsigned int orig_HA; wwn_t orig_port_name; wwn_t orig_node_name; unsigned char res2; unsigned int nport_id; } ; 485 struct fc_prli_params_s { unsigned short reserved; unsigned char retry; unsigned char task_retry_id; unsigned char rec_support; unsigned char reserved1; unsigned char wxrdisab; unsigned char rxrdisab; unsigned char drmix; unsigned char cdmix; unsigned char target; unsigned char initiator; unsigned char doverlay; unsigned char confirm; } ; 526 struct fc_prli_params_page_s { unsigned char type; unsigned char codext; unsigned char rspcode; unsigned char reserved1; unsigned char imagepair; unsigned char rsppav; unsigned char origprocasv; unsigned char reserved2; u32 origprocas; u32 rspprocas; struct fc_prli_params_s servparams; } ; 553 struct fc_prli_s { unsigned char command; unsigned char pglen; unsigned short pagebytes; struct fc_prli_params_page_s parampage; } ; 594 struct fc_prlo_acc_params_page_s { unsigned char type; unsigned char type_ext; unsigned short res1; unsigned char rpa_valid; unsigned char opa_valid; u32 orig_process_assc; u32 resp_process_assc; u32 fc4type_csp; } ; 616 struct fc_prlo_acc_s { unsigned char command; unsigned char page_len; unsigned short payload_len; struct fc_prlo_acc_params_page_s prlo_acc_params[1U]; } ; 906 enum fc_rpsc_op_speed { RPSC_OP_SPEED_1G = 32768, RPSC_OP_SPEED_2G = 16384, RPSC_OP_SPEED_4G = 8192, RPSC_OP_SPEED_10G = 4096, RPSC_OP_SPEED_8G = 2048, RPSC_OP_SPEED_16G = 1024, RPSC_OP_SPEED_NOT_EST = 1 } ; 916 struct fc_rpsc_speed_info_s { __be16 port_speed_cap; __be16 port_op_speed; } ; 945 struct fc_rpsc_acc_s { unsigned char command; unsigned char rsvd; unsigned short num_entries; struct fc_rpsc_speed_info_s speed_info[1U]; } ; 956 struct __anonstruct_pid_list_249 { unsigned char rsvd1; unsigned int pid; } ; 956 struct fc_rpsc2_cmd_s { struct fc_els_cmd_s els_cmd; __be32 token; u16 resvd; __be16 num_pids; struct __anonstruct_pid_list_249 pid_list[1U]; } ; 980 struct fc_rpsc2_port_info_s { __be32 pid; u16 resvd1; __be16 index; u8 resvd2; u8 type; __be16 speed; } ; 992 struct fc_rpsc2_acc_s { u8 els_cmd; u8 resvd; __be16 num_pids; struct fc_rpsc2_port_info_s port_info[1U]; } ; 1307 struct fcgs_gidpn_resp_s { unsigned char rsvd; unsigned int dap; } ; 1411 enum bfa_rport_aen_event { BFA_RPORT_AEN_ONLINE = 1, BFA_RPORT_AEN_OFFLINE = 2, BFA_RPORT_AEN_DISCONNECT = 3, BFA_RPORT_AEN_QOS_PRIO = 4, BFA_RPORT_AEN_QOS_FLOWID = 5 } ; 732 enum rport_event { RPSM_EVENT_PLOGI_SEND = 1, RPSM_EVENT_PLOGI_RCVD = 2, RPSM_EVENT_PLOGI_COMP = 3, RPSM_EVENT_LOGO_RCVD = 4, RPSM_EVENT_LOGO_IMP = 5, RPSM_EVENT_FCXP_SENT = 6, RPSM_EVENT_DELETE = 7, RPSM_EVENT_FAB_SCN = 8, RPSM_EVENT_ACCEPTED = 9, RPSM_EVENT_FAILED = 10, RPSM_EVENT_TIMEOUT = 11, RPSM_EVENT_HCB_ONLINE = 12, RPSM_EVENT_HCB_OFFLINE = 13, RPSM_EVENT_FC4_OFFLINE = 14, RPSM_EVENT_ADDRESS_CHANGE = 15, RPSM_EVENT_ADDRESS_DISC = 16, RPSM_EVENT_PRLO_RCVD = 17, RPSM_EVENT_PLOGI_RETRY = 18, RPSM_EVENT_SCN_OFFLINE = 19, RPSM_EVENT_SCN_ONLINE = 20, RPSM_EVENT_FC4_FCS_ONLINE = 21 } ; 3124 enum rpf_event { RPFSM_EVENT_RPORT_OFFLINE = 1, RPFSM_EVENT_RPORT_ONLINE = 2, RPFSM_EVENT_FCXP_SENT = 3, RPFSM_EVENT_TIMEOUT = 4, RPFSM_EVENT_RPSC_COMP = 5, RPFSM_EVENT_RPSC_FAIL = 6, RPFSM_EVENT_RPSC_ERROR = 7 } ; 333 union __anonunion_w_246___3 { u64 wwn; u8 byte[8U]; } ; 505 enum bfa_itnim_aen_event { BFA_ITNIM_AEN_ONLINE = 1, BFA_ITNIM_AEN_OFFLINE = 2, BFA_ITNIM_AEN_DISCONNECT = 3 } ; 756 enum bfa_fcs_itnim_event { BFA_FCS_ITNIM_SM_FCS_ONLINE = 1, BFA_FCS_ITNIM_SM_OFFLINE = 2, BFA_FCS_ITNIM_SM_FRMSENT = 3, BFA_FCS_ITNIM_SM_RSP_OK = 4, BFA_FCS_ITNIM_SM_RSP_ERROR = 5, BFA_FCS_ITNIM_SM_TIMEOUT = 6, BFA_FCS_ITNIM_SM_HCB_OFFLINE = 7, BFA_FCS_ITNIM_SM_HCB_ONLINE = 8, BFA_FCS_ITNIM_SM_INITIATOR = 9, BFA_FCS_ITNIM_SM_DELETE = 10, BFA_FCS_ITNIM_SM_PRLO = 11, BFA_FCS_ITNIM_SM_RSP_NOT_SUPP = 12, BFA_FCS_ITNIM_SM_HAL_ONLINE = 13 } ; 563 struct fc_prlo_params_page_s { unsigned char type; unsigned char type_ext; unsigned short res1; unsigned char rpa_valid; unsigned char opa_valid; u32 orig_process_assc; u32 resp_process_assc; u32 res2; } ; 584 struct fc_prlo_s { unsigned char command; unsigned char page_len; unsigned short payload_len; struct fc_prlo_params_page_s prlo_params[1U]; } ; 704 struct fc_rrq_s { struct fc_els_cmd_s els_cmd; unsigned char res1; unsigned int s_id; unsigned short ox_id; unsigned short rx_id; u32 res2[8U]; } ; 737 struct fc_ba_rjt_s { unsigned char res1; unsigned char reason_code; unsigned char reason_expl; unsigned char vendor_unique; } ; 747 struct fc_tprlo_params_page_s { unsigned char type; unsigned char type_ext; unsigned short res1; unsigned char global_process_logout; unsigned char tpo_nport_valid; unsigned char rpa_valid; unsigned char opa_valid; u32 orig_process_assc; u32 resp_process_assc; unsigned char res2; u32 tpo_nport_id; } ; 775 struct fc_tprlo_s { unsigned char command; unsigned char page_len; unsigned short payload_len; struct fc_tprlo_params_page_s tprlo_params[1U]; } ; 786 enum fc_tprlo_type { FC_GLOBAL_LOGO = 1, FC_TPR_LOGO = 2 } ; 791 struct fc_tprlo_acc_s { unsigned char command; unsigned char page_len; unsigned short payload_len; struct fc_prlo_acc_params_page_s tprlo_acc_params[1U]; } ; 937 struct fc_rpsc_cmd_s { struct fc_els_cmd_s els_cmd; } ; 1267 struct fcgs_id_req_s { unsigned char rsvd; unsigned int dap; } ; 1300 struct fcgs_gidpn_req_s { wwn_t port_name; } ; 1312 struct fcgs_rftid_req_s { unsigned char rsvd; unsigned int dap; __be32 fc4_type[8U]; } ; 1321 struct fcgs_rffid_req_s { unsigned char rsvd; unsigned int dap; unsigned short rsvd1; unsigned char fc4ftr_bits; unsigned char fc4_type; } ; 1335 struct fcgs_gidft_req_s { u8 reserved; u8 domain_id; u8 area_id; u8 fc4_type; } ; 1354 struct fcgs_rspnid_req_s { unsigned char rsvd; unsigned int dap; u8 spn_len; u8 spn[256U]; } ; 1364 struct fcgs_rsnn_nn_req_s { wwn_t node_name; u8 snn_len; u8 snn[256U]; } ; 1373 struct fcgs_rpnid_req_s { unsigned char rsvd; unsigned int port_id; wwn_t port_name; } ; 1382 struct fcgs_rnnid_req_s { unsigned char rsvd; unsigned int port_id; wwn_t node_name; } ; 1391 struct fcgs_rcsid_req_s { unsigned char rsvd; unsigned int port_id; u32 cos; } ; 1400 struct fcgs_rptid_req_s { unsigned char rsvd; unsigned int port_id; unsigned char port_type; unsigned int rsvd1; } ; 1410 struct fcgs_ganxt_req_s { unsigned char rsvd; unsigned int port_id; } ; 1446 struct fcgs_req_s { wwn_t wwn; } ; 638 struct bfi_port_generic_req_s { struct bfi_mhdr_s mh; u32 msgtag; u32 rsvd; } ; 652 struct bfi_port_generic_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 rsvd[3U]; u32 msgtag; } ; 662 struct bfi_port_get_stats_req_s { struct bfi_mhdr_s mh; union bfi_addr_u dma_addr; } ; 678 union bfi_port_i2h_msg_u { struct bfi_mhdr_s mh; struct bfi_port_generic_rsp_s enable_rsp; struct bfi_port_generic_rsp_s disable_rsp; struct bfi_port_generic_rsp_s getstats_rsp; struct bfi_port_generic_rsp_s clearstats_rsp; } ; 773 struct bfi_cee_reset_stats_s { struct bfi_mhdr_s mh; } ; 786 struct bfi_cee_get_req_s { struct bfi_mhdr_s mh; union bfi_addr_u dma_addr; } ; 794 struct bfi_cee_get_rsp_s { struct bfi_mhdr_s mh; u8 cmd_status; u8 rsvd[3U]; } ; 803 struct bfi_cee_stats_rsp_s { struct bfi_mhdr_s mh; u8 cmd_status; u8 rsvd[3U]; } ; 812 union bfi_cee_i2h_msg_u { struct bfi_mhdr_s mh; struct bfi_cee_get_rsp_s get_rsp; struct bfi_cee_stats_rsp_s stats_rsp; } ; 34 struct scsi_cdb_s { u8 scsi_cdb[16U]; } ; 1055 struct fcp_cmnd_s { struct scsi_lun lun; u8 crn; unsigned char taskattr; unsigned char priority; unsigned char resvd; u8 tm_flags; unsigned char iodir; unsigned char addl_cdb_len; struct scsi_cdb_s cdb; __be32 fcp_dl; } ; 590 struct bfi_itn_create_req_s { struct bfi_mhdr_s mh; u16 fw_handle; u8 class; u8 seq_rec; u8 msg_no; u8 role; } ; 603 struct bfi_itn_create_rsp_s { struct bfi_mhdr_s mh; u16 bfa_handle; u8 status; u8 seq_id; } ; 610 struct bfi_itn_delete_req_s { struct bfi_mhdr_s mh; u16 fw_handle; u8 seq_id; u8 rsvd; } ; 617 struct bfi_itn_delete_rsp_s { struct bfi_mhdr_s mh; u16 bfa_handle; u8 status; u8 seq_id; } ; 624 struct bfi_itn_sler_event_s { struct bfi_mhdr_s mh; u16 bfa_handle; u16 rsvd; } ; 636 union bfi_itn_i2h_msg_u { struct bfi_itn_create_rsp_s *create_rsp; struct bfi_itn_delete_rsp_s *delete_rsp; struct bfi_itn_sler_event_s *sler_event; struct bfi_msg_s *msg; } ; 643 enum bfi_ioim_h2i { BFI_IOIM_H2I_IOABORT_REQ = 1, BFI_IOIM_H2I_IOCLEANUP_REQ = 2 } ; 653 struct bfi_ioim_dif_s { u32 dif_info[4U]; } ; 664 struct bfi_ioim_req_s { struct bfi_mhdr_s mh; __be16 io_tag; u16 rport_hdl; struct fcp_cmnd_s cmnd; struct bfi_sge_s sges[2U]; u8 io_timeout; u8 dif_en; u8 rsvd_a[2U]; struct bfi_ioim_dif_s dif; } ; 702 struct bfi_ioim_rsp_s { struct bfi_mhdr_s mh; __be16 io_tag; u16 bfa_rport_hndl; u8 io_status; u8 reuse_io_tag; u16 abort_tag; u8 scsi_status; u8 sns_len; u8 resid_flags; u8 rsvd_a; __be32 residue; u32 rsvd_b[3U]; } ; 793 struct bfi_ioim_abort_req_s { struct bfi_mhdr_s mh; __be16 io_tag; u16 abort_tag; } ; 808 struct bfi_tskim_req_s { struct bfi_mhdr_s mh; __be16 tsk_tag; u16 itn_fhdl; struct scsi_lun lun; u8 tm_flags; u8 t_secs; u8 rsvd[2U]; } ; 822 struct bfi_tskim_abortreq_s { struct bfi_mhdr_s mh; __be16 tsk_tag; u16 rsvd; } ; 837 struct bfi_tskim_rsp_s { struct bfi_mhdr_s mh; __be16 tsk_tag; u8 tsk_status; u8 rsvd; } ; 33 enum bfa_itnim_event { BFA_ITNIM_SM_CREATE = 1, BFA_ITNIM_SM_ONLINE = 2, BFA_ITNIM_SM_OFFLINE = 3, BFA_ITNIM_SM_FWRSP = 4, BFA_ITNIM_SM_DELETE = 5, BFA_ITNIM_SM_CLEANUP = 6, BFA_ITNIM_SM_SLER = 7, BFA_ITNIM_SM_HWFAIL = 8, BFA_ITNIM_SM_QRESUME = 9 } ; 45 enum bfa_ioim_event { BFA_IOIM_SM_START = 1, BFA_IOIM_SM_COMP_GOOD = 2, BFA_IOIM_SM_COMP = 3, BFA_IOIM_SM_COMP_UTAG = 4, BFA_IOIM_SM_DONE = 5, BFA_IOIM_SM_FREE = 6, BFA_IOIM_SM_ABORT = 7, BFA_IOIM_SM_ABORT_COMP = 8, BFA_IOIM_SM_ABORT_DONE = 9, BFA_IOIM_SM_QRESUME = 10, BFA_IOIM_SM_SGALLOCED = 11, BFA_IOIM_SM_SQRETRY = 12, BFA_IOIM_SM_HCB = 13, BFA_IOIM_SM_CLEANUP = 14, BFA_IOIM_SM_TMSTART = 15, BFA_IOIM_SM_TMDONE = 16, BFA_IOIM_SM_HWFAIL = 17, BFA_IOIM_SM_IOTOV = 18 } ; 66 enum bfa_tskim_event { BFA_TSKIM_SM_START = 1, BFA_TSKIM_SM_DONE = 2, BFA_TSKIM_SM_QRESUME = 3, BFA_TSKIM_SM_HWFAIL = 5, BFA_TSKIM_SM_HCB = 6, BFA_TSKIM_SM_IOS_DONE = 7, BFA_TSKIM_SM_CLEANUP = 8, BFA_TSKIM_SM_CLEANUP_DONE = 9, BFA_TSKIM_SM_UTAG = 10 } ; 380 enum iocfc_event { IOCFC_E_INIT = 1, IOCFC_E_START = 2, IOCFC_E_STOP = 3, IOCFC_E_ENABLE = 4, IOCFC_E_DISABLE = 5, IOCFC_E_IOC_ENABLED = 6, IOCFC_E_IOC_DISABLED = 7, IOCFC_E_IOC_FAILED = 8, IOCFC_E_DCONF_DONE = 9, IOCFC_E_CFG_DONE = 10 } ; 29 typedef void (*bfa_isr_func_t)(struct bfa_s *, struct bfi_msg_s *); 103 struct bfa_pciid_s { u16 device_id; u16 vendor_id; } ; 102 struct bfi_iocfc_cfg_req_s { struct bfi_mhdr_s mh; union bfi_addr_u ioc_cfg_dma_addr; } ; 110 struct bfi_iocfc_cfg_reply_s { struct bfi_mhdr_s mh; u8 cfg_success; u8 lpu_bm; u8 rsvd[2U]; } ; 121 struct bfi_iocfc_set_intr_req_s { struct bfi_mhdr_s mh; u8 coalesce; u8 rsvd[3U]; __be16 delay; __be16 latency; } ; 145 struct bfi_iocfc_updateq_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 rsvd[3U]; } ; 166 union bfi_iocfc_i2h_msg_u { struct bfi_mhdr_s mh; struct bfi_iocfc_cfg_reply_s cfg_reply; struct bfi_iocfc_updateq_rsp_s updateq_rsp; u32 mboxmsg[8U]; } ; 184 struct bfi_faa_addr_msg_s { struct bfi_mhdr_s mh; u8 rsvd[4U]; wwn_t pwwn; wwn_t nwwn; } ; 191 struct bfi_faa_query_s { struct bfi_mhdr_s mh; u8 faa_status; u8 addr_source; u8 rsvd[2U]; wwn_t faa; } ; 333 union __anonunion_w_246___4 { u64 wwn; u8 byte[8U]; } ; 1240 struct bfa_diag_loopback_s { u32 loopcnt; u32 pattern; u8 lb_mode; u8 speed; u8 rsvd[2U]; } ; 1016 struct bfi_diag_lb_req_s { struct bfi_mhdr_s mh; u32 loopcnt; u32 pattern; u8 lb_mode; u8 speed; u8 rsvd[2U]; } ; 1035 struct bfi_diag_lb_rsp_s { struct bfi_mhdr_s mh; struct bfa_diag_loopback_result_s res; } ; 1098 struct bfi_diag_qtest_req_s { struct bfi_mhdr_s mh; u32 data[31U]; } ; 1103 enum bfi_dport_req { BFI_DPORT_DISABLE = 0, BFI_DPORT_ENABLE = 1, BFI_DPORT_START = 2, BFI_DPORT_SHOW = 3, BFI_DPORT_DYN_DISABLE = 4 } ; 231 struct bfi_fcport_req_s { struct bfi_mhdr_s mh; u32 msgtag; } ; 257 struct bfi_fcport_enable_req_s { struct bfi_mhdr_s mh; u32 rsvd1; wwn_t nwwn; wwn_t pwwn; struct bfa_port_cfg_s port_cfg; union bfi_addr_u stats_dma_addr; u32 msgtag; u8 use_flash_cfg; u8 rsvd2[3U]; } ; 344 struct bfi_fcxp_send_req_s { struct bfi_mhdr_s mh; __be16 fcxp_tag; __be16 max_frmsz; __be16 vf_id; u16 rport_fw_hndl; u8 class; u8 rsp_timeout; u8 cts; u8 lp_fwtag; struct fchs_s fchs; __be32 req_len; __be32 rsp_maxlen; struct bfi_alen_s req_alen; struct bfi_alen_s rsp_alen; } ; 366 struct bfi_fcxp_send_rsp_s { struct bfi_mhdr_s mh; __be16 fcxp_tag; u8 req_status; u8 rsvd; __be32 rsp_len; __be32 residue_len; struct fchs_s fchs; } ; 396 struct bfi_uf_frm_rcvd_s { struct bfi_mhdr_s mh; u16 buf_tag; u16 rsvd; u16 frm_len; u16 xfr_len; } ; 416 struct bfi_lps_login_req_s { struct bfi_mhdr_s mh; u8 bfa_tag; u8 alpa; __be16 pdu_size; wwn_t pwwn; wwn_t nwwn; u8 fdisc; u8 auth_en; u8 lps_role; u8 bb_scn; u32 vvl_flag; } ; 451 struct bfi_lps_logout_req_s { struct bfi_mhdr_s mh; u8 fw_tag; u8 rsvd[3U]; wwn_t port_name; } ; 458 struct bfi_lps_logout_rsp_s { struct bfi_mhdr_s mh; u8 bfa_tag; u8 status; u8 rsvd[2U]; } ; 465 struct bfi_lps_cvl_event_s { struct bfi_mhdr_s mh; u8 bfa_tag; u8 rsvd[3U]; } ; 471 struct bfi_lps_n2n_pid_req_s { struct bfi_mhdr_s mh; u8 fw_tag; unsigned int lp_pid; } ; 484 union bfi_lps_i2h_msg_u { struct bfi_msg_s *msg; struct bfi_lps_login_rsp_s *login_rsp; struct bfi_lps_logout_rsp_s *logout_rsp; struct bfi_lps_cvl_event_s *cvl_event; } ; 506 struct bfi_rport_create_req_s { struct bfi_mhdr_s mh; u16 bfa_handle; __be16 max_frmsz; unsigned int pid; unsigned char lp_fwtag; unsigned int local_pid; unsigned char cisc; u8 fc_class; u8 vf_en; u16 vf_id; } ; 519 struct bfi_rport_create_rsp_s { struct bfi_mhdr_s mh; u8 status; u8 rsvd[3U]; u16 bfa_handle; u16 fw_handle; struct bfa_rport_qos_attr_s qos_attr; } ; 528 struct bfa_rport_speed_req_s { struct bfi_mhdr_s mh; u16 fw_handle; u8 speed; u8 rsvd; } ; 535 struct bfi_rport_delete_req_s { struct bfi_mhdr_s mh; u16 fw_handle; u16 rsvd; } ; 541 struct bfi_rport_delete_rsp_s { struct bfi_mhdr_s mh; u16 bfa_handle; u8 status; u8 rsvd; } ; 548 struct bfi_rport_qos_scn_s { struct bfi_mhdr_s mh; u16 bfa_handle; u16 rsvd; struct bfa_rport_qos_attr_s old_qos_attr; struct bfa_rport_qos_attr_s new_qos_attr; } ; 556 struct bfi_rport_lip_scn_s { struct bfi_mhdr_s mh; u16 bfa_handle; u8 status; u8 rsvd; struct bfa_fcport_loop_info_s loop_info; } ; 571 union bfi_rport_i2h_msg_u { struct bfi_msg_s *msg; struct bfi_rport_create_rsp_s *create_rsp; struct bfi_rport_delete_rsp_s *delete_rsp; struct bfi_rport_qos_scn_s *qos_scn_evt; struct bfi_rport_lip_scn_s *lip_scn; } ; 122 typedef u64 (*bfa_fcxp_get_sgaddr_t)(void *, int); 123 typedef u32 (*bfa_fcxp_get_sglen_t)(void *, int); 235 enum bfa_rport_event { BFA_RPORT_SM_CREATE = 1, BFA_RPORT_SM_DELETE = 2, BFA_RPORT_SM_ONLINE = 3, BFA_RPORT_SM_OFFLINE = 4, BFA_RPORT_SM_FWRSP = 5, BFA_RPORT_SM_HWFAIL = 6, BFA_RPORT_SM_QOS_SCN = 7, BFA_RPORT_SM_SET_SPEED = 8, BFA_RPORT_SM_QRESUME = 9 } ; 350 struct bfa_uf_buf_s { u8 d[2304U]; } ; 477 enum bfa_lps_event { BFA_LPS_SM_LOGIN = 1, BFA_LPS_SM_LOGOUT = 2, BFA_LPS_SM_FWRSP = 3, BFA_LPS_SM_RESUME = 4, BFA_LPS_SM_DELETE = 5, BFA_LPS_SM_OFFLINE = 6, BFA_LPS_SM_RX_CVL = 7, BFA_LPS_SM_SET_N2N_PID = 8 } ; 32 enum bfa_fcport_sm_event { BFA_FCPORT_SM_START = 1, BFA_FCPORT_SM_STOP = 2, BFA_FCPORT_SM_ENABLE = 3, BFA_FCPORT_SM_DISABLE = 4, BFA_FCPORT_SM_FWRSP = 5, BFA_FCPORT_SM_LINKUP = 6, BFA_FCPORT_SM_LINKDOWN = 7, BFA_FCPORT_SM_QRESUME = 8, BFA_FCPORT_SM_HWFAIL = 9, BFA_FCPORT_SM_DPORTENABLE = 10, BFA_FCPORT_SM_DPORTDISABLE = 11, BFA_FCPORT_SM_FAA_MISCONFIG = 12, BFA_FCPORT_SM_DDPORTENABLE = 13, BFA_FCPORT_SM_DDPORTDISABLE = 14 } ; 49 enum bfa_fcport_ln_sm_event { BFA_FCPORT_LN_SM_LINKUP = 1, BFA_FCPORT_LN_SM_LINKDOWN = 2, BFA_FCPORT_LN_SM_NOTIFICATION = 3 } ; 5298 union __anonunion_sgpg_pa_269 { u64 pa; union bfi_addr_u addr; } ; 5298 union __anonunion_sgpg_pa_tmp_270 { u64 pa; union bfi_addr_u addr; } ; 5786 enum bfa_dport_sm_event { BFA_DPORT_SM_ENABLE = 1, BFA_DPORT_SM_DISABLE = 2, BFA_DPORT_SM_FWRSP = 3, BFA_DPORT_SM_QRESUME = 4, BFA_DPORT_SM_HWFAIL = 5, BFA_DPORT_SM_START = 6, BFA_DPORT_SM_REQFAIL = 7, BFA_DPORT_SM_SCN = 8 } ; 1 long int __builtin_expect(long exp, long c); 33 extern struct module __this_module; 358 extern struct pv_irq_ops pv_irq_ops; 52 bool is_power_of_2(unsigned long n); 140 int printk(const char *, ...); 389 int sprintf(char *, const char *, ...); 3 bool ldv_is_err(const void *ptr); 25 void INIT_LIST_HEAD(struct list_head *list); 48 void __list_add(struct list_head *, struct list_head *, struct list_head *); 75 void list_add_tail(struct list_head *new, struct list_head *head); 113 void list_del(struct list_head *); 187 int list_empty(const struct list_head *head); 71 void warn_slowpath_null(const char *, const int); 30 void * __memcpy(void *, const void *, size_t ); 57 void * __memset(void *, int, size_t ); 67 int strcmp(const char *, const char *); 23 char * strncpy(char *, const char *, __kernel_size_t ); 802 unsigned long int arch_local_save_flags(); 41 bool IS_ERR(const void *ptr); 155 int arch_irqs_disabled_flags(unsigned long flags); 93 void __raw_spin_lock_init(raw_spinlock_t *, const char *, struct lock_class_key *); 34 unsigned long int _raw_spin_lock_irqsave(raw_spinlock_t *); 45 void _raw_spin_unlock_irqrestore(raw_spinlock_t *, unsigned long); 299 raw_spinlock_t * spinlock_check(spinlock_t *lock); 370 void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags); 72 void __init_waitqueue_head(wait_queue_head_t *, const char *, struct lock_class_key *); 73 void init_completion(struct completion *x); 91 void wait_for_completion(struct completion *); 106 void complete(struct completion *); 10 void ldv_error(); 60 void __builtin_trap(); 138 void mutex_lock_nested(struct mutex *, unsigned int); 174 void mutex_unlock(struct mutex *); 77 extern volatile unsigned long jiffies; 291 unsigned long int msecs_to_jiffies(const unsigned int); 12 void do_gettimeofday(struct timeval *); 94 void init_timer_key(struct timer_list *, unsigned int, const char *, struct lock_class_key *); 176 int mod_timer(struct timer_list *, unsigned long); 245 int del_timer_sync(struct timer_list *); 434 void flush_workqueue(struct workqueue_struct *); 72 void pci_iounmap(struct pci_dev *, void *); 17 void * pci_iomap(struct pci_dev *, int, unsigned long); 68 void * vmalloc(unsigned long); 82 void vfree(const void *); 86 const char * kobject_name(const struct kobject *kobj); 2346 int wake_up_process(struct task_struct *); 8 struct task_struct * kthread_create_on_node(int (*)(void *), void *, int, const char *, ...); 41 int kthread_stop(struct task_struct *); 42 bool kthread_should_stop(); 809 const char * dev_name(const struct device *dev); 840 void * dev_get_drvdata(const struct device *dev); 845 void dev_set_drvdata(struct device *dev, void *data); 1041 void dev_printk(const char *, const struct device *, const char *, ...); 143 void kfree(const void *); 289 void * __kmalloc(size_t , gfp_t ); 418 void * kmalloc(size_t size, gfp_t flags); 581 void * kzalloc(size_t size, gfp_t flags); 848 int pci_bus_read_config_byte(struct pci_bus *, unsigned int, int, u8 *); 850 int pci_bus_read_config_word(struct pci_bus *, unsigned int, int, u16 *); 856 int pci_bus_write_config_word(struct pci_bus *, unsigned int, int, u16 ); 872 int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val); 876 int pci_read_config_word(const struct pci_dev *dev, int where, u16 *val); 889 int pci_write_config_word(const struct pci_dev *dev, int where, u16 val); 940 int pci_enable_device(struct pci_dev *); 957 void pci_disable_device(struct pci_dev *); 960 void pci_set_master(struct pci_dev *); 981 int pcie_get_readrq(struct pci_dev *); 982 int pcie_set_readrq(struct pci_dev *, int); 1015 int pci_save_state(struct pci_dev *); 1016 void pci_restore_state(struct pci_dev *); 1088 int pci_request_regions(struct pci_dev *, const char *); 1090 void pci_release_regions(struct pci_dev *); 1136 int __pci_register_driver(struct pci_driver *, struct module *, const char *); 1145 void pci_unregister_driver(struct pci_driver *); 1217 void pci_disable_msix(struct pci_dev *); 1228 int pci_enable_msix_range(struct pci_dev *, struct msix_entry *, int, int); 1230 int pci_enable_msix_exact(struct pci_dev *dev, struct msix_entry *entries, int nvec); 76 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); 60 int dma_supported(struct device *, u64 ); 61 int dma_set_mask(struct device *, u64 ); 103 unsigned long int dma_alloc_coherent_mask(struct device *dev, gfp_t gfp); 115 gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp); 131 void * dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs); 160 void dma_free_attrs(struct device *dev, size_t size, void *vaddr, dma_addr_t bus, struct dma_attrs *attrs); 97 int dma_set_coherent_mask(struct device *dev, u64 mask); 113 int pci_set_dma_mask(struct pci_dev *dev, u64 mask); 118 int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 1474 void * pci_get_drvdata(struct pci_dev *pdev); 1479 void pci_set_drvdata(struct pci_dev *pdev, void *data); 1487 const char * pci_name(const struct pci_dev *pdev); 1707 int pci_pcie_cap(struct pci_dev *dev); 1718 bool pci_is_pcie(struct pci_dev *dev); 42 int request_firmware(const struct firmware **, const char *, struct device *); 51 void release_firmware(const struct firmware *); 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 *); 42 int pci_enable_pcie_error_reporting(struct pci_dev *); 43 int pci_disable_pcie_error_reporting(struct pci_dev *); 44 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *); 797 u64 wwn_to_u64(u8 *wwn); 855 struct fc_vport * fc_vport_create(struct Scsi_Host *, int, struct fc_vport_identifiers *); 98 void bfa_trc_init(struct bfa_trc_mod_s *trcm); 111 void __bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data); 328 void wwn2str(char *wwn_str, u64 wwn); 143 void bfa_plog_init(struct bfa_plog_s *plog); 144 void bfa_plog_str(struct bfa_plog_s *plog, enum bfa_plog_mid mid, enum bfa_plog_eid event, u16 misc, char *log_str); 54 void bfa_timer_beat(struct bfa_timer_mod_s *mod); 885 void bfa_ioc_suspend(struct bfa_ioc_s *ioc); 933 void bfa_ioc_debug_save_ftrc(struct bfa_ioc_s *ioc); 973 unsigned int bfi_image_cb_size = 0U; 974 unsigned int bfi_image_ct_size = 0U; 975 unsigned int bfi_image_ct2_size = 0U; 976 u32 *bfi_image_cb = 0; 977 u32 *bfi_image_ct = 0; 978 u32 *bfi_image_ct2 = 0; 307 void bfa_iocfc_init(struct bfa_s *bfa); 308 void bfa_iocfc_start(struct bfa_s *bfa); 309 void bfa_iocfc_stop(struct bfa_s *bfa); 402 void bfa_cfg_get_default(struct bfa_iocfc_cfg_s *cfg); 404 void bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_s *bfa); 407 void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_pcidev_s *pcidev); 410 void bfa_detach(struct bfa_s *bfa); 411 void bfa_cb_init(void *drv, enum bfa_status init_status); 414 enum bfa_boolean bfa_intx(struct bfa_s *bfa); 416 void bfa_isr_disable(struct bfa_s *bfa); 418 void bfa_comp_deq(struct bfa_s *bfa, struct list_head *comp_q); 419 void bfa_comp_process(struct bfa_s *bfa, struct list_head *comp_q); 420 void bfa_comp_free(struct bfa_s *bfa, struct list_head *comp_q); 128 enum bfa_boolean bfa_auto_recover; 374 enum bfa_status bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, struct bfa_fcs_s *fcs, u16 vf_id, struct bfa_lport_cfg_s *vport_cfg, struct bfad_vport_s *vport_drv); 378 enum bfa_status bfa_fcs_pbc_vport_create(struct bfa_fcs_vport_s *vport, struct bfa_fcs_s *fcs, u16 vf_id, struct bfa_lport_cfg_s *vport_cfg, struct bfad_vport_s *vport_drv); 383 enum bfa_status bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport); 384 enum bfa_status bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport); 474 void bfa_fcs_rport_set_del_timeout(u8 rport_tmo); 475 void bfa_fcs_rport_set_max_logins(u32 max_logins); 790 void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa, struct bfad_s *bfad, enum bfa_boolean min_cfg); 793 void bfa_fcs_init(struct bfa_fcs_s *fcs); 794 void bfa_fcs_pbc_vport_init(struct bfa_fcs_s *fcs); 795 void bfa_fcs_update_cfg(struct bfa_fcs_s *fcs); 796 void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs, struct bfa_fcs_driver_info_s *driver_info); 798 void bfa_fcs_exit(struct bfa_fcs_s *fcs); 799 void bfa_fcs_stop(struct bfa_fcs_s *fcs); 821 void bfa_fcs_fabric_modstart(struct bfa_fcs_s *fcs); 855 struct bfad_port_s * bfa_fcb_lport_new(struct bfad_s *bfad, struct bfa_fcs_lport_s *port, enum bfa_lport_role roles, struct bfad_vf_s *vf_drv, struct bfad_vport_s *vp_drv); 864 void bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s pbc_vport); 869 enum bfa_status bfa_fcb_rport_alloc(struct bfad_s *bfad, struct bfa_fcs_rport_s **rport, struct bfad_rport_s **rport_drv); 296 enum bfa_status bfad_vport_create(struct bfad_s *bfad, u16 vf_id, struct bfa_lport_cfg_s *port_cfg, struct device *dev); 301 enum bfa_status bfad_cfg_pport(struct bfad_s *bfad, enum bfa_lport_role role); 302 enum bfa_status bfad_drv_init(struct bfad_s *bfad); 303 enum bfa_status bfad_start_ops(struct bfad_s *bfad); 304 void bfad_drv_start(struct bfad_s *bfad); 305 void bfad_uncfg_pport(struct bfad_s *bfad); 306 void bfad_stop(struct bfad_s *bfad); 307 void bfad_fcs_stop(struct bfad_s *bfad); 308 void bfad_remove_intr(struct bfad_s *bfad); 309 void bfad_hal_mem_release(struct bfad_s *bfad); 310 void bfad_hcb_comp(void *arg, enum bfa_status status); 312 int bfad_setup_intr(struct bfad_s *bfad); 314 void bfad_update_hal_cfg(struct bfa_iocfc_cfg_s *bfa_cfg); 315 enum bfa_status bfad_hal_mem_alloc(struct bfad_s *bfad); 316 void bfad_bfa_tmo(unsigned long data); 317 void bfad_init_timer(struct bfad_s *bfad); 318 int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); 319 void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); 320 void bfad_drv_uninit(struct bfad_s *bfad); 321 int bfad_worker(void *ptr); 322 void bfad_debugfs_init(struct bfad_port_s *); 323 void bfad_debugfs_exit(struct bfad_port_s *); 325 void bfad_pci_remove(struct pci_dev *pdev); 326 int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); 327 void bfad_rport_online_wait(struct bfad_s *bfad); 328 int bfad_get_linkup_delay(struct bfad_s *bfad); 329 int bfad_install_msix_handler(struct bfad_s *bfad); 332 struct pci_device_id bfad_id_table[7U]; 333 struct list_head bfad_list; 334 char *os_name = 0; 335 char *os_patch = 0; 336 char *host_name = 0; 337 int num_rports = 0; 338 int num_ios = 0; 339 int num_tms = 0; 340 int num_fcxps = 0; 341 int num_ufbufs = 0; 342 int reqq_size = 0; 343 int rspq_size = 0; 344 int num_sgpgs = 0; 345 int rport_del_timeout; 346 int bfa_lun_queue_depth; 347 int bfa_io_max_sge; 348 int bfa_log_level; 349 int ioc_auto_recover; 350 int bfa_linkup_delay; 351 int msix_disable_cb; 352 int msix_disable_ct; 353 int fdmi_enable; 354 int supported_fc4s = 0; 355 int pcie_max_read_reqsz = 0; 356 int max_xfer_size; 357 int bfa_debugfs_enable; 358 struct mutex bfad_mutex; 29 enum bfa_status bfad_im_module_init(); 30 void bfad_im_module_exit(); 31 enum bfa_status bfad_im_probe(struct bfad_s *bfad); 32 void bfad_im_probe_undo(struct bfad_s *bfad); 33 enum bfa_status bfad_im_port_new(struct bfad_s *bfad, struct bfad_port_s *port); 34 void bfad_im_port_delete(struct bfad_s *bfad, struct bfad_port_s *port); 35 void bfad_im_port_clean(struct bfad_im_port_s *im_port); 36 int bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port, struct device *dev); 38 void bfad_im_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port); 148 void bfad_fc_host_init(struct bfad_im_port_s *im_port); 166 irqreturn_t bfad_intx(int irq, void *dev_id); 39 int __trc_fileno = 3073; 40 struct mutex bfad_mutex = { { 1 }, { { { { { 0U } }, 3735899821U, 4294967295U, (void *)-1, { 0, { 0, 0 }, "bfad_mutex.wait_lock", 0, 0UL } } } }, { &(bfad_mutex.wait_list), &(bfad_mutex.wait_list) }, 0, (void *)(&bfad_mutex), { 0, { 0, 0 }, "bfad_mutex", 0, 0UL } }; 41 struct list_head bfad_list = { &bfad_list, &bfad_list }; 43 int bfad_inst = 0; 44 int num_sgpgs_parm = 0; 50 int rport_del_timeout = 90; 51 int bfa_lun_queue_depth = 32; 52 int bfa_io_max_sge = 128; 53 int bfa_log_level = 3; 54 int ioc_auto_recover = 1; 55 int bfa_linkup_delay = -1; 56 int fdmi_enable = 1; 58 int bfa_debugfs_enable = 1; 59 int msix_disable_cb = 0; 59 int msix_disable_ct = 0; 60 int max_xfer_size = 32767; 61 int max_rport_logins = 1024; 71 u32 * bfad_load_fwimg(struct pci_dev *pdev); 72 void bfad_free_fwimg(); 73 void bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image, u32 *bfi_image_size, char *fw_name); 76 const char *msix_name_ct[9U] = { "ctrl", "cpe0", "cpe1", "cpe2", "cpe3", "rme0", "rme1", "rme2", "rme3" }; 81 const char *msix_name_cb[13U] = { "cpe0", "cpe1", "cpe2", "cpe3", "rme0", "rme1", "rme2", "rme3", "eemc", "elpu0", "elpu1", "epss", "mlpu" }; 157 void bfad_sm_uninit(struct bfad_s *bfad, enum bfad_sm_event event); 159 void bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event); 161 void bfad_sm_initializing(struct bfad_s *bfad, enum bfad_sm_event event); 163 void bfad_sm_operational(struct bfad_s *bfad, enum bfad_sm_event event); 165 void bfad_sm_stopping(struct bfad_s *bfad, enum bfad_sm_event event); 167 void bfad_sm_failed(struct bfad_s *bfad, enum bfad_sm_event event); 169 void bfad_sm_fcs_exit(struct bfad_s *bfad, enum bfad_sm_event event); 1137 irqreturn_t bfad_msix(int irq, void *dev_id); 1165 void bfad_init_msix_entry(struct bfad_s *bfad, struct msix_entry *msix_entries, int mask, int max_bit); 1454 pci_ers_result_t bfad_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state); 1511 int restart_bfa(struct bfad_s *bfad); 1549 pci_ers_result_t bfad_pci_slot_reset(struct pci_dev *pdev); 1601 pci_ers_result_t bfad_pci_mmio_enabled(struct pci_dev *pdev); 1626 void bfad_pci_resume(struct pci_dev *pdev); 1641 struct pci_device_id bfad_id_table[7U] = { { 5719U, 19U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 5719U, 23U, 4294967295U, 4294967295U, 0U, 0U, 0UL }, { 5719U, 20U, 4294967295U, 4294967295U, 787456U, 4294967295U, 0UL }, { 5719U, 33U, 4294967295U, 4294967295U, 787456U, 4294967295U, 0UL }, { 5719U, 34U, 4294967295U, 4294967295U, 787456U, 4294967295U, 0UL }, { 5719U, 35U, 4294967295U, 4294967295U, 787456U, 4294967295U, 0UL }, { 0U, 0U, 0U, 0U, 0U, 0U, 0UL } }; 1690 const struct pci_device_id __mod_pci__bfad_id_table_device_table[7U] = { }; 1695 struct pci_error_handlers bfad_err_handler = { (pci_ers_result_t (*)(struct pci_dev *, enum pci_channel_state ))(&bfad_pci_error_detected), &bfad_pci_mmio_enabled, 0, &bfad_pci_slot_reset, 0, &bfad_pci_resume }; 1702 struct pci_driver bfad_pci_driver = { { 0, 0 }, "bfa", (const struct pci_device_id *)(&bfad_id_table), &bfad_pci_probe, &bfad_pci_remove, 0, 0, 0, 0, 0, 0, (const struct pci_error_handlers *)(&bfad_err_handler), { 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 } } }; 1714 int bfad_init(); 1755 void bfad_exit(); 1845 void ldv_check_final_state(); 1848 void ldv_check_return_value(int); 1851 void ldv_check_return_value_probe(int); 1854 void ldv_initialize(); 1857 void ldv_handler_precall(); 1860 int nondet_int(); 1863 int LDV_IN_INTERRUPT = 0; 1866 void ldv_main0_sequence_infinite_withcheck_stateful(); 72 void set_bit(long nr, volatile unsigned long *addr); 308 int constant_test_bit(long nr, const volatile unsigned long *addr); 14 __u64 __arch_swab64(__u64 val); 68 __u64 __fswab64(__u64 val); 166 void __might_sleep(const char *, int, int); 392 int snprintf(char *, size_t , const char *, ...); 87 void __bad_percpu_size(); 10 extern struct task_struct *current_task; 12 struct task_struct * get_current(); 26 size_t strlcpy(char *, const char *, size_t ); 13 void __xchg_wrong_size(); 279 void lockdep_init_map(struct lockdep_map *, const char *, struct lock_class_key *, int); 149 void __wake_up(wait_queue_head_t *, unsigned int, int, void *); 913 long int prepare_to_wait_event(wait_queue_head_t *, wait_queue_t *, int); 914 void finish_wait(wait_queue_head_t *, wait_queue_t *); 84 int ldv_idr_alloc_9(struct idr *ldv_func_arg1, void *ldv_func_arg2, int ldv_func_arg3, int ldv_func_arg4, gfp_t ldv_func_arg5); 94 void ldv_idr_remove_10(struct idr *ldv_func_arg1, int ldv_func_arg2); 98 void ldv_idr_remove_11(struct idr *ldv_func_arg1, int ldv_func_arg2); 13 void ldv_idr_alloc_bfad_im_port_index(); 15 void ldv_idr_remove_bfad_im_port_index(); 180 void __init_work(struct work_struct *, int); 360 struct workqueue_struct * __alloc_workqueue_key(const char *, unsigned int, int, struct lock_class_key *, const char *, ...); 420 void destroy_workqueue(struct workqueue_struct *); 427 bool queue_work_on(int, struct workqueue_struct *, struct work_struct *); 467 bool queue_work(struct workqueue_struct *wq, struct work_struct *work); 415 long int schedule_timeout(long); 419 void schedule(); 789 struct Scsi_Host * scsi_host_alloc(struct scsi_host_template *, int); 790 int scsi_add_host_with_dma(struct Scsi_Host *, struct device *, struct device *); 795 void scsi_remove_host(struct Scsi_Host *); 797 void scsi_host_put(struct Scsi_Host *); 800 void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); 310 struct scsi_target * scsi_target(struct scsi_device *sdev); 346 struct scsi_device * __scsi_iterate_devices(struct Scsi_Host *, struct scsi_device *); 379 int scsi_change_queue_depth(struct scsi_device *, int); 380 int scsi_track_queue_full(struct scsi_device *, int); 416 void int_to_scsilun(u64 , struct scsi_lun *); 417 u64 scsilun_to_int(struct scsi_lun *); 168 int scsi_dma_map(struct scsi_cmnd *); 169 void scsi_dma_unmap(struct scsi_cmnd *); 181 unsigned int scsi_bufflen(struct scsi_cmnd *cmd); 186 void scsi_set_resid(struct scsi_cmnd *cmd, int resid); 771 int fc_remote_port_chkready(struct fc_rport *rport); 837 struct scsi_transport_template * fc_attach_transport(struct fc_function_template *); 839 void fc_release_transport(struct scsi_transport_template *); 840 void fc_remove_host(struct Scsi_Host *); 841 struct fc_rport * fc_remote_port_add(struct Scsi_Host *, int, struct fc_rport_identifiers *); 843 void fc_remote_port_delete(struct fc_rport *); 844 void fc_remote_port_rolechg(struct fc_rport *, u32 ); 845 int scsi_is_fc_rport(const struct device *); 846 u32 fc_get_event_number(); 849 void fc_host_post_vendor_event(struct Scsi_Host *, u32 , u32 , char *, u64 ); 857 int fc_vport_terminate(struct fc_vport *); 328 void wwn2str___0(char *wwn_str, u64 wwn); 342 void fcid2str(char *fcid_str, u32 fcid); 914 void bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr); 345 void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns); 669 u32 bfa_lps_get_max_vport(struct bfa_s *bfa); 306 u16 bfa_fcpim_path_tov_get(struct bfa_s *bfa); 365 struct bfa_ioim_s * bfa_ioim_alloc(struct bfa_s *bfa, struct bfad_ioim_s *dio, struct bfa_itnim_s *itnim, u16 nsges); 371 void bfa_ioim_start(struct bfa_ioim_s *ioim); 372 enum bfa_status bfa_ioim_abort(struct bfa_ioim_s *ioim); 387 void bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio, enum bfi_ioim_status io_status, u8 scsi_status, int sns_len, u8 *sns_info, s32 residue); 395 void bfa_cb_ioim_good_comp(void *drv, struct bfad_ioim_s *dio); 400 void bfa_cb_ioim_abort(void *drv, struct bfad_ioim_s *dio); 405 struct bfa_tskim_s * bfa_tskim_alloc(struct bfa_s *bfa, struct bfad_tskim_s *dtsk); 408 void bfa_tskim_start(struct bfa_tskim_s *tskim, struct bfa_itnim_s *itnim, struct scsi_lun lun, enum fcp_tm_cmnd tm_cmnd, u8 tsecs); 411 void bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk, enum bfi_tskim_status tsk_status); 530 struct bfad_port_s * bfa_fcs_itnim_get_drvport(struct bfa_fcs_itnim_s *itnim); 544 wwn_t bfa_fcs_itnim_get_nwwn(struct bfa_fcs_itnim_s *itnim); 551 wwn_t bfa_fcs_itnim_get_pwwn(struct bfa_fcs_itnim_s *itnim); 558 u32 bfa_fcs_itnim_get_fcid(struct bfa_fcs_itnim_s *itnim); 565 u32 bfa_fcs_itnim_get_maxfrsize(struct bfa_fcs_itnim_s *itnim); 572 enum fc_cos bfa_fcs_itnim_get_cos(struct bfa_fcs_itnim_s *itnim); 586 struct bfa_itnim_s * bfa_fcs_itnim_get_halitn(struct bfa_fcs_itnim_s *itnim); 876 void bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim, struct bfad_itnim_s **itnim_drv); 878 void bfa_fcb_itnim_free(struct bfad_s *bfad, struct bfad_itnim_s *itnim_drv); 880 void bfa_fcb_itnim_online(struct bfad_itnim_s *itnim_drv); 881 void bfa_fcb_itnim_offline(struct bfad_itnim_s *itnim_drv); 331 struct idr bfad_im_port_index; 40 u32 bfad_im_supported_speeds(struct bfa_s *bfa); 144 struct Scsi_Host * bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad); 146 enum bfa_status bfad_thread_workq(struct bfad_s *bfad); 147 void bfad_destroy_workq(struct bfad_im_s *im); 149 void bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port); 151 void bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev); 153 void bfad_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev); 154 struct bfad_itnim_s * bfad_get_itnim(struct bfad_im_port_s *im_port, int id); 156 struct scsi_host_template bfad_im_scsi_host_template; 157 struct scsi_host_template bfad_im_vport_template; 158 struct fc_function_template bfad_im_fc_function_template; 159 struct fc_function_template bfad_im_vport_fc_function_template; 160 struct scsi_transport_template *bfad_im_scsi_transport_template = 0; 161 struct scsi_transport_template *bfad_im_scsi_vport_transport_template = 0; 163 struct device_attribute *bfad_im_host_attrs[13U]; 164 struct device_attribute *bfad_im_vport_attrs[13U]; 29 int __trc_fileno___0 = 3074; 31 struct idr bfad_im_port_index = { 0, 0, 0, 0, { { { { { 0U } }, 3735899821U, 4294967295U, (void *)-1, { 0, { 0, 0 }, "bfad_im_port_index.lock", 0, 0UL } } } }, 0, 0 }; 34 void bfad_im_itnim_work_handler(struct work_struct *work); 35 int bfad_im_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmd); 36 int bfad_im_slave_alloc(struct scsi_device *sdev); 37 void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim); 180 const char * bfad_im_info(struct Scsi_Host *shost); 201 int bfad_im_abort_handler(struct scsi_cmnd *cmnd); 252 enum bfa_status bfad_im_target_reset_send(struct bfad_s *bfad, struct scsi_cmnd *cmnd, struct bfad_itnim_s *itnim); 289 int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd); 353 int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd); 403 void bfad_im_slave_destroy(struct scsi_device *sdev); 597 void bfad_im_port_delete_handler(struct work_struct *work); 660 void bfad_aen_im_notify_handler(struct work_struct *work); 778 int bfad_im_slave_configure(struct scsi_device *sdev); 784 struct scsi_host_template bfad_im_scsi_host_template = { &__this_module, "bfa", 0, 0, &bfad_im_info, 0, 0, &bfad_im_queuecommand, &bfad_im_abort_handler, &bfad_im_reset_lun_handler, 0, &bfad_im_reset_bus_handler, 0, &bfad_im_slave_alloc, &bfad_im_slave_configure, &bfad_im_slave_destroy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 128U, (unsigned short)0, 65535U, 0UL, 3, 0U, 0, 1U, 0U, 0U, 0U, 1U, 0U, 0U, 0U, 0U, 0U, (struct device_attribute **)(&bfad_im_host_attrs), 0, { 0, 0 }, 5719ULL, 0U, 0, (_Bool)0 }; 807 struct scsi_host_template bfad_im_vport_template = { &__this_module, "bfa", 0, 0, &bfad_im_info, 0, 0, &bfad_im_queuecommand, &bfad_im_abort_handler, &bfad_im_reset_lun_handler, 0, &bfad_im_reset_bus_handler, 0, &bfad_im_slave_alloc, &bfad_im_slave_configure, &bfad_im_slave_destroy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 128U, (unsigned short)0, 65535U, 0UL, 3, 0U, 0, 1U, 0U, 0U, 0U, 1U, 0U, 0U, 0U, 0U, 0U, (struct device_attribute **)(&bfad_im_vport_attrs), 0, { 0, 0 }, 0ULL, 0U, 0, (_Bool)0 }; 916 int bfad_im_check_if_make_lun_visible(struct scsi_device *sdev, struct fc_rport *rport); 1192 int bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done)(struct scsi_cmnd *)); 1360 void ldv_main1_sequence_infinite_withcheck_stateful(); 64 size_t strlen(const char *); 65 char * strcpy(char *, const char *); 71 char * strstr(const char *, const char *); 759 int scsi_is_host_device(const struct device *); 761 struct Scsi_Host * dev_to_shost(struct device *dev); 805 void u64_to_wwn(u64 inm, u8 *wwn); 829 void fc_vport_set_state(struct fc_vport *vport, enum fc_vport_state new_state); 904 enum bfa_ioc_type_e bfa_ioc_get_type(struct bfa_ioc_s *ioc); 905 void bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num); 906 void bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver); 907 void bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc_s *ioc, char *optrom_ver); 908 void bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model); 911 void bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev); 545 u16 bfa_fcport_get_maxfrsize(struct bfa_s *bfa); 547 void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr); 58 enum bfa_status bfa_port_get_stats(struct bfa_port_s *port, union bfa_port_stats_u *stats, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 61 enum bfa_status bfa_port_clear_stats(struct bfa_port_s *port, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 63 enum bfa_status bfa_port_enable(struct bfa_port_s *port, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 65 enum bfa_status bfa_port_disable(struct bfa_port_s *port, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 291 void bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port, struct bfa_rport_qualifier_s *rports, int *nrports); 299 void bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, char *symname); 302 void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port, struct bfa_lport_attr_s *port_attr); 385 enum bfa_status bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport); 388 struct bfa_fcs_vport_s * bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs, u16 vf_id, wwn_t vpwwn); 168 int bfad_im_bsg_request(struct fc_bsg_job *job); 169 int bfad_im_bsg_timeout(struct fc_bsg_job *job); 30 void bfad_im_get_starget_port_id(struct scsi_target *starget); 56 void bfad_im_get_starget_node_name(struct scsi_target *starget); 82 void bfad_im_get_starget_port_name(struct scsi_target *starget); 108 void bfad_im_get_host_port_id(struct Scsi_Host *shost); 122 void bfad_im_get_host_port_type(struct Scsi_Host *shost); 154 void bfad_im_get_host_port_state(struct Scsi_Host *shost); 191 void bfad_im_get_host_active_fc4s(struct Scsi_Host *shost); 210 void bfad_im_get_host_speed(struct Scsi_Host *shost); 247 void bfad_im_get_host_fabric_name(struct Scsi_Host *shost); 264 struct fc_host_statistics * bfad_im_get_stats(struct Scsi_Host *shost); 315 void bfad_im_reset_stats(struct Scsi_Host *shost); 345 void bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout); 358 int bfad_im_vport_create(struct fc_vport *fc_vport, bool disable); 447 int bfad_im_issue_fc_host_lip(struct Scsi_Host *shost); 484 int bfad_im_vport_delete(struct fc_vport *fc_vport); 542 int bfad_im_vport_disable(struct fc_vport *fc_vport, bool disable); 575 void bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport); 602 struct fc_function_template bfad_im_fc_function_template = { 0, &bfad_im_set_rport_loss_tmo, &bfad_im_get_starget_node_name, &bfad_im_get_starget_port_name, &bfad_im_get_starget_port_id, &bfad_im_get_host_port_id, &bfad_im_get_host_port_type, &bfad_im_get_host_port_state, &bfad_im_get_host_active_fc4s, &bfad_im_get_host_speed, &bfad_im_get_host_fabric_name, 0, 0, &bfad_im_get_stats, &bfad_im_reset_stats, &bfad_im_issue_fc_host_lip, 0, 0, &bfad_im_vport_set_symbolic_name, &bfad_im_vport_create, &bfad_im_vport_disable, &bfad_im_vport_delete, 0, 0, &bfad_im_bsg_request, &bfad_im_bsg_timeout, 8U, 0U, 0U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 0U, 1U, 1U, 1U, 1U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 0U, 0U }; 659 struct fc_function_template bfad_im_vport_fc_function_template = { 0, &bfad_im_set_rport_loss_tmo, &bfad_im_get_starget_node_name, &bfad_im_get_starget_port_name, &bfad_im_get_starget_port_id, &bfad_im_get_host_port_id, &bfad_im_get_host_port_type, &bfad_im_get_host_port_state, &bfad_im_get_host_active_fc4s, &bfad_im_get_host_speed, &bfad_im_get_host_fabric_name, 0, 0, &bfad_im_get_stats, &bfad_im_reset_stats, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8U, 0U, 0U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 0U, 1U, 1U, 1U, 1U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 0U, 0U }; 713 ssize_t bfad_im_serial_num_show(struct device *dev, struct device_attribute *attr, char *buf); 727 ssize_t bfad_im_model_show(struct device *dev, struct device_attribute *attr, char *buf); 741 ssize_t bfad_im_model_desc_show(struct device *dev, struct device_attribute *attr, char *buf); 821 ssize_t bfad_im_node_name_show(struct device *dev, struct device_attribute *attr, char *buf); 835 ssize_t bfad_im_symbolic_name_show(struct device *dev, struct device_attribute *attr, char *buf); 852 ssize_t bfad_im_hw_version_show(struct device *dev, struct device_attribute *attr, char *buf); 866 ssize_t bfad_im_drv_version_show(struct device *dev, struct device_attribute *attr, char *buf); 873 ssize_t bfad_im_optionrom_version_show(struct device *dev, struct device_attribute *attr, char *buf); 887 ssize_t bfad_im_fw_version_show(struct device *dev, struct device_attribute *attr, char *buf); 901 ssize_t bfad_im_num_of_ports_show(struct device *dev, struct device_attribute *attr, char *buf); 914 ssize_t bfad_im_drv_name_show(struct device *dev, struct device_attribute *attr, char *buf); 921 ssize_t bfad_im_num_of_discovered_ports_show(struct device *dev, struct device_attribute *attr, char *buf); 947 struct device_attribute dev_attr_serial_number = { { "serial_number", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_serial_num_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 948 struct device_attribute dev_attr_model = { { "model", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_model_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 950 struct device_attribute dev_attr_model_description = { { "model_description", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_model_desc_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 951 struct device_attribute dev_attr_node_name = { { "node_name", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_node_name_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 953 struct device_attribute dev_attr_symbolic_name = { { "symbolic_name", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_symbolic_name_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 955 struct device_attribute dev_attr_hardware_version = { { "hardware_version", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_hw_version_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 957 struct device_attribute dev_attr_driver_version = { { "driver_version", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_drv_version_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 959 struct device_attribute dev_attr_option_rom_version = { { "option_rom_version", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_optionrom_version_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 961 struct device_attribute dev_attr_firmware_version = { { "firmware_version", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_fw_version_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 963 struct device_attribute dev_attr_number_of_ports = { { "number_of_ports", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_num_of_ports_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 964 struct device_attribute dev_attr_driver_name = { { "driver_name", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_drv_name_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 966 struct device_attribute dev_attr_number_of_discovered_ports = { { "number_of_discovered_ports", 292U, (_Bool)0, 0, { { { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } } }, &bfad_im_num_of_discovered_ports_show, (ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t ))0 }; 968 struct device_attribute *bfad_im_host_attrs[13U] = { &dev_attr_serial_number, &dev_attr_model, &dev_attr_model_description, &dev_attr_node_name, &dev_attr_symbolic_name, &dev_attr_hardware_version, &dev_attr_driver_version, &dev_attr_option_rom_version, &dev_attr_firmware_version, &dev_attr_number_of_ports, &dev_attr_driver_name, &dev_attr_number_of_discovered_ports, (struct device_attribute *)0 }; 984 struct device_attribute *bfad_im_vport_attrs[13U] = { &dev_attr_serial_number, &dev_attr_model, &dev_attr_model_description, &dev_attr_node_name, &dev_attr_symbolic_name, &dev_attr_hardware_version, &dev_attr_driver_version, &dev_attr_option_rom_version, &dev_attr_firmware_version, &dev_attr_number_of_ports, &dev_attr_driver_name, &dev_attr_number_of_discovered_ports, (struct device_attribute *)0 }; 1039 void ldv_main2_sequence_infinite_withcheck_stateful(); 404 int sscanf(const char *, const char *, ...); 6 long int ldv_ptr_err(const void *ptr); 12 void * memdup_user(const void *, size_t ); 32 long int PTR_ERR(const void *ptr); 56 unsigned int readl(const volatile void *addr); 64 void writel(unsigned int val, volatile void *addr); 2589 loff_t fixed_size_llseek(struct file *, loff_t , int, loff_t ); 2729 ssize_t simple_read_from_buffer(void *, size_t , loff_t *, const void *, size_t ); 918 enum bfa_status bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen); 920 enum bfa_status bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata, int *trclen); 51 int bfad_debugfs_open_drvtrc(struct inode *inode, struct file *file); 70 int bfad_debugfs_open_fwtrc(struct inode *inode, struct file *file); 114 int bfad_debugfs_open_fwsave(struct inode *inode, struct file *file); 158 int bfad_debugfs_open_reg(struct inode *inode, struct file *file); 175 loff_t bfad_debugfs_lseek(struct file *file, loff_t offset, int orig); 183 ssize_t bfad_debugfs_read(struct file *file, char *buf, size_t nbytes, loff_t *pos); 203 enum bfa_status bfad_reg_offset_check(struct bfa_s *bfa, u32 offset, u32 len); 226 ssize_t bfad_debugfs_read_regrd(struct file *file, char *buf, size_t nbytes, loff_t *pos); 250 ssize_t bfad_debugfs_write_regrd(struct file *file, const char *buf, size_t nbytes, loff_t *ppos); 318 ssize_t bfad_debugfs_write_regwr(struct file *file, const char *buf, size_t nbytes, loff_t *ppos); 365 int bfad_debugfs_release(struct inode *inode, struct file *file); 378 int bfad_debugfs_release_fwtrc(struct inode *inode, struct file *file); 572 void ldv_main3_sequence_infinite_withcheck_stateful(); 1 unsigned long int __builtin_object_size(void *, int); 7 __u32 __arch_swab32(__u32 val); 46 __u16 __fswab16(__u16 val); 57 __u32 __fswab32(__u32 val); 235 void might_fault(); 645 unsigned long int _copy_from_user(void *, const void *, unsigned int); 647 unsigned long int _copy_to_user(void *, const void *, unsigned int); 667 void __copy_from_user_overflow(); 672 void __copy_to_user_overflow(); 688 unsigned long int copy_from_user(void *to, const void *from, unsigned long n); 723 unsigned long int copy_to_user(void *to, const void *from, unsigned long n); 242 size_t sg_copy_from_buffer(struct scatterlist *, unsigned int, void *, size_t ); 244 size_t sg_copy_to_buffer(struct scatterlist *, unsigned int, void *, size_t ); 179 void * dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); 1009 void blk_queue_max_segments(struct request_queue *, unsigned short); 330 void scsi_device_put(struct scsi_device *); 331 struct scsi_device * scsi_device_lookup(struct Scsi_Host *, uint , uint , u64 ); 105 void bfa_trc_stop(struct bfa_trc_mod_s *trcm); 458 enum bfa_status bfa_sfp_show(struct bfa_sfp_s *sfp, struct sfp_mem_s *sfpmem, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 461 enum bfa_status bfa_sfp_media(struct bfa_sfp_s *sfp, enum bfa_defs_sfp_media_e *media, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 465 enum bfa_status bfa_sfp_speed(struct bfa_sfp_s *sfp, enum bfa_port_speed portspeed, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 500 enum bfa_status bfa_flash_get_attr(struct bfa_flash_s *flash, struct bfa_flash_attr_s *attr, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 503 enum bfa_status bfa_flash_erase_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, u8 instance, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 506 enum bfa_status bfa_flash_update_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, u8 instance, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 510 enum bfa_status bfa_flash_read_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, u8 instance, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 643 enum bfa_status bfa_diag_tsensor_query(struct bfa_diag_s *diag, struct bfa_diag_results_tempsensor_s *result, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 646 enum bfa_status bfa_diag_fwping(struct bfa_diag_s *diag, u32 cnt, u32 data, struct bfa_diag_results_fwping *result, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 652 enum bfa_status bfa_diag_memtest(struct bfa_diag_s *diag, struct bfa_diag_memtest_s *memtest, u32 pattern, struct bfa_diag_memtest_result *result, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 656 enum bfa_status bfa_diag_ledtest(struct bfa_diag_s *diag, struct bfa_diag_ledtest_s *ledtest); 658 enum bfa_status bfa_diag_beacon_port(struct bfa_diag_s *diag, enum bfa_boolean beacon, enum bfa_boolean link_e2e_beacon, unsigned int sec); 692 enum bfa_status bfa_phy_get_attr(struct bfa_phy_s *phy, u8 instance, struct bfa_phy_attr_s *attr, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 695 enum bfa_status bfa_phy_get_stats(struct bfa_phy_s *phy, u8 instance, struct bfa_phy_stats_s *stats, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 698 enum bfa_status bfa_phy_update(struct bfa_phy_s *phy, u8 instance, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 701 enum bfa_status bfa_phy_read(struct bfa_phy_s *phy, u8 instance, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 742 enum bfa_status bfa_fruvpd_update(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg, u8 trfr_cmpl); 745 enum bfa_status bfa_fruvpd_read(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 748 enum bfa_status bfa_fruvpd_get_max_size(struct bfa_fru_s *fru, u32 *max_size); 749 enum bfa_status bfa_tfru_write(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 752 enum bfa_status bfa_tfru_read(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 899 enum bfa_boolean bfa_ioc_is_disabled(struct bfa_ioc_s *ioc); 922 enum bfa_status bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf, u32 *offset, int *buflen); 924 enum bfa_status bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc); 931 enum bfa_status bfa_ioc_fw_stats_get(struct bfa_ioc_s *ioc, void *stats); 932 enum bfa_status bfa_ioc_fw_stats_clear(struct bfa_ioc_s *ioc); 941 enum bfa_status bfa_ablk_query(struct bfa_ablk_s *ablk, struct bfa_ablk_cfg_s *ablk_cfg, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 944 enum bfa_status bfa_ablk_adapter_config(struct bfa_ablk_s *ablk, enum bfa_mode_s mode, int max_pf, int max_vf, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 947 enum bfa_status bfa_ablk_port_config(struct bfa_ablk_s *ablk, int port, enum bfa_mode_s mode, int max_pf, int max_vf, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 950 enum bfa_status bfa_ablk_pf_create(struct bfa_ablk_s *ablk, u16 *pcifn, u8 port, enum bfi_pcifn_class personality, u16 bw_min, u16 bw_max, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 953 enum bfa_status bfa_ablk_pf_delete(struct bfa_ablk_s *ablk, int pcifn, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 955 enum bfa_status bfa_ablk_pf_update(struct bfa_ablk_s *ablk, int pcifn, u16 bw_min, u16 bw_max, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 957 enum bfa_status bfa_ablk_optrom_en(struct bfa_ablk_s *ablk, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 959 enum bfa_status bfa_ablk_optrom_dis(struct bfa_ablk_s *ablk, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 967 struct mac_s bfa_ioc_get_mac(struct bfa_ioc_s *ioc); 968 struct mac_s bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc); 423 void bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr); 426 enum bfa_status bfa_iocfc_israttr_set(struct bfa_s *bfa, struct bfa_iocfc_intr_attr_s *attr); 429 void bfa_iocfc_enable(struct bfa_s *bfa); 430 void bfa_iocfc_disable(struct bfa_s *bfa); 531 enum bfa_status bfa_fcport_enable(struct bfa_s *bfa); 532 enum bfa_status bfa_fcport_disable(struct bfa_s *bfa); 533 enum bfa_status bfa_fcport_cfg_speed(struct bfa_s *bfa, enum bfa_port_speed speed); 536 enum bfa_status bfa_fcport_cfg_topology(struct bfa_s *bfa, enum bfa_port_topology topology); 540 enum bfa_status bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa); 543 enum bfa_status bfa_fcport_clr_hardalpa(struct bfa_s *bfa); 544 enum bfa_status bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxfrsize); 552 enum bfa_boolean bfa_fcport_is_disabled(struct bfa_s *bfa); 553 enum bfa_boolean bfa_fcport_is_dport(struct bfa_s *bfa); 555 enum bfa_status bfa_fcport_set_qos_bw(struct bfa_s *bfa, struct bfa_qos_bw_s *qos_bw); 564 enum bfa_status bfa_fcport_get_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb); 566 enum bfa_status bfa_fcport_clear_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb); 574 enum bfa_status bfa_fcport_cfg_bbcr(struct bfa_s *bfa, enum bfa_boolean on_off, u8 bb_scn); 576 enum bfa_status bfa_fcport_get_bbcr_attr(struct bfa_s *bfa, struct bfa_bbcr_attr_s *bbcr_attr); 585 void bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed); 609 struct bfa_fcxp_s * bfa_fcxp_req_rsp_alloc(void *caller, struct bfa_s *bfa, int nreq_sgles, int nrsp_sgles, u64 (*req_sga_cbfn)(void *, int), u32 (*req_sglen_cbfn)(void *, int), u64 (*rsp_sga_cbfn)(void *, int), u32 (*rsp_sglen_cbfn)(void *, int), enum bfa_boolean req); 634 void bfa_fcxp_send(struct bfa_fcxp_s *fcxp, struct bfa_rport_s *rport, u16 vf_id, u8 lp_tag, enum bfa_boolean cts, enum fc_cos cos, u32 reqlen, struct fchs_s *fchs, void (*cbfn)(void *, struct bfa_fcxp_s *, void *, enum bfa_status , u32 , u32 , struct fchs_s *), void *cbarg, u32 rsp_maxlen, u8 rsp_timeout); 680 u32 bfa_lps_get_base_pid(struct bfa_s *bfa); 681 u8 bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid); 689 enum bfa_status bfa_faa_query(struct bfa_s *bfa, struct bfa_faa_attr_s *attr, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 745 enum bfa_status bfa_fcdiag_loopback(struct bfa_s *bfa, enum bfa_port_opmode opmode, enum bfa_port_speed speed, u32 lpcnt, u32 pat, struct bfa_diag_loopback_result_s *result, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 750 enum bfa_status bfa_fcdiag_queuetest(struct bfa_s *bfa, u32 force, u32 queue, struct bfa_diag_qtest_result_s *result, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 753 enum bfa_status bfa_fcdiag_lb_is_running(struct bfa_s *bfa); 754 enum bfa_status bfa_dport_enable(struct bfa_s *bfa, u32 lpcnt, u32 pat, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 756 enum bfa_status bfa_dport_disable(struct bfa_s *bfa, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 758 enum bfa_status bfa_dport_start(struct bfa_s *bfa, u32 lpcnt, u32 pat, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 760 enum bfa_status bfa_dport_show(struct bfa_s *bfa, struct bfa_diag_dport_result_s *result); 305 void bfa_fcpim_path_tov_set(struct bfa_s *bfa, u16 path_tov); 308 enum bfa_status bfa_fcpim_port_iostats(struct bfa_s *bfa, struct bfa_itnim_iostats_s *stats, u8 lp_tag); 310 void bfa_fcpim_add_stats(struct bfa_itnim_iostats_s *lstats, struct bfa_itnim_iostats_s *rstats); 312 enum bfa_status bfa_fcpim_profile_on(struct bfa_s *bfa, u32 time); 313 enum bfa_status bfa_fcpim_profile_off(struct bfa_s *bfa); 336 void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim); 337 enum bfa_status bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim, struct bfa_itnim_ioprofile_s *ioprofile); 416 enum bfa_status bfa_fcpim_lunmask_update(struct bfa_s *bfa, u32 update); 417 enum bfa_status bfa_fcpim_lunmask_query(struct bfa_s *bfa, void *buf); 418 enum bfa_status bfa_fcpim_lunmask_delete(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn, wwn_t rpwwn, struct scsi_lun lun); 420 enum bfa_status bfa_fcpim_lunmask_add(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn, wwn_t rpwwn, struct scsi_lun lun); 422 enum bfa_status bfa_fcpim_lunmask_clear(struct bfa_s *bfa); 425 enum bfa_status bfa_fcpim_throttle_set(struct bfa_s *bfa, u16 value); 426 enum bfa_status bfa_fcpim_throttle_get(struct bfa_s *bfa, void *buf); 117 enum bfa_status bfa_cee_get_attr(struct bfa_cee_s *cee, struct bfa_cee_attr_s *attr, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 120 enum bfa_status bfa_cee_get_stats(struct bfa_cee_s *cee, struct bfa_cee_stats_s *stats, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 123 enum bfa_status bfa_cee_reset_stats(struct bfa_cee_s *cee, void (*cbfn)(void *, enum bfa_status ), void *cbarg); 289 enum bfa_boolean bfa_fcs_lport_is_online(struct bfa_fcs_lport_s *port); 296 struct bfa_fcs_lport_s * bfa_fcs_lookup_port(struct bfa_fcs_s *fcs, u16 vf_id, wwn_t lpwwn); 304 void bfa_fcs_lport_get_stats(struct bfa_fcs_lport_s *fcs_port, struct bfa_lport_stats_s *port_stats); 306 void bfa_fcs_lport_clear_stats(struct bfa_fcs_lport_s *fcs_port); 334 struct bfa_fcs_rport_s * bfa_fcs_lport_get_rport_by_pwwn(struct bfa_fcs_lport_s *port, wwn_t pwwn); 338 struct bfa_fcs_rport_s * bfa_fcs_lport_get_rport_by_qualifier(struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 pid); 386 void bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport, struct bfa_vport_attr_s *attr); 460 struct bfa_rport_s * bfa_fcs_rport_get_halrport(struct bfa_fcs_rport_s *rport); 468 void bfa_fcs_rport_get_attr(struct bfa_fcs_rport_s *rport, struct bfa_rport_attr_s *rport_attr); 470 struct bfa_fcs_rport_s * bfa_fcs_rport_lookup(struct bfa_fcs_lport_s *port, wwn_t rpwwn); 598 struct bfa_fcs_itnim_s * bfa_fcs_itnim_lookup(struct bfa_fcs_lport_s *port, wwn_t rpwwn); 600 enum bfa_status bfa_fcs_itnim_attr_get(struct bfa_fcs_lport_s *port, wwn_t rpwwn, struct bfa_itnim_attr_s *attr); 602 enum bfa_status bfa_fcs_itnim_stats_get(struct bfa_fcs_lport_s *port, wwn_t rpwwn, struct bfa_itnim_stats_s *stats); 604 enum bfa_status bfa_fcs_itnim_stats_clear(struct bfa_fcs_lport_s *port, wwn_t rpwwn); 804 struct bfa_fcs_fabric_s * bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); 805 void bfa_fcs_vf_get_ports(struct bfa_fcs_fabric_s *vf, wwn_t *lpwwn, int *nlports); 23 int __trc_fileno___1 = 3075; 26 int bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd); 49 int bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd); 79 int bfad_iocmd_ioc_get_info(struct bfad_s *bfad, void *cmd); 118 int bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd); 147 int bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd); 157 int bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 187 int bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 205 int bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 219 int bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd); 230 int bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd); 242 int bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd); 255 int bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd); 276 int bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd); 298 int bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd); 326 int bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 360 int bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd); 381 int bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd); 401 int bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd); 415 int bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd); 438 int bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd); 453 int bfad_iocmd_lport_get_attr(struct bfad_s *bfad, void *cmd); 476 int bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd); 500 int bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd); 534 int bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd); 559 int bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 601 int bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd); 638 int bfad_iocmd_rport_get_addr(struct bfad_s *bfad, void *cmd); 687 int bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd); 728 int bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd); 764 int bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd); 800 int bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd); 823 int bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd); 851 int bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd); 876 int bfad_iocmd_fabric_get_lports(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 918 int bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd); 931 int bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd); 960 int bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd); 989 int bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd); 1002 int bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd); 1024 int bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd); 1046 int bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd); 1063 int bfad_iocmd_itnim_get_attr(struct bfad_s *bfad, void *cmd); 1082 int bfad_iocmd_itnim_get_iostats(struct bfad_s *bfad, void *cmd); 1113 int bfad_iocmd_itnim_reset_stats(struct bfad_s *bfad, void *cmd); 1142 int bfad_iocmd_itnim_get_itnstats(struct bfad_s *bfad, void *cmd); 1171 int bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd); 1184 int bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd); 1197 int bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd); 1219 int bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd); 1242 int bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd); 1264 int bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd); 1288 int bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd); 1311 int bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd); 1335 int bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd); 1361 int bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd); 1384 int bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 1420 int bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 1457 int bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd); 1471 int bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd); 1493 int bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd); 1514 int bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd); 1535 int bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd); 1555 int bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 1587 int bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 1619 int bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd); 1641 int bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd); 1664 int bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd); 1687 int bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd); 1711 int bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd); 1732 int bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd); 1755 int bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd); 1768 int bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd); 1783 int bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd); 1798 int bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd); 1820 int bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd); 1840 int bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd); 1865 int bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd); 1880 int bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd); 1901 int bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd); 1922 int bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 1954 int bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd); 1973 int bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 2003 int bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd); 2023 int bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd, unsigned int payload_len); 2057 int bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 2078 int bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd); 2092 int bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 2111 int bfad_iocmd_itnim_get_ioprofile(struct bfad_s *bfad, void *cmd); 2138 int bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd); 2163 int bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd); 2187 int bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd); 2209 int bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd); 2231 int bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd); 2250 int bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd); 2273 int bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd); 2296 int bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 2336 int bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd); 2359 int bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 2387 int bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd); 2413 int bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd); 2445 int bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd); 2477 int bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd); 2508 int bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd); 2531 int bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd); 2554 void bfad_iocmd_lunmask_reset_lunscan_mode(struct bfad_s *bfad, int lunmask_cfg); 2568 int bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd); 2591 int bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd); 2605 int bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd); 2624 int bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd); 2639 int bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd); 2654 int bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd); 2676 int bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd); 2698 int bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd); 2720 int bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd); 2742 int bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd); 2757 int bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd, unsigned int payload_len); 3132 int bfad_im_bsg_vendor_request(struct fc_bsg_job *job); 3194 u64 bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid); 3206 u32 bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid); 3216 u64 bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid); 3228 u32 bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid); 3238 void bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3253 struct bfad_buf_info * bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf, uint32_t payload_len, uint32_t *num_sgles); 3296 void bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base, uint32_t num_sgles); 3314 int bfad_fcxp_bsg_send(struct fc_bsg_job *job, struct bfad_fcxp *drv_fcxp, struct bfa_bsg_fcpt_s *bsg_fcpt); 3354 int bfad_im_bsg_els_ct_request(struct fc_bsg_job *job); 10 void __const_udelay(unsigned long); 197 int bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe); 271 int bfa_sm_to_state(struct bfa_sm_table_s *smt, void (*sm)(void *, int)); 55 void bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer, void (*timercb)(void *), void *arg, unsigned int timeout); 58 void bfa_timer_stop(struct bfa_timer_s *timer); 181 void __bfa_dma_be_addr_set(union bfi_addr_u *dma_addr, u64 pa); 191 void __bfa_alen_set(struct bfi_alen_s *alen, u32 len, u64 pa); 450 u32 bfa_sfp_meminfo(); 452 void bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod); 455 void bfa_sfp_memclaim(struct bfa_sfp_s *sfp, u8 *dm_kva, u64 dm_pa); 456 void bfa_sfp_intr(void *sfparg, struct bfi_mbmsg_s *msg); 513 u32 bfa_flash_meminfo(enum bfa_boolean mincfg); 514 void bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod, enum bfa_boolean mincfg); 516 void bfa_flash_memclaim(struct bfa_flash_s *flash, u8 *dm_kva, u64 dm_pa, enum bfa_boolean mincfg); 518 enum bfa_status bfa_flash_raw_read(void *pci_bar, u32 offset, char *buf, u32 len); 634 u32 bfa_diag_meminfo(); 635 void bfa_diag_memclaim(struct bfa_diag_s *diag, u8 *dm_kva, u64 dm_pa); 636 void bfa_diag_attach(struct bfa_diag_s *diag, struct bfa_ioc_s *ioc, void *dev, void (*cbfn_beacon)(void *, enum bfa_boolean , enum bfa_boolean ), struct bfa_trc_mod_s *trcmod); 691 enum bfa_boolean bfa_phy_busy(struct bfa_ioc_s *ioc); 705 u32 bfa_phy_meminfo(enum bfa_boolean mincfg); 706 void bfa_phy_attach(struct bfa_phy_s *phy, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod, enum bfa_boolean mincfg); 708 void bfa_phy_memclaim(struct bfa_phy_s *phy, u8 *dm_kva, u64 dm_pa, enum bfa_boolean mincfg); 710 void bfa_phy_intr(void *phyarg, struct bfi_mbmsg_s *msg); 755 u32 bfa_fru_meminfo(enum bfa_boolean mincfg); 756 void bfa_fru_attach(struct bfa_fru_s *fru, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod, enum bfa_boolean mincfg); 758 void bfa_fru_memclaim(struct bfa_fru_s *fru, u8 *dm_kva, u64 dm_pa, enum bfa_boolean mincfg); 760 void bfa_fru_intr(void *fruarg, struct bfi_mbmsg_s *msg); 803 void bfa_dconf_modinit(struct bfa_s *bfa); 804 void bfa_dconf_modexit(struct bfa_s *bfa); 805 enum bfa_status bfa_dconf_update(struct bfa_s *bfa); 842 void bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd); 843 void bfa_ioc_mbox_register(struct bfa_ioc_s *ioc, bfa_ioc_mbox_mcfunc_t (**mcfuncs)(void *, struct bfi_mbmsg_s *)); 845 void bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc); 846 void bfa_ioc_mbox_send(struct bfa_ioc_s *ioc, void *ioc_msg, int len); 847 enum bfa_boolean bfa_ioc_msgget(struct bfa_ioc_s *ioc, void *mbmsg); 848 void bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, void (*cbfn)(void *, struct bfi_mbmsg_s *), void *cbarg); 859 enum bfa_status bfa_ioc_pll_init(struct bfa_ioc_s *ioc); 876 void bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc); 877 void bfa_ioc_set_ct_hwif(struct bfa_ioc_s *ioc); 878 void bfa_ioc_set_ct2_hwif(struct bfa_ioc_s *ioc); 879 void bfa_ioc_ct2_poweron(struct bfa_ioc_s *ioc); 881 void bfa_ioc_attach(struct bfa_ioc_s *ioc, void *bfa, struct bfa_ioc_cbfn_s *cbfn, struct bfa_timer_mod_s *timer_mod); 883 void bfa_ioc_auto_recover(enum bfa_boolean auto_recover); 884 void bfa_ioc_detach(struct bfa_ioc_s *ioc); 886 void bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, enum bfi_pcifn_class clscode); 888 void bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa); 889 void bfa_ioc_enable(struct bfa_ioc_s *ioc); 890 void bfa_ioc_disable(struct bfa_ioc_s *ioc); 893 enum bfa_status bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env); 895 void bfa_ioc_isr(struct bfa_ioc_s *ioc, struct bfi_mbmsg_s *m); 896 void bfa_ioc_error_isr(struct bfa_ioc_s *ioc); 897 enum bfa_boolean bfa_ioc_is_operational(struct bfa_ioc_s *ioc); 898 enum bfa_boolean bfa_ioc_is_initialized(struct bfa_ioc_s *ioc); 901 enum bfa_boolean bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc); 902 enum bfa_boolean bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc); 903 void bfa_ioc_reset_fwstate(struct bfa_ioc_s *ioc); 909 void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer); 912 enum bfa_ioc_state bfa_ioc_get_state(struct bfa_ioc_s *ioc); 915 void bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc, struct bfa_adapter_attr_s *ad_attr); 917 void bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave); 925 enum bfa_boolean bfa_ioc_sem_get(void *sem_reg); 926 void bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr); 928 enum bfa_boolean bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *smem_fwhdr); 930 void bfa_ioc_aen_post(struct bfa_ioc_s *ioc, enum bfa_ioc_aen_event event); 938 u32 bfa_ablk_meminfo(); 939 void bfa_ablk_memclaim(struct bfa_ablk_s *ablk, u8 *dma_kva, u64 dma_pa); 940 void bfa_ablk_attach(struct bfa_ablk_s *ablk, struct bfa_ioc_s *ioc); 962 enum bfa_status bfa_ioc_flash_img_get_chnk(struct bfa_ioc_s *ioc, u32 off, u32 *fwimg); 981 u32 * bfi_image_cb_get_chunk(u32 off); 987 u32 * bfi_image_ct_get_chunk(u32 off); 993 u32 * bfi_image_ct2_get_chunk(u32 off); 999 u32 * bfa_cb_image_get_chunk(enum bfi_asic_gen asic_gen, u32 off); 1017 u32 bfa_cb_image_get_size(enum bfi_asic_gen asic_gen); 137 struct bfa_module_s hal_mod_dconf; 26 int __trc_fileno___2 = 4098; 92 enum bfa_boolean bfa_auto_recover = 1; 97 void bfa_ioc_hw_sem_get(struct bfa_ioc_s *ioc); 98 void bfa_ioc_hwinit(struct bfa_ioc_s *ioc, enum bfa_boolean force); 99 void bfa_ioc_timeout(void *ioc_arg); 100 void bfa_ioc_poll_fwinit(struct bfa_ioc_s *ioc); 101 void bfa_ioc_send_enable(struct bfa_ioc_s *ioc); 102 void bfa_ioc_send_disable(struct bfa_ioc_s *ioc); 103 void bfa_ioc_send_getattr(struct bfa_ioc_s *ioc); 104 void bfa_ioc_hb_monitor(struct bfa_ioc_s *ioc); 105 void bfa_ioc_mbox_poll(struct bfa_ioc_s *ioc); 106 void bfa_ioc_mbox_flush(struct bfa_ioc_s *ioc); 107 void bfa_ioc_recover(struct bfa_ioc_s *ioc); 108 void bfa_ioc_event_notify(struct bfa_ioc_s *ioc, enum bfa_ioc_event_e event); 110 void bfa_ioc_disable_comp(struct bfa_ioc_s *ioc); 111 void bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc); 112 void bfa_ioc_fail_notify(struct bfa_ioc_s *ioc); 113 void bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc); 114 enum bfi_ioc_img_ver_cmp_e bfa_ioc_fw_ver_patch_cmp(struct bfi_ioc_image_hdr_s *base_fwhdr, struct bfi_ioc_image_hdr_s *fwhdr_to_cmp); 117 enum bfi_ioc_img_ver_cmp_e bfa_ioc_flash_fwver_cmp(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *base_fwhdr); 139 void bfa_ioc_sm_uninit(struct bfa_ioc_s *ioc, enum ioc_event event); 139 void bfa_ioc_sm_uninit_entry(struct bfa_ioc_s *ioc); 140 void bfa_ioc_sm_reset(struct bfa_ioc_s *ioc, enum ioc_event event); 140 void bfa_ioc_sm_reset_entry(struct bfa_ioc_s *ioc); 141 void bfa_ioc_sm_enabling(struct bfa_ioc_s *ioc, enum ioc_event event); 141 void bfa_ioc_sm_enabling_entry(struct bfa_ioc_s *ioc); 142 void bfa_ioc_sm_getattr(struct bfa_ioc_s *ioc, enum ioc_event event); 142 void bfa_ioc_sm_getattr_entry(struct bfa_ioc_s *ioc); 143 void bfa_ioc_sm_op(struct bfa_ioc_s *ioc, enum ioc_event event); 143 void bfa_ioc_sm_op_entry(struct bfa_ioc_s *ioc); 144 void bfa_ioc_sm_fail_retry(struct bfa_ioc_s *ioc, enum ioc_event event); 144 void bfa_ioc_sm_fail_retry_entry(struct bfa_ioc_s *ioc); 145 void bfa_ioc_sm_fail(struct bfa_ioc_s *ioc, enum ioc_event event); 145 void bfa_ioc_sm_fail_entry(struct bfa_ioc_s *ioc); 146 void bfa_ioc_sm_disabling(struct bfa_ioc_s *ioc, enum ioc_event event); 146 void bfa_ioc_sm_disabling_entry(struct bfa_ioc_s *ioc); 147 void bfa_ioc_sm_disabled(struct bfa_ioc_s *ioc, enum ioc_event event); 147 void bfa_ioc_sm_disabled_entry(struct bfa_ioc_s *ioc); 148 void bfa_ioc_sm_hwfail(struct bfa_ioc_s *ioc, enum ioc_event event); 148 void bfa_ioc_sm_hwfail_entry(struct bfa_ioc_s *ioc); 150 struct bfa_sm_table_s ioc_sm_table[10U] = { { (void (*)(void *, int))(&bfa_ioc_sm_uninit), 1, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_reset), 2, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_enabling), 12, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_getattr), 5, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_op), 6, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_fail_retry), 7, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_fail), 8, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_disabling), 9, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_disabled), 10, 0 }, { (void (*)(void *, int))(&bfa_ioc_sm_hwfail), 13, 0 } }; 184 void bfa_iocpf_timeout(void *ioc_arg); 185 void bfa_iocpf_sem_timeout(void *ioc_arg); 186 void bfa_iocpf_poll_timeout(void *ioc_arg); 221 void bfa_iocpf_sm_reset(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 221 void bfa_iocpf_sm_reset_entry(struct bfa_iocpf_s *iocpf); 222 void bfa_iocpf_sm_fwcheck(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 222 void bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf); 223 void bfa_iocpf_sm_mismatch(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 223 void bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf_s *iocpf); 224 void bfa_iocpf_sm_semwait(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 224 void bfa_iocpf_sm_semwait_entry(struct bfa_iocpf_s *iocpf); 225 void bfa_iocpf_sm_hwinit(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 225 void bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf_s *iocpf); 226 void bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 226 void bfa_iocpf_sm_enabling_entry(struct bfa_iocpf_s *iocpf); 227 void bfa_iocpf_sm_ready(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 227 void bfa_iocpf_sm_ready_entry(struct bfa_iocpf_s *iocpf); 229 void bfa_iocpf_sm_initfail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 229 void bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf_s *iocpf); 230 void bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 230 void bfa_iocpf_sm_initfail_entry(struct bfa_iocpf_s *iocpf); 231 void bfa_iocpf_sm_fail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 231 void bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf); 232 void bfa_iocpf_sm_fail(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 232 void bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf); 233 void bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 233 void bfa_iocpf_sm_disabling_entry(struct bfa_iocpf_s *iocpf); 235 void bfa_iocpf_sm_disabling_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 235 void bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf_s *iocpf); 236 void bfa_iocpf_sm_disabled(struct bfa_iocpf_s *iocpf, enum iocpf_event event); 236 void bfa_iocpf_sm_disabled_entry(struct bfa_iocpf_s *iocpf); 238 struct bfa_sm_table_s iocpf_sm_table[14U] = { { (void (*)(void *, int))(&bfa_iocpf_sm_reset), 1, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_fwcheck), 9, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_mismatch), 9, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_semwait), 2, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_hwinit), 3, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_enabling), 3, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_ready), 4, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_initfail_sync), 5, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_initfail), 5, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_fail_sync), 6, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_fail), 6, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_disabling), 7, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_disabling_sync), 7, 0 }, { (void (*)(void *, int))(&bfa_iocpf_sm_disabled), 8, 0 } }; 1384 void bfa_ioc_lmem_init(struct bfa_ioc_s *ioc); 1421 void bfa_ioc_lpu_start(struct bfa_ioc_s *ioc); 1515 enum bfa_boolean bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env); 1531 enum bfa_boolean bfa_ioc_fwver_md5_check(struct bfi_ioc_image_hdr_s *fwhdr_1, struct bfi_ioc_image_hdr_s *fwhdr_2); 1548 enum bfa_boolean bfa_ioc_fw_ver_compatible(struct bfi_ioc_image_hdr_s *drv_fwhdr, struct bfi_ioc_image_hdr_s *fwhdr_to_cmp); 1573 enum bfa_boolean bfa_ioc_flash_fwver_valid(struct bfi_ioc_image_hdr_s *flash_fwhdr); 1581 enum bfa_boolean fwhdr_is_ga(struct bfi_ioc_image_hdr_s *fwhdr); 1696 void bfa_ioc_msgflush(struct bfa_ioc_s *ioc); 1843 void bfa_ioc_hb_check(void *cbarg); 1871 enum bfa_status bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env); 1973 void bfa_ioc_getattr_reply(struct bfa_ioc_s *ioc); 1990 void bfa_ioc_mbox_attach(struct bfa_ioc_s *ioc); 2054 enum bfa_status bfa_ioc_smem_read(struct bfa_ioc_s *ioc, void *tbuf, u32 soff, u32 sz); 2113 enum bfa_status bfa_ioc_smem_clr(struct bfa_ioc_s *ioc, u32 soff, u32 sz); 2996 void bfa_ioc_send_fwsync(struct bfa_ioc_s *ioc); 3008 void bfa_ioc_fwsync(struct bfa_ioc_s *ioc); 3269 void bfa_ablk_config_swap(struct bfa_ablk_cfg_s *cfg); 3293 void bfa_ablk_isr(void *cbarg, struct bfi_mbmsg_s *msg); 3342 void bfa_ablk_notify(void *cbarg, enum bfa_ioc_event_e event); 3644 void bfa_sfp_getdata_send(struct bfa_sfp_s *sfp); 3645 void bfa_sfp_media_get(struct bfa_sfp_s *sfp); 3646 enum bfa_status bfa_sfp_speed_valid(struct bfa_sfp_s *sfp, enum bfa_port_speed portspeed); 3650 void bfa_cb_sfp_show(struct bfa_sfp_s *sfp); 3660 void bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp); 3687 void bfa_sfp_notify(void *sfp_arg, enum bfa_ioc_event_e event); 3718 void bfa_sfp_scn_aen_post(struct bfa_sfp_s *sfp, struct bfi_sfp_scn_s *rsp); 3784 void bfa_sfp_getdata(struct bfa_sfp_s *sfp, enum bfi_sfp_mem_e memtype); 3805 void bfa_sfp_scn(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg); 3849 void bfa_sfp_show_comp(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg); 3903 void bfa_sfp_state_query(struct bfa_sfp_s *sfp); 4202 void bfa_flash_aen_audit_post(struct bfa_ioc_s *ioc, enum bfa_audit_aen_event event, int inst, int type); 4222 void bfa_flash_cb(struct bfa_flash_s *flash); 4230 void bfa_flash_notify(void *cbarg, enum bfa_ioc_event_e event); 4256 void bfa_flash_query_send(void *cbarg); 4275 void bfa_flash_write_send(struct bfa_flash_s *flash); 4307 void bfa_flash_read_send(void *cbarg); 4332 void bfa_flash_erase_send(void *cbarg); 4352 void bfa_flash_intr(void *flasharg, struct bfi_mbmsg_s *msg); 4725 void bfa_diag_notify(void *diag_arg, enum bfa_ioc_event_e event); 4769 void bfa_diag_memtest_done(void *cbarg); 4826 void diag_fwping_send(struct bfa_diag_s *diag); 4857 void diag_fwping_comp(struct bfa_diag_s *diag, struct bfi_diag_fwping_rsp_s *diag_rsp); 4913 void diag_tempsensor_send(struct bfa_diag_s *diag); 4927 void diag_tempsensor_comp(struct bfa_diag_s *diag, struct bfi_diag_ts_req_s *rsp); 4969 void diag_ledtest_send(struct bfa_diag_s *diag, struct bfa_diag_ledtest_s *ledtest); 5001 void diag_ledtest_comp(struct bfa_diag_s *diag, struct bfi_diag_ledtest_rsp_s *msg); 5012 void diag_portbeacon_send(struct bfa_diag_s *diag, enum bfa_boolean beacon, u32 sec); 5027 void diag_portbeacon_comp(struct bfa_diag_s *diag); 5039 void bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg); 5311 void bfa_phy_ntoh32(u32 *obuf, u32 *ibuf, int sz); 5320 enum bfa_boolean bfa_phy_present(struct bfa_phy_s *phy); 5326 void bfa_phy_notify(void *cbarg, enum bfa_ioc_event_e event); 5353 void bfa_phy_query_send(void *cbarg); 5372 void bfa_phy_write_send(void *cbarg); 5412 void bfa_phy_read_send(void *cbarg); 5436 void bfa_phy_stats_send(void *cbarg); 5827 void bfa_dconf_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_s *bfa); 5827 void bfa_dconf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 5827 void bfa_dconf_detach(struct bfa_s *bfa); 5827 void bfa_dconf_start(struct bfa_s *bfa); 5827 void bfa_dconf_stop(struct bfa_s *bfa); 5827 void bfa_dconf_iocdisable(struct bfa_s *bfa); 5827 struct bfa_module_s hal_mod_dconf = { &bfa_dconf_meminfo, &bfa_dconf_attach, &bfa_dconf_detach, &bfa_dconf_start, &bfa_dconf_stop, &bfa_dconf_iocdisable }; 5842 void bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5844 void bfa_dconf_sm_flash_read(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5846 void bfa_dconf_sm_ready(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5848 void bfa_dconf_sm_dirty(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5850 void bfa_dconf_sm_sync(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5852 void bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5854 void bfa_dconf_sm_iocdown_dirty(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event); 5857 void bfa_dconf_cbfn(void *arg, enum bfa_status status); 5858 void bfa_dconf_timer(void *cbarg); 5859 enum bfa_status bfa_dconf_flash_write(struct bfa_dconf_mod_s *dconf); 5860 void bfa_dconf_init_cb(void *arg, enum bfa_status status); 6221 void bfa_fru_notify(void *cbarg, enum bfa_ioc_event_e event); 6248 void bfa_fru_write_send(void *cbarg, enum bfi_fru_h2i_msgs msg_type); 6282 void bfa_fru_read_send(void *cbarg, enum bfi_fru_h2i_msgs msg_type); 6765 void bfa_flash_set_cmd(void *pci_bar, u8 wr_cnt, u8 rd_cnt, u8 ad_cnt, u8 op); 6780 void bfa_flash_set_addr(void *pci_bar, u32 address); 6790 int bfa_flash_cmd_act_check(void *pci_bar); 6812 u32 bfa_flash_fifo_flush(void *pci_bar); 6851 u32 bfa_flash_status_read(void *pci_bar); 6899 u32 bfa_flash_read_start(void *pci_bar, u32 offset, u32 len, char *buf); 6942 u32 bfa_flash_read_check(void *pci_bar); 6959 void bfa_flash_read_end(void *pci_bar, u32 len, char *buf); 6992 int bfa_raw_sem_get(void *bar); 7002 enum bfa_status bfa_flash_sem_get(void *bar); 7015 void bfa_flash_sem_put(void *bar); 860 enum bfa_status bfa_ioc_cb_pll_init(void *rb, enum bfi_asic_mode fcmode); 23 int __trc_fileno___3 = 4099; 30 enum bfa_boolean bfa_ioc_cb_firmware_lock(struct bfa_ioc_s *ioc); 31 void bfa_ioc_cb_firmware_unlock(struct bfa_ioc_s *ioc); 32 void bfa_ioc_cb_reg_init(struct bfa_ioc_s *ioc); 33 void bfa_ioc_cb_map_port(struct bfa_ioc_s *ioc); 34 void bfa_ioc_cb_isr_mode_set(struct bfa_ioc_s *ioc, enum bfa_boolean msix); 35 void bfa_ioc_cb_notify_fail(struct bfa_ioc_s *ioc); 36 void bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc); 37 enum bfa_boolean bfa_ioc_cb_sync_start(struct bfa_ioc_s *ioc); 38 void bfa_ioc_cb_sync_join(struct bfa_ioc_s *ioc); 39 void bfa_ioc_cb_sync_leave(struct bfa_ioc_s *ioc); 40 void bfa_ioc_cb_sync_ack(struct bfa_ioc_s *ioc); 41 enum bfa_boolean bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc); 42 void bfa_ioc_cb_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); 44 enum bfi_ioc_state bfa_ioc_cb_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc); 45 void bfa_ioc_cb_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); 47 enum bfi_ioc_state bfa_ioc_cb_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc); 49 struct bfa_ioc_hwif_s hwif_cb = { }; 128 struct __anonstruct_iocreg_fnreg_268 iocreg_fnreg[2U] = { { 102912U, 103040U, 81928U }, { 103008U, 103136U, 82184U } }; 136 struct __anonstruct_iocreg_mbcmd_269 iocreg_mbcmd[2U] = { { 102400U, 102408U }, { 102420U, 102428U } }; 861 enum bfa_status bfa_ioc_ct_pll_init(void *rb, enum bfi_asic_mode mode); 862 enum bfa_status bfa_ioc_ct2_pll_init(void *rb, enum bfi_asic_mode mode); 23 int __trc_fileno___4 = 4100; 37 enum bfa_boolean bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc); 38 void bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc); 39 void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc); 40 void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc); 41 enum bfa_boolean bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc); 42 void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc); 43 void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc); 44 void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc); 45 enum bfa_boolean bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc); 46 void bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); 48 enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc); 49 void bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate); 51 enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc); 53 struct bfa_ioc_hwif_s hwif_ct = { }; 54 struct bfa_ioc_hwif_s hwif_ct2 = { }; 152 struct __anonstruct_ct_fnreg_268 ct_fnreg[4U] = { { 102912U, 103040U, 81928U }, { 103008U, 103136U, 82184U }, { 103424U, 103552U, 82696U }, { 103520U, 103648U, 82952U } }; 162 struct __anonstruct_ct_p0reg_269 ct_p0reg[4U] = { { 102400U, 102408U }, { 102416U, 102424U }, { 102736U, 102744U }, { 102752U, 102760U } }; 172 struct __anonstruct_ct_p1reg_270 ct_p1reg[4U] = { { 102404U, 102412U }, { 102420U, 102428U }, { 102740U, 102748U }, { 102756U, 102764U } }; 180 struct __anonstruct_ct2_reg_271 ct2_reg[2U] = { { 196608U, 196672U, 196888U, 196736U, 196744U, 196752U }, { 196640U, 196704U, 196888U, 196740U, 196748U, 196756U } }; 190 void bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc); 249 void bfa_ioc_ct2_reg_init(struct bfa_ioc_s *ioc); 312 void bfa_ioc_ct_map_port(struct bfa_ioc_s *ioc); 329 void bfa_ioc_ct2_map_port(struct bfa_ioc_s *ioc); 345 void bfa_ioc_ct_isr_mode_set(struct bfa_ioc_s *ioc, enum bfa_boolean msix); 375 enum bfa_boolean bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc_s *ioc); 510 void bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif); 655 void bfa_ioc_ct2_sclk_init(void *rb); 700 void bfa_ioc_ct2_lclk_init(void *rb); 740 void bfa_ioc_ct2_mem_init(void *rb); 755 void bfa_ioc_ct2_mac_reset(void *rb); 765 void bfa_ioc_ct2_enable_flash(void *rb); 782 enum bfa_boolean bfa_ioc_ct2_nfc_halted(void *rb); 794 void bfa_ioc_ct2_nfc_halt(void *rb); 808 void bfa_ioc_ct2_nfc_resume(void *rb); 824 void bfa_ioc_ct2_clk_reset(void *rb); 845 void bfa_ioc_ct2_nfc_clk_reset(void *rb); 876 void bfa_ioc_ct2_wait_till_nfc_running(void *rb); 315 void bfa_msix_all(struct bfa_s *bfa, int vec); 316 void bfa_msix_reqq(struct bfa_s *bfa, int vec); 317 void bfa_msix_rspq(struct bfa_s *bfa, int vec); 318 void bfa_msix_lpu_err(struct bfa_s *bfa, int vec); 320 void bfa_hwcb_reginit(struct bfa_s *bfa); 321 void bfa_hwcb_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci); 322 void bfa_hwcb_msix_init(struct bfa_s *bfa, int nvecs); 323 void bfa_hwcb_msix_ctrl_install(struct bfa_s *bfa); 324 void bfa_hwcb_msix_queue_install(struct bfa_s *bfa); 325 void bfa_hwcb_msix_uninstall(struct bfa_s *bfa); 326 void bfa_hwcb_isr_mode_set(struct bfa_s *bfa, enum bfa_boolean msix); 327 void bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *msix_vecs_bmap, u32 *num_vecs, u32 *max_vec_bit); 329 void bfa_hwcb_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end); 39 void bfa_hwcb_reqq_ack_msix(struct bfa_s *bfa, int reqq); 53 void bfa_hwcb_rspq_ack_msix(struct bfa_s *bfa, int rspq, u32 ci); 107 void bfa_hwcb_msix_dummy(struct bfa_s *bfa, int vec); 331 void bfa_hwct_reginit(struct bfa_s *bfa); 332 void bfa_hwct2_reginit(struct bfa_s *bfa); 333 void bfa_hwct_reqq_ack(struct bfa_s *bfa, int reqq); 334 void bfa_hwct_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci); 335 void bfa_hwct2_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci); 336 void bfa_hwct_msix_init(struct bfa_s *bfa, int nvecs); 337 void bfa_hwct_msix_ctrl_install(struct bfa_s *bfa); 338 void bfa_hwct_msix_queue_install(struct bfa_s *bfa); 339 void bfa_hwct_msix_uninstall(struct bfa_s *bfa); 340 void bfa_hwct_isr_mode_set(struct bfa_s *bfa, enum bfa_boolean msix); 341 void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *msix_vecs_bmap, u32 *num_vecs, u32 *max_vec_bit); 343 void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end); 22 int __trc_fileno___5 = 1028; 28 void bfa_hwct_msix_dummy(struct bfa_s *bfa, int vec); 32 char * strncat(char *, const char *, __kernel_size_t ); 293 void bfa_wc_up(struct bfa_wc_s *wc); 299 void bfa_wc_down(struct bfa_wc_s *wc); 310 void bfa_wc_init(struct bfa_wc_s *wc, void (*wc_resume)(void *), void *wc_cbarg); 322 void bfa_wc_wait(struct bfa_wc_s *wc); 328 void wwn2str___1(char *wwn_str, u64 wwn); 346 int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport); 538 enum bfa_port_topology bfa_fcport_get_topology(struct bfa_s *bfa); 542 u8 bfa_fcport_get_myalpa(struct bfa_s *bfa); 546 u8 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa); 549 void bfa_fcport_event_register(struct bfa_s *bfa, void (*cbfn)(void *, enum bfa_port_linkstate ), void *cbarg); 559 void bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit); 563 enum bfa_boolean bfa_fcport_is_linkup(struct bfa_s *bfa); 629 void * bfa_fcxp_get_reqbuf(struct bfa_fcxp_s *fcxp); 647 void * bfa_uf_get_frmbuf(struct bfa_uf_s *uf); 653 u16 bfa_uf_get_frmlen(struct bfa_uf_s *uf); 661 void bfa_uf_recv_register(struct bfa_s *bfa, void (*ufrecv)(void *, struct bfa_uf_s *), void *cbarg); 663 void bfa_uf_free(struct bfa_uf_s *uf); 670 struct bfa_lps_s * bfa_lps_alloc(struct bfa_s *bfa); 671 void bfa_lps_delete(struct bfa_lps_s *lps); 672 void bfa_lps_flogi(struct bfa_lps_s *lps, void *uarg, u8 alpa, u16 pdusz, wwn_t pwwn, wwn_t nwwn, enum bfa_boolean auth_en); 682 void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, enum bfa_status status); 683 void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); 320 void bfa_fcs_lport_uf_recv(struct bfa_fcs_lport_s *lport, struct fchs_s *fchs, u16 len); 322 void bfa_fcs_lport_attach(struct bfa_fcs_lport_s *lport, struct bfa_fcs_s *fcs, u16 vf_id, struct bfa_fcs_vport_s *vport); 324 void bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport, struct bfa_lport_cfg_s *port_cfg); 326 void bfa_fcs_lport_online(struct bfa_fcs_lport_s *port); 327 void bfa_fcs_lport_offline(struct bfa_fcs_lport_s *port); 328 void bfa_fcs_lport_delete(struct bfa_fcs_lport_s *port); 329 void bfa_fcs_lport_stop(struct bfa_fcs_lport_s *port); 391 void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport); 392 void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport); 394 void bfa_fcs_vport_fcs_delete(struct bfa_fcs_vport_s *vport); 395 void bfa_fcs_vport_fcs_stop(struct bfa_fcs_vport_s *vport); 810 void bfa_fcs_fabric_attach(struct bfa_fcs_s *fcs); 811 void bfa_fcs_fabric_modinit(struct bfa_fcs_s *fcs); 812 void bfa_fcs_fabric_modexit(struct bfa_fcs_s *fcs); 813 void bfa_fcs_fabric_link_up(struct bfa_fcs_fabric_s *fabric); 814 void bfa_fcs_fabric_link_down(struct bfa_fcs_fabric_s *fabric); 815 void bfa_fcs_fabric_addvport(struct bfa_fcs_fabric_s *fabric, struct bfa_fcs_vport_s *vport); 817 void bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric, struct bfa_fcs_vport_s *vport); 819 struct bfa_fcs_vport_s * bfa_fcs_fabric_vport_lookup(struct bfa_fcs_fabric_s *fabric, wwn_t pwwn); 822 void bfa_fcs_fabric_uf_recv(struct bfa_fcs_fabric_s *fabric, struct fchs_s *fchs, u16 len); 824 void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric); 825 void bfa_fcs_fabric_nsymb_init(struct bfa_fcs_fabric_s *fabric); 826 void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, wwn_t fabric_name); 828 u16 bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric); 829 void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs); 830 void bfa_fcs_port_attach(struct bfa_fcs_s *fcs); 831 void bfa_fcs_fabric_modstop(struct bfa_fcs_s *fcs); 832 void bfa_fcs_fabric_sm_online(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 834 void bfa_fcs_fabric_sm_loopback(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 836 void bfa_fcs_fabric_sm_auth_failed(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 135 void fcbuild_init(); 146 u16 fc_flogi_acc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size, u16 local_bb_credits, u8 bb_scn); 27 int __trc_fileno___6 = 2049; 40 struct bfa_fcs_mod_s fcs_modules[3U] = { { &bfa_fcs_port_attach, (void (*)(struct bfa_fcs_s *))0, (void (*)(struct bfa_fcs_s *))0 }, { &bfa_fcs_uf_attach, (void (*)(struct bfa_fcs_s *))0, (void (*)(struct bfa_fcs_s *))0 }, { &bfa_fcs_fabric_attach, &bfa_fcs_fabric_modinit, &bfa_fcs_fabric_modexit } }; 52 void bfa_fcs_exit_comp(void *fcs_cbarg); 223 void bfa_fcs_fabric_init(struct bfa_fcs_fabric_s *fabric); 224 void bfa_fcs_fabric_login(struct bfa_fcs_fabric_s *fabric); 225 void bfa_fcs_fabric_notify_online(struct bfa_fcs_fabric_s *fabric); 226 void bfa_fcs_fabric_notify_offline(struct bfa_fcs_fabric_s *fabric); 227 void bfa_fcs_fabric_delay(void *cbarg); 228 void bfa_fcs_fabric_delete(struct bfa_fcs_fabric_s *fabric); 229 void bfa_fcs_fabric_delete_comp(void *cbarg); 230 void bfa_fcs_fabric_stop(struct bfa_fcs_fabric_s *fabric); 231 void bfa_fcs_fabric_stop_comp(void *cbarg); 232 void bfa_fcs_fabric_process_uf(struct bfa_fcs_fabric_s *fabric, struct fchs_s *fchs, u16 len); 234 void bfa_fcs_fabric_process_flogi(struct bfa_fcs_fabric_s *fabric, struct fchs_s *fchs, u16 len); 236 void bfa_fcs_fabric_send_flogi_acc(struct bfa_fcs_fabric_s *fabric); 237 void bfa_fcs_fabric_flogiacc_comp(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status status, u32 rsp_len, u32 resid_len, struct fchs_s *rspfchs); 244 void bfa_fcs_fabric_sm_uninit(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 246 void bfa_fcs_fabric_sm_created(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 248 void bfa_fcs_fabric_sm_linkdown(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 250 void bfa_fcs_fabric_sm_flogi(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 252 void bfa_fcs_fabric_sm_flogi_retry(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 254 void bfa_fcs_fabric_sm_auth(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 256 void bfa_fcs_fabric_sm_nofabric(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 258 void bfa_fcs_fabric_sm_evfp(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 260 void bfa_fcs_fabric_sm_evfp_done(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 262 void bfa_fcs_fabric_sm_isolated(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 264 void bfa_fcs_fabric_sm_deleting(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 266 void bfa_fcs_fabric_sm_stopping(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 268 void bfa_fcs_fabric_sm_cleanup(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event); 1493 void bfa_fcs_fabric_aen_post(struct bfa_fcs_lport_s *port, enum bfa_port_aen_event event); 1615 void bfa_fcs_port_event_handler(void *cbarg, enum bfa_port_linkstate event); 1654 void bfa_fcs_uf_recv(void *cbarg, struct bfa_uf_s *uf); 63 int memcmp(const void *, const void *, size_t ); 41 int strncmp(const char *, const char *, __kernel_size_t ); 328 void wwn2str___2(char *wwn_str, u64 wwn); 557 enum bfa_port_speed bfa_fcport_get_ratelim_speed(struct bfa_s *bfa); 560 enum bfa_boolean bfa_fcport_is_ratelim(struct bfa_s *bfa); 616 void bfa_fcxp_req_rsp_alloc_wait(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe, void (*alloc_cbfn)(void *, struct bfa_fcxp_s *), void *alloc_cbarg, void *caller, int nreq_sgles, int nrsp_sgles, u64 (*req_sga_cbfn)(void *, int), u32 (*req_sglen_cbfn)(void *, int), u64 (*rsp_sga_cbfn)(void *, int), u32 (*rsp_sglen_cbfn)(void *, int), enum bfa_boolean req); 625 void bfa_fcxp_walloc_cancel(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe); 627 void bfa_fcxp_discard(struct bfa_fcxp_s *fcxp); 630 void * bfa_fcxp_get_rspbuf(struct bfa_fcxp_s *fcxp); 643 u32 bfa_fcxp_get_maxrsp(struct bfa_s *bfa); 675 void bfa_lps_fdisc(struct bfa_lps_s *lps, void *uarg, u16 pdusz, wwn_t pwwn, wwn_t nwwn); 677 void bfa_lps_fdisclogo(struct bfa_lps_s *lps); 678 void bfa_lps_set_n2n_pid(struct bfa_lps_s *lps, unsigned int n2n_pid); 684 void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, enum bfa_status status); 685 void bfa_cb_lps_fdisclogo_comp(void *bfad, void *uarg); 686 void bfa_cb_lps_cvl_event(void *bfad, void *uarg); 290 struct bfa_fcs_lport_s * bfa_fcs_get_base_port(struct bfa_fcs_s *fcs); 293 wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, int index, int nrports, enum bfa_boolean bwwn); 300 void bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port, struct bfa_lport_info_s *port_info); 307 enum bfa_port_speed bfa_fcs_lport_get_rport_max_speed(struct bfa_fcs_lport_s *port); 311 void bfa_fcs_lport_ms_init(struct bfa_fcs_lport_s *port); 312 void bfa_fcs_lport_ms_offline(struct bfa_fcs_lport_s *port); 313 void bfa_fcs_lport_ms_online(struct bfa_fcs_lport_s *port); 314 void bfa_fcs_lport_ms_fabric_rscn(struct bfa_fcs_lport_s *port); 317 void bfa_fcs_lport_fdmi_init(struct bfa_fcs_lport_ms_s *ms); 318 void bfa_fcs_lport_fdmi_offline(struct bfa_fcs_lport_ms_s *ms); 319 void bfa_fcs_lport_fdmi_online(struct bfa_fcs_lport_ms_s *ms); 330 struct bfa_fcs_rport_s * bfa_fcs_lport_get_rport_by_pid(struct bfa_fcs_lport_s *port, u32 pid); 332 struct bfa_fcs_rport_s * bfa_fcs_lport_get_rport_by_old_pid(struct bfa_fcs_lport_s *port, u32 pid); 336 struct bfa_fcs_rport_s * bfa_fcs_lport_get_rport_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t nwwn); 340 void bfa_fcs_lport_add_rport(struct bfa_fcs_lport_s *port, struct bfa_fcs_rport_s *rport); 342 void bfa_fcs_lport_del_rport(struct bfa_fcs_lport_s *port, struct bfa_fcs_rport_s *rport); 344 void bfa_fcs_lport_ns_init(struct bfa_fcs_lport_s *port); 345 void bfa_fcs_lport_ns_offline(struct bfa_fcs_lport_s *port); 346 void bfa_fcs_lport_ns_online(struct bfa_fcs_lport_s *port); 347 void bfa_fcs_lport_ns_query(struct bfa_fcs_lport_s *port); 348 void bfa_fcs_lport_ns_util_send_rspn_id(void *cbarg, struct bfa_fcxp_s *fcxp_alloced); 350 void bfa_fcs_lport_scn_init(struct bfa_fcs_lport_s *port); 351 void bfa_fcs_lport_scn_offline(struct bfa_fcs_lport_s *port); 352 void bfa_fcs_lport_fab_scn_online(struct bfa_fcs_lport_s *port); 353 void bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port, struct fchs_s *fchs, u32 len); 355 void bfa_fcs_lport_lip_scn_online(struct bfa_fcs_lport_s *port); 382 enum bfa_boolean bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport); 390 void bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport); 393 void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport); 396 void bfa_fcs_vport_stop_comp(struct bfa_fcs_vport_s *vport); 476 void bfa_fcs_rport_uf_recv(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs, u16 len); 478 void bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport); 480 struct bfa_fcs_rport_s * bfa_fcs_rport_create(struct bfa_fcs_lport_s *port, u32 rpid); 484 void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port, struct fchs_s *fchs, struct fc_logi_s *plogi); 487 void bfa_fcs_rport_plogi(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs, struct fc_logi_s *plogi); 493 int bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport); 494 struct bfa_fcs_rport_s * bfa_fcs_rport_create_by_wwn(struct bfa_fcs_lport_s *port, wwn_t rpwwn); 44 u32 fc_get_ctresp_pyld_len(u32 resp_len); 152 u16 fc_plogi_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size, u16 bb_cr); 156 enum fc_parse_status fc_plogi_parse(struct fchs_s *fchs); 167 u16 fc_rspnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, u8 *name); 169 u16 fc_rsnn_nn_build(struct fchs_s *fchs, void *pyld, u32 s_id, wwn_t node_name, u8 *name); 172 u16 fc_rftid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, enum bfa_lport_role roles); 179 u16 fc_rffid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, u8 fc4_type, u8 fc4_ftrs); 188 u16 fc_gs_rjt_build(struct fchs_s *fchs, struct ct_hdr_s *cthdr, u32 d_id, u32 s_id, u16 ox_id, u8 reason_code, u8 reason_code_expl); 192 u16 fc_scr_build(struct fchs_s *fchs, struct fc_scr_s *scr, u8 set_br_reg, u32 s_id, u16 ox_id); 213 u16 fc_ls_rjt_build(struct fchs_s *fchs, struct fc_ls_rjt_s *ls_rjt, u32 d_id, u32 s_id, __be16 ox_id, u8 reason_code, u8 reason_code_expl); 216 u16 fc_ls_acc_build(struct fchs_s *fchs, struct fc_els_cmd_s *els_cmd, u32 d_id, u32 s_id, __be16 ox_id); 231 u16 fc_rnid_acc_build(struct fchs_s *fchs, struct fc_rnid_acc_s *rnid_acc, u32 d_id, u32 s_id, __be16 ox_id, u32 data_format, struct fc_rnid_common_id_data_s *common_id_data, struct fc_rnid_general_topology_data_s *gen_topo_data); 244 u16 fc_gid_ft_build(struct fchs_s *fchs, void *pyld, u32 s_id, u8 fc4_type); 250 u16 fc_rnnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, wwn_t node_name); 268 u16 fc_fdmi_reqhdr_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 cmd_code); 270 u16 fc_gmal_req_build(struct fchs_s *fchs, void *pyld, u32 s_id, wwn_t wwn); 271 u16 fc_gfn_req_build(struct fchs_s *fchs, void *pyld, u32 s_id, wwn_t wwn); 273 void fc_get_fc4type_bitmask(u8 fc4_type, u8 *bit_mask); 288 u16 fc_ba_acc_build(struct fchs_s *fchs, struct fc_ba_acc_s *ba_acc, u32 d_id, u32 s_id, __be16 ox_id, u16 rx_id); 24 int __trc_fileno___7 = 2050; 32 const u8 loop_alpa_map[128U] = { 0U, 0U, 1U, 2U, 4U, 8U, 15U, 16U, 23U, 24U, 27U, 29U, 30U, 31U, 35U, 37U, 38U, 39U, 41U, 42U, 43U, 44U, 45U, 46U, 49U, 50U, 51U, 52U, 53U, 54U, 57U, 58U, 60U, 67U, 69U, 70U, 71U, 73U, 74U, 75U, 76U, 77U, 78U, 81U, 82U, 83U, 84U, 85U, 86U, 89U, 90U, 92U, 99U, 101U, 102U, 103U, 105U, 106U, 107U, 108U, 109U, 110U, 113U, 114U, 115U, 116U, 117U, 118U, 121U, 122U, 124U, 128U, 129U, 130U, 132U, 136U, 143U, 144U, 151U, 152U, 155U, 157U, 158U, 159U, 163U, 165U, 166U, 167U, 169U, 170U, 171U, 172U, 173U, 174U, 177U, 178U, 179U, 180U, 181U, 182U, 185U, 186U, 188U, 195U, 197U, 198U, 199U, 201U, 202U, 203U, 204U, 205U, 206U, 209U, 210U, 211U, 212U, 213U, 214U, 217U, 218U, 220U, 224U, 225U, 226U, 228U, 232U, 239U }; 54 void bfa_fcs_lport_send_ls_rjt(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, u8 reason_code, u8 reason_code_expl); 57 void bfa_fcs_lport_plogi(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, struct fc_logi_s *plogi); 59 void bfa_fcs_lport_online_actions(struct bfa_fcs_lport_s *port); 60 void bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port); 61 void bfa_fcs_lport_unknown_init(struct bfa_fcs_lport_s *port); 62 void bfa_fcs_lport_unknown_online(struct bfa_fcs_lport_s *port); 63 void bfa_fcs_lport_unknown_offline(struct bfa_fcs_lport_s *port); 64 void bfa_fcs_lport_deleted(struct bfa_fcs_lport_s *port); 65 void bfa_fcs_lport_echo(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, struct fc_echo_s *echo, u16 rx_len); 68 void bfa_fcs_lport_rnid(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, struct fc_rnid_cmd_s *rnid, u16 rx_len); 71 void bfa_fs_port_get_gen_topo_data(struct bfa_fcs_lport_s *port, struct fc_rnid_general_topology_data_s *gen_topo_data); 74 void bfa_fcs_lport_fab_init(struct bfa_fcs_lport_s *port); 75 void bfa_fcs_lport_fab_online(struct bfa_fcs_lport_s *port); 76 void bfa_fcs_lport_fab_offline(struct bfa_fcs_lport_s *port); 78 void bfa_fcs_lport_n2n_init(struct bfa_fcs_lport_s *port); 79 void bfa_fcs_lport_n2n_online(struct bfa_fcs_lport_s *port); 80 void bfa_fcs_lport_n2n_offline(struct bfa_fcs_lport_s *port); 82 void bfa_fcs_lport_loop_init(struct bfa_fcs_lport_s *port); 83 void bfa_fcs_lport_loop_online(struct bfa_fcs_lport_s *port); 84 void bfa_fcs_lport_loop_offline(struct bfa_fcs_lport_s *port); 90 struct __anonstruct___port_action_268 __port_action[4U] = { { &bfa_fcs_lport_unknown_init, &bfa_fcs_lport_unknown_online, &bfa_fcs_lport_unknown_offline }, { &bfa_fcs_lport_fab_init, &bfa_fcs_lport_fab_online, &bfa_fcs_lport_fab_offline }, { &bfa_fcs_lport_n2n_init, &bfa_fcs_lport_n2n_online, &bfa_fcs_lport_n2n_offline }, { &bfa_fcs_lport_loop_init, &bfa_fcs_lport_loop_online, &bfa_fcs_lport_loop_offline } }; 115 void bfa_fcs_lport_sm_uninit(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 117 void bfa_fcs_lport_sm_init(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 119 void bfa_fcs_lport_sm_online(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 121 void bfa_fcs_lport_sm_offline(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 123 void bfa_fcs_lport_sm_deleting(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 125 void bfa_fcs_lport_sm_stopping(struct bfa_fcs_lport_s *port, enum bfa_fcs_lport_event event); 349 void bfa_fcs_lport_aen_post(struct bfa_fcs_lport_s *port, enum bfa_lport_aen_event event); 402 void bfa_fcs_lport_send_fcgs_rjt(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, u8 reason_code, u8 reason_code_expl); 720 void bfa_fcs_lport_abts_acc(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs); 1283 void bfa_fcport_get_loop_attr(struct bfa_fcs_lport_s *port); 1379 void bfa_fcs_lport_fdmi_send_rhba(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced); 1381 void bfa_fcs_lport_fdmi_send_rprt(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced); 1383 void bfa_fcs_lport_fdmi_send_rpa(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced); 1385 void bfa_fcs_lport_fdmi_rhba_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 1392 void bfa_fcs_lport_fdmi_rprt_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 1399 void bfa_fcs_lport_fdmi_rpa_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 1406 void bfa_fcs_lport_fdmi_timeout(void *arg); 1407 u16 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld); 1409 u16 bfa_fcs_lport_fdmi_build_rprt_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld); 1411 u16 bfa_fcs_lport_fdmi_build_rpa_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld); 1413 u16 bfa_fcs_lport_fdmi_build_portattr_block(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld); 1415 void bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_lport_fdmi_s *fdmi, struct bfa_fcs_fdmi_hba_attr_s *hba_attr); 1417 void bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi, struct bfa_fcs_fdmi_port_attr_s *port_attr); 1419 u32 bfa_fcs_fdmi_convert_speed(enum bfa_port_speed pport_speed); 1439 void bfa_fcs_lport_fdmi_sm_offline(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1441 void bfa_fcs_lport_fdmi_sm_sending_rhba(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1444 void bfa_fcs_lport_fdmi_sm_rhba(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1446 void bfa_fcs_lport_fdmi_sm_rhba_retry(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1449 void bfa_fcs_lport_fdmi_sm_sending_rprt(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1452 void bfa_fcs_lport_fdmi_sm_rprt(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1454 void bfa_fcs_lport_fdmi_sm_rprt_retry(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1457 void bfa_fcs_lport_fdmi_sm_sending_rpa(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1460 void bfa_fcs_lport_fdmi_sm_rpa(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1462 void bfa_fcs_lport_fdmi_sm_rpa_retry(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1465 void bfa_fcs_lport_fdmi_sm_online(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 1467 void bfa_fcs_lport_fdmi_sm_disabled(struct bfa_fcs_lport_fdmi_s *fdmi, enum port_fdmi_event event); 2821 void bfa_fcs_lport_ms_send_plogi(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced); 2823 void bfa_fcs_lport_ms_timeout(void *arg); 2824 void bfa_fcs_lport_ms_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 2832 void bfa_fcs_lport_ms_send_gmal(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced); 2834 void bfa_fcs_lport_ms_gmal_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 2841 void bfa_fcs_lport_ms_send_gfn(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced); 2843 void bfa_fcs_lport_ms_gfn_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 2867 void bfa_fcs_lport_ms_sm_offline(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2869 void bfa_fcs_lport_ms_sm_plogi_sending(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2871 void bfa_fcs_lport_ms_sm_plogi(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2873 void bfa_fcs_lport_ms_sm_plogi_retry(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2875 void bfa_fcs_lport_ms_sm_gmal_sending(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2877 void bfa_fcs_lport_ms_sm_gmal(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2879 void bfa_fcs_lport_ms_sm_gmal_retry(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2881 void bfa_fcs_lport_ms_sm_gfn_sending(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2883 void bfa_fcs_lport_ms_sm_gfn(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2885 void bfa_fcs_lport_ms_sm_gfn_retry(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 2887 void bfa_fcs_lport_ms_sm_online(struct bfa_fcs_lport_ms_s *ms, enum port_ms_event event); 3562 void bfa_fcs_lport_ns_send_plogi(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3564 void bfa_fcs_lport_ns_send_rspn_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3566 void bfa_fcs_lport_ns_send_rft_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3568 void bfa_fcs_lport_ns_send_rff_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3570 void bfa_fcs_lport_ns_send_gid_ft(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3572 void bfa_fcs_lport_ns_send_rnn_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3574 void bfa_fcs_lport_ns_send_rsnn_nn(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3576 void bfa_fcs_lport_ns_timeout(void *arg); 3577 void bfa_fcs_lport_ns_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3584 void bfa_fcs_lport_ns_rspn_id_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3591 void bfa_fcs_lport_ns_rft_id_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3598 void bfa_fcs_lport_ns_rff_id_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3605 void bfa_fcs_lport_ns_gid_ft_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3612 void bfa_fcs_lport_ns_rnn_id_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3619 void bfa_fcs_lport_ns_rsnn_nn_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3626 void bfa_fcs_lport_ns_process_gidft_pids(struct bfa_fcs_lport_s *port, u32 *pid_buf, u32 n_pids); 3630 void bfa_fcs_lport_ns_boot_target_disc(struct bfa_fcs_lport_s *port); 3654 void bfa_fcs_lport_ns_sm_offline(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3656 void bfa_fcs_lport_ns_sm_plogi_sending(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3658 void bfa_fcs_lport_ns_sm_plogi(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3660 void bfa_fcs_lport_ns_sm_plogi_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3662 void bfa_fcs_lport_ns_sm_sending_rspn_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3665 void bfa_fcs_lport_ns_sm_rspn_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3667 void bfa_fcs_lport_ns_sm_rspn_id_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3669 void bfa_fcs_lport_ns_sm_sending_rft_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3672 void bfa_fcs_lport_ns_sm_rft_id_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3674 void bfa_fcs_lport_ns_sm_rft_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3676 void bfa_fcs_lport_ns_sm_sending_rff_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3679 void bfa_fcs_lport_ns_sm_rff_id_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3681 void bfa_fcs_lport_ns_sm_rff_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3683 void bfa_fcs_lport_ns_sm_sending_gid_ft(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3686 void bfa_fcs_lport_ns_sm_gid_ft(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3688 void bfa_fcs_lport_ns_sm_gid_ft_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3690 void bfa_fcs_lport_ns_sm_online(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3692 void bfa_fcs_lport_ns_sm_sending_rnn_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3695 void bfa_fcs_lport_ns_sm_rnn_id(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3697 void bfa_fcs_lport_ns_sm_rnn_id_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3699 void bfa_fcs_lport_ns_sm_sending_rsnn_nn(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3702 void bfa_fcs_lport_ns_sm_rsnn_nn(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 3704 void bfa_fcs_lport_ns_sm_rsnn_nn_retry(struct bfa_fcs_lport_ns_s *ns, enum vport_ns_event event); 5227 void bfa_fcs_lport_scn_send_scr(void *scn_cbarg, struct bfa_fcxp_s *fcxp_alloced); 5229 void bfa_fcs_lport_scn_scr_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 5236 void bfa_fcs_lport_scn_send_ls_acc(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs); 5238 void bfa_fcs_lport_scn_timeout(void *arg); 5256 void bfa_fcs_lport_scn_sm_offline(struct bfa_fcs_lport_scn_s *scn, enum port_scn_event event); 5258 void bfa_fcs_lport_scn_sm_sending_scr(struct bfa_fcs_lport_scn_s *scn, enum port_scn_event event); 5261 void bfa_fcs_lport_scn_sm_scr(struct bfa_fcs_lport_scn_s *scn, enum port_scn_event event); 5263 void bfa_fcs_lport_scn_sm_scr_retry(struct bfa_fcs_lport_scn_s *scn, enum port_scn_event event); 5265 void bfa_fcs_lport_scn_sm_online(struct bfa_fcs_lport_scn_s *scn, enum port_scn_event event); 5548 void bfa_fcs_lport_scn_portid_rscn(struct bfa_fcs_lport_s *port, u32 rpid); 5601 void bfa_fcs_lport_scn_multiport_rscn(struct bfa_fcs_lport_s *port, enum fc_rscn_format format, u32 rscn_pid); 5985 void bfa_fcs_vport_do_fdisc(struct bfa_fcs_vport_s *vport); 5986 void bfa_fcs_vport_timeout(void *vport_arg); 5987 void bfa_fcs_vport_do_logo(struct bfa_fcs_vport_s *vport); 5988 void bfa_fcs_vport_free(struct bfa_fcs_vport_s *vport); 6015 void bfa_fcs_vport_sm_uninit(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6017 void bfa_fcs_vport_sm_created(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6019 void bfa_fcs_vport_sm_offline(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6021 void bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6023 void bfa_fcs_vport_sm_fdisc_retry(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6025 void bfa_fcs_vport_sm_fdisc_rsp_wait(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6027 void bfa_fcs_vport_sm_online(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6029 void bfa_fcs_vport_sm_deleting(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6031 void bfa_fcs_vport_sm_cleanup(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6033 void bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6035 void bfa_fcs_vport_sm_error(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6037 void bfa_fcs_vport_sm_stopping(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6039 void bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport, enum bfa_fcs_vport_event event); 6042 struct bfa_sm_table_s vport_sm_table[11U] = { { (void (*)(void *, int))(&bfa_fcs_vport_sm_uninit), 0, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_created), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_offline), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_fdisc), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_fdisc_retry), 4, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_fdisc_rsp_wait), 5, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_online), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_deleting), 7, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_cleanup), 8, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_logo), 10, 0 }, { (void (*)(void *, int))(&bfa_fcs_vport_sm_error), 11, 0 } }; 6490 void bfa_fcs_vport_aen_post(struct bfa_fcs_lport_s *port, enum bfa_lport_aen_event event); 6524 void bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport); 328 void wwn2str___3(char *wwn_str, u64 wwn); 582 struct bfa_rport_s * bfa_rport_create(struct bfa_s *bfa, void *rport_drv); 583 void bfa_rport_online(struct bfa_rport_s *rport, struct bfa_rport_info_s *rport_info); 586 void bfa_cb_rport_online(void *cbarg); 587 void bfa_cb_rport_offline(void *cbarg); 588 void bfa_cb_rport_qos_scn_flowid(void *cbarg, struct bfa_rport_qos_attr_s old_qos_attr, struct bfa_rport_qos_attr_s new_qos_attr); 591 void bfa_cb_rport_scn_online(struct bfa_s *bfa); 592 void bfa_cb_rport_scn_offline(struct bfa_s *bfa); 593 void bfa_cb_rport_scn_no_dev(void *rport); 594 void bfa_cb_rport_qos_scn_prio(void *cbarg, struct bfa_rport_qos_attr_s old_qos_attr, struct bfa_rport_qos_attr_s new_qos_attr); 472 struct bfa_fcs_rport_s * bfa_fcs_rport_lookup_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t rnwwn); 482 void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *fchs, struct fc_logi_s *plogi); 489 void bfa_fcs_rport_prlo(struct bfa_fcs_rport_s *rport, __be16 ox_id); 496 void bfa_fcs_rpf_init(struct bfa_fcs_rport_s *rport); 497 void bfa_fcs_rpf_rport_online(struct bfa_fcs_rport_s *rport); 498 void bfa_fcs_rpf_rport_offline(struct bfa_fcs_rport_s *rport); 606 struct bfa_fcs_itnim_s * bfa_fcs_itnim_create(struct bfa_fcs_rport_s *rport); 607 void bfa_fcs_itnim_delete(struct bfa_fcs_itnim_s *itnim); 608 void bfa_fcs_itnim_rport_offline(struct bfa_fcs_itnim_s *itnim); 609 void bfa_fcs_itnim_brp_online(struct bfa_fcs_itnim_s *itnim); 610 enum bfa_status bfa_fcs_itnim_get_online_state(struct bfa_fcs_itnim_s *itnim); 611 void bfa_fcs_itnim_is_initiator(struct bfa_fcs_itnim_s *itnim); 612 void bfa_fcs_fcpim_uf_recv(struct bfa_fcs_itnim_s *itnim, struct fchs_s *fchs, u16 len); 53 enum bfa_port_speed fc_rpsc_operspeed_to_bfa_speed(enum fc_rpsc_op_speed speed); 84 enum fc_rpsc_op_speed fc_bfa_speed_to_rpsc_operspeed(enum bfa_port_speed op_speed); 182 u16 fc_gidpn_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, wwn_t port_name); 185 u16 fc_gpnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, u32 port_id); 195 u16 fc_plogi_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size, u16 bb_cr); 200 u16 fc_adisc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name); 207 enum fc_parse_status fc_adisc_rsp_parse(struct fc_adisc_s *adisc, int len, wwn_t port_name, wwn_t node_name); 210 u16 fc_adisc_acc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name); 223 u16 fc_prli_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, __be16 ox_id, enum bfa_lport_role role); 237 u16 fc_rpsc2_build(struct fchs_s *fchs, struct fc_rpsc2_cmd_s *rpsc2, u32 d_id, u32 s_id, u32 *pid_list, u16 npids); 241 u16 fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc, u32 d_id, u32 s_id, __be16 ox_id, struct fc_rpsc_speed_info_s *oper_speed); 262 u16 fc_logo_build(struct fchs_s *fchs, struct fc_logo_s *logo, u32 d_id, u32 s_id, u16 ox_id, wwn_t port_name); 265 u16 fc_logo_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, __be16 ox_id); 296 u16 fc_prlo_acc_build(struct fchs_s *fchs, struct fc_prlo_acc_s *prlo_acc, u32 d_id, u32 s_id, __be16 ox_id, int num_pages); 27 int __trc_fileno___8 = 2051; 30 unsigned int bfa_fcs_rport_del_timeout = 90000U; 36 unsigned int bfa_fcs_rport_max_logins = 1024U; 41 struct bfa_fcs_rport_s * bfa_fcs_rport_alloc(struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 rpid); 43 void bfa_fcs_rport_free(struct bfa_fcs_rport_s *rport); 44 void bfa_fcs_rport_hal_online(struct bfa_fcs_rport_s *rport); 45 void bfa_fcs_rport_fcs_online_action(struct bfa_fcs_rport_s *rport); 46 void bfa_fcs_rport_hal_online_action(struct bfa_fcs_rport_s *rport); 47 void bfa_fcs_rport_fcs_offline_action(struct bfa_fcs_rport_s *rport); 48 void bfa_fcs_rport_hal_offline_action(struct bfa_fcs_rport_s *rport); 49 void bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi); 51 void bfa_fcs_rport_timeout(void *arg); 52 void bfa_fcs_rport_send_plogi(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced); 54 void bfa_fcs_rport_send_plogiacc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced); 56 void bfa_fcs_rport_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 60 void bfa_fcs_rport_send_adisc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced); 62 void bfa_fcs_rport_adisc_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 66 void bfa_fcs_rport_send_nsdisc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced); 68 void bfa_fcs_rport_gidpn_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 72 void bfa_fcs_rport_gpnid_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 76 void bfa_fcs_rport_send_logo(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced); 78 void bfa_fcs_rport_send_logo_acc(void *rport_cbarg); 79 void bfa_fcs_rport_process_prli(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs, u16 len); 81 void bfa_fcs_rport_send_ls_rjt(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs, u8 reason_code, u8 reason_code_expl); 84 void bfa_fcs_rport_process_adisc(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs, u16 len); 86 void bfa_fcs_rport_send_prlo_acc(struct bfa_fcs_rport_s *rport); 87 void bfa_fcs_rport_hal_offline(struct bfa_fcs_rport_s *rport); 89 void bfa_fcs_rport_sm_uninit(struct bfa_fcs_rport_s *rport, enum rport_event event); 91 void bfa_fcs_rport_sm_plogi_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 93 void bfa_fcs_rport_sm_plogiacc_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 95 void bfa_fcs_rport_sm_plogi_retry(struct bfa_fcs_rport_s *rport, enum rport_event event); 97 void bfa_fcs_rport_sm_plogi(struct bfa_fcs_rport_s *rport, enum rport_event event); 99 void bfa_fcs_rport_sm_fc4_fcs_online(struct bfa_fcs_rport_s *rport, enum rport_event event); 101 void bfa_fcs_rport_sm_hal_online(struct bfa_fcs_rport_s *rport, enum rport_event event); 103 void bfa_fcs_rport_sm_online(struct bfa_fcs_rport_s *rport, enum rport_event event); 105 void bfa_fcs_rport_sm_nsquery_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 107 void bfa_fcs_rport_sm_nsquery(struct bfa_fcs_rport_s *rport, enum rport_event event); 109 void bfa_fcs_rport_sm_adisc_online_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 111 void bfa_fcs_rport_sm_adisc_online(struct bfa_fcs_rport_s *rport, enum rport_event event); 113 void bfa_fcs_rport_sm_adisc_offline_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 115 void bfa_fcs_rport_sm_adisc_offline(struct bfa_fcs_rport_s *rport, enum rport_event event); 117 void bfa_fcs_rport_sm_fc4_logorcv(struct bfa_fcs_rport_s *rport, enum rport_event event); 119 void bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport, enum rport_event event); 121 void bfa_fcs_rport_sm_fc4_offline(struct bfa_fcs_rport_s *rport, enum rport_event event); 123 void bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport, enum rport_event event); 125 void bfa_fcs_rport_sm_hcb_logorcv(struct bfa_fcs_rport_s *rport, enum rport_event event); 127 void bfa_fcs_rport_sm_hcb_logosend(struct bfa_fcs_rport_s *rport, enum rport_event event); 129 void bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 131 void bfa_fcs_rport_sm_offline(struct bfa_fcs_rport_s *rport, enum rport_event event); 133 void bfa_fcs_rport_sm_nsdisc_sending(struct bfa_fcs_rport_s *rport, enum rport_event event); 135 void bfa_fcs_rport_sm_nsdisc_retry(struct bfa_fcs_rport_s *rport, enum rport_event event); 137 void bfa_fcs_rport_sm_nsdisc_sent(struct bfa_fcs_rport_s *rport, enum rport_event event); 141 void bfa_fcs_rport_sm_fc4_off_delete(struct bfa_fcs_rport_s *rport, enum rport_event event); 143 void bfa_fcs_rport_sm_delete_pending(struct bfa_fcs_rport_s *rport, enum rport_event event); 146 struct bfa_sm_table_s rport_sm_table[25U] = { { (void (*)(void *, int))(&bfa_fcs_rport_sm_uninit), 0, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_plogi_sending), 2, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_plogiacc_sending), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_plogi_retry), 4, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_plogi), 2, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_fc4_fcs_online), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_hal_online), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_online), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_nsquery_sending), 5, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_nsquery), 5, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_adisc_online_sending), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_adisc_online), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_adisc_offline_sending), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_adisc_offline), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_fc4_logorcv), 8, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_fc4_logosend), 7, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_fc4_offline), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_hcb_offline), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_hcb_logorcv), 8, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_hcb_logosend), 7, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_logo_sending), 7, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_offline), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_nsdisc_sending), 9, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_nsdisc_retry), 9, 0 }, { (void (*)(void *, int))(&bfa_fcs_rport_sm_nsdisc_sent), 9, 0 } }; 2212 void bfa_fcs_rport_process_rpsc(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs, u16 len); 2406 void bfa_fcs_rport_aen_post(struct bfa_fcs_rport_s *rport, enum bfa_rport_aen_event event, struct bfa_rport_aen_data_s *data); 2589 void bfa_fcs_rport_process_logo(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs); 3113 void bfa_fcs_rpf_send_rpsc2(void *rpf_cbarg, struct bfa_fcxp_s *fcxp_alloced); 3115 void bfa_fcs_rpf_rpsc2_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 3123 void bfa_fcs_rpf_timeout(void *arg); 3139 void bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 3141 void bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 3143 void bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 3145 void bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 3147 void bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 3149 void bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf, enum rpf_event event); 328 void wwn2str___4(char *wwn_str, u64 wwn); 331 struct bfa_itnim_s * bfa_itnim_create(struct bfa_s *bfa, struct bfa_rport_s *rport, void *ditn); 333 void bfa_itnim_delete(struct bfa_itnim_s *itnim); 334 void bfa_itnim_online(struct bfa_itnim_s *itnim, enum bfa_boolean seq_rec); 335 void bfa_itnim_offline(struct bfa_itnim_s *itnim); 345 void bfa_cb_itnim_online(void *cbarg); 350 void bfa_cb_itnim_offline(void *cb_arg); 351 void bfa_cb_itnim_tov_begin(void *cb_arg); 352 void bfa_cb_itnim_tov(void *cb_arg); 360 void bfa_cb_itnim_sler(void *cb_arg); 218 u16 fc_prli_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, u16 ox_id); 221 enum fc_parse_status fc_prli_rsp_parse(struct fc_prli_s *prli, int len); 27 int __trc_fileno___9 = 2052; 32 void bfa_fcs_itnim_timeout(void *arg); 33 void bfa_fcs_itnim_free(struct bfa_fcs_itnim_s *itnim); 34 void bfa_fcs_itnim_send_prli(void *itnim_cbarg, struct bfa_fcxp_s *fcxp_alloced); 36 void bfa_fcs_itnim_prli_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 40 void bfa_fcs_itnim_aen_post(struct bfa_fcs_itnim_s *itnim, enum bfa_itnim_aen_event event); 43 void bfa_fcs_itnim_sm_offline(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 45 void bfa_fcs_itnim_sm_prli_send(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 47 void bfa_fcs_itnim_sm_prli(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 49 void bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 51 void bfa_fcs_itnim_sm_hcb_online(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 53 void bfa_fcs_itnim_sm_hal_rport_online(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 55 void bfa_fcs_itnim_sm_online(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 57 void bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 59 void bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim, enum bfa_fcs_itnim_event event); 62 struct bfa_sm_table_s itnim_sm_table[8U] = { { (void (*)(void *, int))(&bfa_fcs_itnim_sm_offline), 0, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_prli_send), 1, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_prli), 2, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_prli_retry), 3, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_hcb_online), 4, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_online), 5, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_hcb_offline), 6, 0 }, { (void (*)(void *, int))(&bfa_fcs_itnim_sm_initiator), 7, 0 } }; 137 u16 fc_flogi_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size, u8 set_npiv, u8 set_auth, u16 local_bb_credits); 142 u16 fc_fdisc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size); 158 u16 fc_abts_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id); 161 enum fc_parse_status fc_abts_rsp_parse(struct fchs_s *fchs, int len); 163 u16 fc_rrq_build(struct fchs_s *fchs, struct fc_rrq_s *rrq, u32 d_id, u32 s_id, u16 ox_id, u16 rrq_oxid); 165 enum fc_parse_status fc_rrq_rsp_parse(struct fchs_s *fchs, int len); 175 u16 fc_rftid_build_sol(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, u8 *fc4_bitmap, u32 bitmap_size); 204 enum fc_parse_status fc_adisc_parse(struct fchs_s *fchs, void *pld, u32 host_dap, wwn_t node_name, wwn_t port_name); 227 u16 fc_rnid_build(struct fchs_s *fchs, struct fc_rnid_cmd_s *rnid, u32 d_id, u32 s_id, u16 ox_id, u32 data_format); 239 u16 fc_rpsc_build(struct fchs_s *fchs, struct fc_rpsc_cmd_s *rpsc, u32 d_id, u32 s_id, u16 ox_id); 247 u16 fc_rpnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, wwn_t port_name); 253 u16 fc_rcsid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, u32 cos); 256 u16 fc_rptid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, u8 port_type); 259 u16 fc_ganxt_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id); 275 void fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id); 278 enum fc_parse_status fc_els_rsp_parse(struct fchs_s *fchs, int len); 280 enum fc_parse_status fc_plogi_rsp_parse(struct fchs_s *fchs, int len, wwn_t port_name); 283 enum fc_parse_status fc_prli_parse(struct fc_prli_s *prli); 285 enum fc_parse_status fc_pdisc_parse(struct fchs_s *fchs, wwn_t node_name, wwn_t port_name); 291 int fc_logout_params_pages(struct fchs_s *fc_frame, u8 els_code); 293 u16 fc_tprlo_acc_build(struct fchs_s *fchs, struct fc_tprlo_acc_s *tprlo_acc, u32 d_id, u32 s_id, __be16 ox_id, int num_pages); 299 u16 fc_logo_rsp_parse(struct fchs_s *fchs, int len); 301 u16 fc_pdisc_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size); 305 u16 fc_pdisc_rsp_parse(struct fchs_s *fchs, int len, wwn_t port_name); 307 u16 fc_prlo_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, int num_pages); 310 u16 fc_prlo_rsp_parse(struct fchs_s *fchs, int len); 312 u16 fc_tprlo_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, int num_pages, enum fc_tprlo_type tprlo_type, u32 tpr_id); 316 u16 fc_tprlo_rsp_parse(struct fchs_s *fchs, int len); 318 u16 fc_ba_rjt_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id, u32 reason_code, u32 reason_expl); 321 u16 fc_gnnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, u32 port_id); 324 u16 fc_ct_rsp_parse(struct ct_hdr_s *cthdr); 326 u16 fc_rscn_build(struct fchs_s *fchs, struct fc_rscn_pl_s *rscn, u32 s_id, u16 ox_id); 27 void fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id); 29 void fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id); 31 struct fchs_s fc_els_req_tmpl = { }; 32 struct fchs_s fc_els_rsp_tmpl = { }; 33 struct fchs_s fc_bls_req_tmpl = { }; 34 struct fchs_s fc_bls_rsp_tmpl = { }; 35 struct fc_ba_acc_s ba_acc_tmpl = { }; 36 struct fc_logi_s plogi_tmpl = { }; 37 struct fc_prli_s prli_tmpl = { }; 38 struct fc_rrq_s rrq_tmpl = { }; 39 struct fchs_s fcp_fchs_tmpl = { }; 137 void fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id); 159 void fc_gsresp_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id); 223 u16 fc_plogi_x_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name, u16 pdu_size, u16 bb_cr, u8 els_code); 482 u16 fc_adisc_x_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name, u8 els_code); 1029 void fc_gs_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code); 1039 void fc_gs_fdmi_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code); 1049 void fc_gs_ms_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code, u8 sub_type); 54 void bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod); 56 void bfa_port_notify(void *arg, enum bfa_ioc_event_e event); 67 u32 bfa_port_meminfo(); 68 void bfa_port_mem_claim(struct bfa_port_s *port, u8 *dma_kva, u64 dma_pa); 70 void bfa_port_set_dportenabled(struct bfa_port_s *port, enum bfa_boolean enabled); 113 u32 bfa_cee_meminfo(); 114 void bfa_cee_mem_claim(struct bfa_cee_s *cee, u8 *dma_kva, u64 dma_pa); 115 void bfa_cee_attach(struct bfa_cee_s *cee, struct bfa_ioc_s *ioc, void *dev); 25 int __trc_fileno___10 = 4097; 28 void bfa_port_stats_swap(struct bfa_port_s *port, union bfa_port_stats_u *stats); 58 void bfa_port_enable_isr(struct bfa_port_s *port, enum bfa_status status); 75 void bfa_port_disable_isr(struct bfa_port_s *port, enum bfa_status status); 92 void bfa_port_get_stats_isr(struct bfa_port_s *port, enum bfa_status status); 124 void bfa_port_clear_stats_isr(struct bfa_port_s *port, enum bfa_status status); 152 void bfa_port_isr(void *cbarg, struct bfi_mbmsg_s *m); 532 void bfa_cee_get_attr_isr(struct bfa_cee_s *cee, enum bfa_status status); 564 void bfa_cee_get_stats_isr(struct bfa_cee_s *cee, enum bfa_status status); 600 void bfa_cee_reset_stats_isr(struct bfa_cee_s *cee, enum bfa_status status); 776 void bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m); 812 void bfa_cee_notify(void *arg, enum bfa_ioc_event_e event); 274 void __list_splice(const struct list_head *list, struct list_head *prev, struct list_head *next); 336 void list_splice_tail_init(struct list_head *list, struct list_head *head); 224 struct scatterlist * sg_next(struct scatterlist *); 176 struct scatterlist * scsi_sglist(struct scsi_cmnd *cmd); 97 void bfa_reqq_winit(struct bfa_reqq_wait_s *wqe, void (*qresume)(void *), void *cbarg); 311 void bfa_iocfc_set_snsbase(struct bfa_s *bfa, int seg_no, u64 snsbase_pa); 74 enum bfa_status bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs); 76 void bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg); 77 void bfa_sgpg_winit(struct bfa_sgpg_wqe_s *wqe, void (*cbfn)(void *), void *cbarg); 79 void bfa_sgpg_wait(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe, int nsgpg); 80 void bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe); 604 void bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); 41 void bfa_itn_create(struct bfa_s *bfa, struct bfa_rport_s *rport, void (*isr)(struct bfa_s *, struct bfi_msg_s *)); 43 void bfa_itn_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 44 void bfa_iotag_attach(struct bfa_fcp_mod_s *fcp); 45 void bfa_fcp_res_recfg(struct bfa_s *bfa, u16 num_ioim_fw, u16 max_ioim_fw); 79 u32 bfa_ioim_get_index(u32 n); 266 enum bfa_boolean bfa_ioim_maxretry_reached(struct bfa_ioim_s *ioim); 277 void bfa_ioim_attach(struct bfa_fcpim_s *fcpim); 278 void bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 279 void bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 281 void bfa_ioim_cleanup(struct bfa_ioim_s *ioim); 282 void bfa_ioim_cleanup_tm(struct bfa_ioim_s *ioim, struct bfa_tskim_s *tskim); 284 void bfa_ioim_iocdisable(struct bfa_ioim_s *ioim); 285 void bfa_ioim_tov(struct bfa_ioim_s *ioim); 287 void bfa_tskim_attach(struct bfa_fcpim_s *fcpim); 288 void bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 289 void bfa_tskim_iodone(struct bfa_tskim_s *tskim); 290 void bfa_tskim_iocdisable(struct bfa_tskim_s *tskim); 291 void bfa_tskim_cleanup(struct bfa_tskim_s *tskim); 292 void bfa_tskim_res_recfg(struct bfa_s *bfa, u16 num_tskim_fw); 294 void bfa_itnim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len); 295 void bfa_itnim_attach(struct bfa_fcpim_s *fcpim); 296 void bfa_itnim_iocdisable(struct bfa_itnim_s *itnim); 297 void bfa_itnim_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 298 void bfa_itnim_iodone(struct bfa_itnim_s *itnim); 299 void bfa_itnim_tskdone(struct bfa_itnim_s *itnim); 300 enum bfa_boolean bfa_itnim_hold_io(struct bfa_itnim_s *itnim); 307 u16 bfa_fcpim_qdepth_get(struct bfa_s *bfa); 370 void bfa_ioim_free(struct bfa_ioim_s *ioim); 373 void bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, enum bfa_boolean iotov); 407 void bfa_tskim_free(struct bfa_tskim_s *tskim); 414 void bfa_fcpim_lunmask_rp_update(struct bfa_s *bfa, wwn_t lp_wwn, wwn_t rp_wwn, u16 rp_tag, u8 lp_tag); 423 u16 bfa_fcpim_read_throttle(struct bfa_s *bfa); 424 enum bfa_status bfa_fcpim_write_throttle(struct bfa_s *bfa, u16 value); 427 u16 bfa_fcpim_get_throttle_cfg(struct bfa_s *bfa, u16 drv_cfg_param); 136 struct bfa_module_s hal_mod_fcp; 21 int __trc_fileno___11 = 1027; 26 void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim); 27 void bfa_ioim_lm_init(struct bfa_s *bfa); 167 void bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim); 168 enum bfa_boolean bfa_itnim_send_fwcreate(struct bfa_itnim_s *itnim); 169 enum bfa_boolean bfa_itnim_send_fwdelete(struct bfa_itnim_s *itnim); 170 void bfa_itnim_cleanp_comp(void *itnim_cbarg); 171 void bfa_itnim_cleanup(struct bfa_itnim_s *itnim); 172 void __bfa_cb_itnim_online(void *cbarg, enum bfa_boolean complete___0); 173 void __bfa_cb_itnim_offline(void *cbarg, enum bfa_boolean complete___0); 174 void __bfa_cb_itnim_sler(void *cbarg, enum bfa_boolean complete___0); 175 void bfa_itnim_iotov_online(struct bfa_itnim_s *itnim); 176 void bfa_itnim_iotov_cleanup(struct bfa_itnim_s *itnim); 177 void bfa_itnim_iotov(void *itnim_arg); 178 void bfa_itnim_iotov_start(struct bfa_itnim_s *itnim); 179 void bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim); 180 void bfa_itnim_iotov_delete(struct bfa_itnim_s *itnim); 185 void bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 187 void bfa_itnim_sm_created(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 189 void bfa_itnim_sm_fwcreate(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 191 void bfa_itnim_sm_delete_pending(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 193 void bfa_itnim_sm_online(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 195 void bfa_itnim_sm_sler(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 197 void bfa_itnim_sm_cleanup_offline(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 199 void bfa_itnim_sm_cleanup_delete(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 201 void bfa_itnim_sm_fwdelete(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 203 void bfa_itnim_sm_offline(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 205 void bfa_itnim_sm_iocdisable(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 207 void bfa_itnim_sm_deleting(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 209 void bfa_itnim_sm_fwcreate_qfull(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 211 void bfa_itnim_sm_fwdelete_qfull(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 213 void bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim, enum bfa_itnim_event event); 219 enum bfa_boolean bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim); 220 enum bfa_boolean bfa_ioim_sgpg_alloc(struct bfa_ioim_s *ioim); 221 enum bfa_boolean bfa_ioim_send_abort(struct bfa_ioim_s *ioim); 222 void bfa_ioim_notify_cleanup(struct bfa_ioim_s *ioim); 223 void __bfa_cb_ioim_good_comp(void *cbarg, enum bfa_boolean complete___0); 224 void __bfa_cb_ioim_comp(void *cbarg, enum bfa_boolean complete___0); 225 void __bfa_cb_ioim_abort(void *cbarg, enum bfa_boolean complete___0); 226 void __bfa_cb_ioim_failed(void *cbarg, enum bfa_boolean complete___0); 227 void __bfa_cb_ioim_pathtov(void *cbarg, enum bfa_boolean complete___0); 228 enum bfa_boolean bfa_ioim_is_abortable(struct bfa_ioim_s *ioim); 233 void bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 235 void bfa_ioim_sm_sgalloc(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 237 void bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 239 void bfa_ioim_sm_abort(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 241 void bfa_ioim_sm_cleanup(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 243 void bfa_ioim_sm_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 245 void bfa_ioim_sm_abort_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 247 void bfa_ioim_sm_cleanup_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 249 void bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 251 void bfa_ioim_sm_hcb_free(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 253 void bfa_ioim_sm_resfree(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 255 void bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event); 260 void __bfa_cb_tskim_done(void *cbarg, enum bfa_boolean complete___0); 261 void __bfa_cb_tskim_failed(void *cbarg, enum bfa_boolean complete___0); 262 enum bfa_boolean bfa_tskim_match_scope(struct bfa_tskim_s *tskim, struct scsi_lun lun); 264 void bfa_tskim_gather_ios(struct bfa_tskim_s *tskim); 265 void bfa_tskim_cleanp_comp(void *tskim_cbarg); 266 void bfa_tskim_cleanup_ios(struct bfa_tskim_s *tskim); 267 enum bfa_boolean bfa_tskim_send(struct bfa_tskim_s *tskim); 268 enum bfa_boolean bfa_tskim_send_abort(struct bfa_tskim_s *tskim); 269 void bfa_tskim_iocdisable_ios(struct bfa_tskim_s *tskim); 274 void bfa_tskim_sm_uninit(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 276 void bfa_tskim_sm_active(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 278 void bfa_tskim_sm_cleanup(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 280 void bfa_tskim_sm_iocleanup(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 282 void bfa_tskim_sm_qfull(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 284 void bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 286 void bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim, enum bfa_tskim_event event); 296 void bfa_fcpim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len); 316 void bfa_fcpim_attach(struct bfa_fcp_mod_s *fcp, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 342 void bfa_fcpim_iocdisable(struct bfa_fcp_mod_s *fcp); 448 void bfa_ioim_profile_comp(struct bfa_ioim_s *ioim); 465 void bfa_ioim_profile_start(struct bfa_ioim_s *ioim); 1081 void bfa_itnim_qresume(void *cbarg); 1216 void bfa_itnim_delayed_comp(struct bfa_itnim_s *itnim, enum bfa_boolean iotov); 2207 void bfa_ioim_lm_set_ua(struct bfa_s *bfa); 2442 void bfa_ioim_sgpg_alloced(void *cbarg); 2671 void bfa_ioim_qresume(void *cbarg); 3456 void bfa_tskim_qresume(void *cbarg); 3638 void bfa_fcp_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 3638 void bfa_fcp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 3638 void bfa_fcp_detach(struct bfa_s *bfa); 3638 void bfa_fcp_start(struct bfa_s *bfa); 3638 void bfa_fcp_stop(struct bfa_s *bfa); 3638 void bfa_fcp_iocdisable(struct bfa_s *bfa); 3638 struct bfa_module_s hal_mod_fcp = { &bfa_fcp_meminfo, &bfa_fcp_attach, &bfa_fcp_detach, &bfa_fcp_start, &bfa_fcp_stop, &bfa_fcp_iocdisable }; 35 void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m); 301 void bfa_iocfc_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_s *bfa); 304 void bfa_iocfc_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 310 void bfa_iocfc_isr(void *bfaarg, struct bfi_mbmsg_s *m); 312 enum bfa_boolean bfa_iocfc_is_operational(struct bfa_s *bfa); 313 void bfa_iocfc_reset_queues(struct bfa_s *bfa); 401 void bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids); 403 void bfa_cfg_get_min(struct bfa_iocfc_cfg_s *cfg); 415 void bfa_isr_enable(struct bfa_s *bfa); 234 void bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 276 void bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 277 void bfa_rport_res_recfg(struct bfa_s *bfa, u16 num_rport_fw); 384 void bfa_uf_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 385 void bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw); 440 void bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *m); 525 void bfa_fcport_init(struct bfa_s *bfa); 526 void bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 561 void bfa_fcport_beacon(void *dev, enum bfa_boolean beacon, enum bfa_boolean link_e2e_beacon); 644 void bfa_fcxp_res_recfg(struct bfa_s *bfa, u16 num_fcxp_fw); 743 void bfa_fcdiag_intr(struct bfa_s *bfa, struct bfi_msg_s *msg); 129 struct bfa_module_s hal_mod_fcdiag; 130 struct bfa_module_s hal_mod_sgpg; 131 struct bfa_module_s hal_mod_fcport; 132 struct bfa_module_s hal_mod_fcxp; 133 struct bfa_module_s hal_mod_lps; 134 struct bfa_module_s hal_mod_uf; 135 struct bfa_module_s hal_mod_rport; 22 int __trc_fileno___12 = 1025; 27 struct bfa_module_s *hal_mods[10U] = { &hal_mod_fcdiag, &hal_mod_sgpg, &hal_mod_fcport, &hal_mod_fcxp, &hal_mod_lps, &hal_mod_uf, &hal_mod_rport, &hal_mod_fcp, &hal_mod_dconf, (struct bfa_module_s *)0 }; 43 bfa_isr_func_t bfa_isrs[35U] = { &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_fcdiag_intr, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_fcport_isr, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_uf_isr, &bfa_fcxp_isr, &bfa_lps_isr, &bfa_rport_isr, &bfa_itn_isr, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_ioim_isr, &bfa_ioim_good_comp_isr, &bfa_tskim_isr, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled, &bfa_isr_unhandled }; 80 bfa_ioc_mbox_mcfunc_t bfa_mbox_isrs[35U] = { (void (*)(void *, struct bfi_mbmsg_s *))0, (void (*)(void *, struct bfi_mbmsg_s *))0, (void (*)(void *, struct bfi_mbmsg_s *))0, (void (*)(void *, struct bfi_mbmsg_s *))0, (void (*)(void *, struct bfi_mbmsg_s *))0, (void (*)(void *, struct bfi_mbmsg_s *))0, &bfa_iocfc_isr, (void (*)(void *, struct bfi_mbmsg_s *))0 }; 94 void bfa_com_port_attach(struct bfa_s *bfa); 107 void bfa_com_ablk_attach(struct bfa_s *bfa); 117 void bfa_com_cee_attach(struct bfa_s *bfa); 128 void bfa_com_sfp_attach(struct bfa_s *bfa); 138 void bfa_com_flash_attach(struct bfa_s *bfa, enum bfa_boolean mincfg); 149 void bfa_com_diag_attach(struct bfa_s *bfa); 159 void bfa_com_phy_attach(struct bfa_s *bfa, enum bfa_boolean mincfg); 169 void bfa_com_fru_attach(struct bfa_s *bfa, enum bfa_boolean mincfg); 215 void bfa_iocfc_sm_stopped(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 215 void bfa_iocfc_sm_stopped_entry(struct bfa_iocfc_s *iocfc); 216 void bfa_iocfc_sm_initing(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 216 void bfa_iocfc_sm_initing_entry(struct bfa_iocfc_s *iocfc); 217 void bfa_iocfc_sm_dconf_read(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 217 void bfa_iocfc_sm_dconf_read_entry(struct bfa_iocfc_s *iocfc); 219 void bfa_iocfc_sm_init_cfg_wait(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 219 void bfa_iocfc_sm_init_cfg_wait_entry(struct bfa_iocfc_s *iocfc); 221 void bfa_iocfc_sm_init_cfg_done(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 221 void bfa_iocfc_sm_init_cfg_done_entry(struct bfa_iocfc_s *iocfc); 223 void bfa_iocfc_sm_operational(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 223 void bfa_iocfc_sm_operational_entry(struct bfa_iocfc_s *iocfc); 225 void bfa_iocfc_sm_dconf_write(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 225 void bfa_iocfc_sm_dconf_write_entry(struct bfa_iocfc_s *iocfc); 226 void bfa_iocfc_sm_stopping(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 226 void bfa_iocfc_sm_stopping_entry(struct bfa_iocfc_s *iocfc); 227 void bfa_iocfc_sm_enabling(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 227 void bfa_iocfc_sm_enabling_entry(struct bfa_iocfc_s *iocfc); 228 void bfa_iocfc_sm_cfg_wait(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 228 void bfa_iocfc_sm_cfg_wait_entry(struct bfa_iocfc_s *iocfc); 229 void bfa_iocfc_sm_disabling(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 229 void bfa_iocfc_sm_disabling_entry(struct bfa_iocfc_s *iocfc); 230 void bfa_iocfc_sm_disabled(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 230 void bfa_iocfc_sm_disabled_entry(struct bfa_iocfc_s *iocfc); 231 void bfa_iocfc_sm_failed(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 231 void bfa_iocfc_sm_failed_entry(struct bfa_iocfc_s *iocfc); 233 void bfa_iocfc_sm_init_failed(struct bfa_iocfc_s *iocfc, enum iocfc_event event); 233 void bfa_iocfc_sm_init_failed_entry(struct bfa_iocfc_s *iocfc); 238 void bfa_iocfc_start_submod(struct bfa_s *bfa); 239 void bfa_iocfc_disable_submod(struct bfa_s *bfa); 240 void bfa_iocfc_send_cfg(void *bfa_arg); 241 void bfa_iocfc_enable_cbfn(void *bfa_arg, enum bfa_status status); 242 void bfa_iocfc_disable_cbfn(void *bfa_arg); 243 void bfa_iocfc_hbfail_cbfn(void *bfa_arg); 244 void bfa_iocfc_reset_cbfn(void *bfa_arg); 245 struct bfa_ioc_cbfn_s bfa_iocfc_cbfn = { }; 246 void bfa_iocfc_init_cb(void *bfa_arg, enum bfa_boolean complete___0); 247 void bfa_iocfc_stop_cb(void *bfa_arg, enum bfa_boolean compl); 248 void bfa_iocfc_enable_cb(void *bfa_arg, enum bfa_boolean compl); 249 void bfa_iocfc_disable_cb(void *bfa_arg, enum bfa_boolean compl); 696 void bfa_reqq_resume(struct bfa_s *bfa, int qid); 716 enum bfa_boolean bfa_isr_rspq(struct bfa_s *bfa, int qid); 752 void bfa_isr_reqq(struct bfa_s *bfa, int qid); 1040 void bfa_iocfc_init_mem(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 1093 void bfa_iocfc_mem_claim(struct bfa_s *bfa, struct bfa_iocfc_cfg_s *cfg); 1240 void bfa_iocfc_qreg(struct bfa_s *bfa, struct bfi_iocfc_qreg_s *qreg); 1258 void bfa_iocfc_res_recfg(struct bfa_s *bfa, struct bfa_iocfc_fwcfg_s *fwcfg); 1275 void bfa_iocfc_cfgrsp(struct bfa_s *bfa); 1328 void bfa_iocfc_process_faa_addr(struct bfa_s *bfa, struct bfi_faa_addr_msg_s *msg); 1347 enum bfa_status bfa_faa_validate_request(struct bfa_s *bfa); 1396 void bfa_faa_query_reply(struct bfa_iocfc_s *iocfc, struct bfi_faa_query_s *rsp); 328 void wwn2str___5(char *wwn_str, u64 wwn); 146 void bfa_plog_intarr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, enum bfa_plog_eid event, u16 misc, u32 *intarr, u32 num_ints); 149 void bfa_plog_fchdr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, enum bfa_plog_eid event, u16 misc, struct fchs_s *fchdr); 151 void bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid, enum bfa_plog_eid event, u16 misc, struct fchs_s *fchdr, u32 pld_w0); 535 enum bfa_port_speed bfa_fcport_get_speed(struct bfa_s *bfa); 539 enum bfa_port_topology bfa_fcport_get_cfg_topology(struct bfa_s *bfa); 541 enum bfa_boolean bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa); 548 wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, enum bfa_boolean node); 554 enum bfa_boolean bfa_fcport_is_ddport(struct bfa_s *bfa); 568 enum bfa_boolean bfa_fcport_is_qos_enabled(struct bfa_s *bfa); 569 enum bfa_boolean bfa_fcport_is_trunk_enabled(struct bfa_s *bfa); 570 void bfa_fcport_dportenable(struct bfa_s *bfa); 571 void bfa_fcport_dportdisable(struct bfa_s *bfa); 572 enum bfa_status bfa_fcport_is_pbcdisabled(struct bfa_s *bfa); 573 void bfa_fcport_cfg_faa(struct bfa_s *bfa, u8 state); 603 void bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); 632 void bfa_fcxp_free(struct bfa_fcxp_s *fcxp); 641 enum bfa_status bfa_fcxp_abort(struct bfa_fcxp_s *fcxp); 642 u32 bfa_fcxp_get_reqbufsz(struct bfa_fcxp_s *fcxp); 679 u8 bfa_lps_get_fwtag(struct bfa_s *bfa, u8 lp_tag); 24 int __trc_fileno___13 = 1026; 25 void bfa_fcdiag_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_s *bfa); 25 void bfa_fcdiag_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 25 void bfa_fcdiag_detach(struct bfa_s *bfa); 25 void bfa_fcdiag_start(struct bfa_s *bfa); 25 void bfa_fcdiag_stop(struct bfa_s *bfa); 25 void bfa_fcdiag_iocdisable(struct bfa_s *bfa); 25 struct bfa_module_s hal_mod_fcdiag = { &bfa_fcdiag_meminfo, &bfa_fcdiag_attach, &bfa_fcdiag_detach, &bfa_fcdiag_start, &bfa_fcdiag_stop, &bfa_fcdiag_iocdisable }; 26 void bfa_fcxp_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 26 void bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 26 void bfa_fcxp_detach(struct bfa_s *bfa); 26 void bfa_fcxp_start(struct bfa_s *bfa); 26 void bfa_fcxp_stop(struct bfa_s *bfa); 26 void bfa_fcxp_iocdisable(struct bfa_s *bfa); 26 struct bfa_module_s hal_mod_fcxp = { &bfa_fcxp_meminfo, &bfa_fcxp_attach, &bfa_fcxp_detach, &bfa_fcxp_start, &bfa_fcxp_stop, &bfa_fcxp_iocdisable }; 27 void bfa_sgpg_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 27 void bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 27 void bfa_sgpg_detach(struct bfa_s *bfa); 27 void bfa_sgpg_start(struct bfa_s *bfa); 27 void bfa_sgpg_stop(struct bfa_s *bfa); 27 void bfa_sgpg_iocdisable(struct bfa_s *bfa); 27 struct bfa_module_s hal_mod_sgpg = { &bfa_sgpg_meminfo, &bfa_sgpg_attach, &bfa_sgpg_detach, &bfa_sgpg_start, &bfa_sgpg_stop, &bfa_sgpg_iocdisable }; 28 void bfa_lps_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 28 void bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 28 void bfa_lps_detach(struct bfa_s *bfa); 28 void bfa_lps_start(struct bfa_s *bfa); 28 void bfa_lps_stop(struct bfa_s *bfa); 28 void bfa_lps_iocdisable(struct bfa_s *bfa); 28 struct bfa_module_s hal_mod_lps = { &bfa_lps_meminfo, &bfa_lps_attach, &bfa_lps_detach, &bfa_lps_start, &bfa_lps_stop, &bfa_lps_iocdisable }; 29 void bfa_fcport_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 29 void bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 29 void bfa_fcport_detach(struct bfa_s *bfa); 29 void bfa_fcport_start(struct bfa_s *bfa); 29 void bfa_fcport_stop(struct bfa_s *bfa); 29 void bfa_fcport_iocdisable(struct bfa_s *bfa); 29 struct bfa_module_s hal_mod_fcport = { &bfa_fcport_meminfo, &bfa_fcport_attach, &bfa_fcport_detach, &bfa_fcport_start, &bfa_fcport_stop, &bfa_fcport_iocdisable }; 30 void bfa_rport_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 30 void bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 30 void bfa_rport_detach(struct bfa_s *bfa); 30 void bfa_rport_start(struct bfa_s *bfa); 30 void bfa_rport_stop(struct bfa_s *bfa); 30 void bfa_rport_iocdisable(struct bfa_s *bfa); 30 struct bfa_module_s hal_mod_rport = { &bfa_rport_meminfo, &bfa_rport_attach, &bfa_rport_detach, &bfa_rport_start, &bfa_rport_stop, &bfa_rport_iocdisable }; 31 void bfa_uf_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo, struct bfa_s *bfa); 31 void bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_pcidev_s *pcidev); 31 void bfa_uf_detach(struct bfa_s *bfa); 31 void bfa_uf_start(struct bfa_s *bfa); 31 void bfa_uf_stop(struct bfa_s *bfa); 31 void bfa_uf_iocdisable(struct bfa_s *bfa); 31 struct bfa_module_s hal_mod_uf = { &bfa_uf_meminfo, &bfa_uf_attach, &bfa_uf_detach, &bfa_uf_start, &bfa_uf_stop, &bfa_uf_iocdisable }; 111 void __bfa_fcxp_send_cbfn(void *cbarg, enum bfa_boolean complete___0); 112 void hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp, struct bfi_fcxp_send_rsp_s *fcxp_rsp); 114 void hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen, struct bfa_fcxp_s *fcxp, struct fchs_s *fchs); 116 void bfa_fcxp_qresume(void *cbarg); 117 void bfa_fcxp_queue(struct bfa_fcxp_s *fcxp, struct bfi_fcxp_send_req_s *send_req); 132 void bfa_lps_login_rsp(struct bfa_s *bfa, struct bfi_lps_login_rsp_s *rsp); 134 void bfa_lps_no_res(struct bfa_lps_s *first_lps, u8 count); 135 void bfa_lps_logout_rsp(struct bfa_s *bfa, struct bfi_lps_logout_rsp_s *rsp); 137 void bfa_lps_reqq_resume(void *lps_arg); 138 void bfa_lps_free(struct bfa_lps_s *lps); 139 void bfa_lps_send_login(struct bfa_lps_s *lps); 140 void bfa_lps_send_logout(struct bfa_lps_s *lps); 141 void bfa_lps_send_set_n2n_pid(struct bfa_lps_s *lps); 142 void bfa_lps_login_comp(struct bfa_lps_s *lps); 143 void bfa_lps_logout_comp(struct bfa_lps_s *lps); 144 void bfa_lps_cvl_event(struct bfa_lps_s *lps); 149 void bfa_lps_sm_init(struct bfa_lps_s *lps, enum bfa_lps_event event); 150 void bfa_lps_sm_login(struct bfa_lps_s *lps, enum bfa_lps_event event); 151 void bfa_lps_sm_loginwait(struct bfa_lps_s *lps, enum bfa_lps_event event); 153 void bfa_lps_sm_online(struct bfa_lps_s *lps, enum bfa_lps_event event); 154 void bfa_lps_sm_online_n2n_pid_wait(struct bfa_lps_s *lps, enum bfa_lps_event event); 156 void bfa_lps_sm_logout(struct bfa_lps_s *lps, enum bfa_lps_event event); 157 void bfa_lps_sm_logowait(struct bfa_lps_s *lps, enum bfa_lps_event event); 163 enum bfa_boolean bfa_fcport_send_enable(struct bfa_fcport_s *fcport); 164 enum bfa_boolean bfa_fcport_send_disable(struct bfa_fcport_s *fcport); 165 void bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport); 166 void bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport); 167 void bfa_fcport_set_wwns(struct bfa_fcport_s *fcport); 168 void __bfa_cb_fcport_event(void *cbarg, enum bfa_boolean complete___0); 169 void bfa_fcport_scn(struct bfa_fcport_s *fcport, enum bfa_port_linkstate event, enum bfa_boolean trunk); 171 void bfa_fcport_queue_cb(struct bfa_fcport_ln_s *ln, enum bfa_port_linkstate event); 173 void __bfa_cb_fcport_stats_clr(void *cbarg, enum bfa_boolean complete___0); 174 void bfa_fcport_stats_get_timeout(void *cbarg); 175 void bfa_fcport_stats_clr_timeout(void *cbarg); 176 void bfa_trunk_iocdisable(struct bfa_s *bfa); 181 void bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 183 void bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 185 void bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 187 void bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 189 void bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 191 void bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 193 void bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 195 void bfa_fcport_sm_toggling_qwait(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 197 void bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 199 void bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 201 void bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 203 void bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 205 void bfa_fcport_sm_dport(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 207 void bfa_fcport_sm_ddport(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 209 void bfa_fcport_sm_faa_misconfig(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event); 212 void bfa_fcport_ln_sm_dn(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 214 void bfa_fcport_ln_sm_dn_nf(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 216 void bfa_fcport_ln_sm_dn_up_nf(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 218 void bfa_fcport_ln_sm_up(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 220 void bfa_fcport_ln_sm_up_nf(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 222 void bfa_fcport_ln_sm_up_dn_nf(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 224 void bfa_fcport_ln_sm_up_dn_up_nf(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event); 227 struct bfa_sm_table_s hal_port_sm_table[15U] = { { (void (*)(void *, int))(&bfa_fcport_sm_uninit), 1, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_enabling_qwait), 2, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_enabling), 3, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_linkdown), 4, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_linkup), 5, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_disabling_qwait), 6, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_toggling_qwait), 14, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_disabling), 7, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_disabled), 8, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_stopped), 9, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_iocdown), 10, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_iocfail), 10, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_dport), 16, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_ddport), 17, 0 }, { (void (*)(void *, int))(&bfa_fcport_sm_faa_misconfig), 15, 0 } }; 249 struct bfa_rport_s * bfa_rport_alloc(struct bfa_rport_mod_s *mod); 250 void bfa_rport_free(struct bfa_rport_s *rport); 251 enum bfa_boolean bfa_rport_send_fwcreate(struct bfa_rport_s *rp); 252 enum bfa_boolean bfa_rport_send_fwdelete(struct bfa_rport_s *rp); 253 enum bfa_boolean bfa_rport_send_fwspeed(struct bfa_rport_s *rp); 254 void __bfa_cb_rport_online(void *cbarg, enum bfa_boolean complete___0); 256 void __bfa_cb_rport_offline(void *cbarg, enum bfa_boolean complete___0); 262 void bfa_rport_sm_uninit(struct bfa_rport_s *rp, enum bfa_rport_event event); 264 void bfa_rport_sm_created(struct bfa_rport_s *rp, enum bfa_rport_event event); 266 void bfa_rport_sm_fwcreate(struct bfa_rport_s *rp, enum bfa_rport_event event); 268 void bfa_rport_sm_online(struct bfa_rport_s *rp, enum bfa_rport_event event); 270 void bfa_rport_sm_fwdelete(struct bfa_rport_s *rp, enum bfa_rport_event event); 272 void bfa_rport_sm_offline(struct bfa_rport_s *rp, enum bfa_rport_event event); 274 void bfa_rport_sm_deleting(struct bfa_rport_s *rp, enum bfa_rport_event event); 276 void bfa_rport_sm_offline_pending(struct bfa_rport_s *rp, enum bfa_rport_event event); 278 void bfa_rport_sm_delete_pending(struct bfa_rport_s *rp, enum bfa_rport_event event); 280 void bfa_rport_sm_iocdisable(struct bfa_rport_s *rp, enum bfa_rport_event event); 282 void bfa_rport_sm_fwcreate_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event); 284 void bfa_rport_sm_fwdelete_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event); 286 void bfa_rport_sm_deleting_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event); 293 int plkd_validate_logrec(struct bfa_plog_rec_s *pl_rec); 307 u64 bfa_get_log_time(); 319 void bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec); 449 void claim_fcxps_mem(struct bfa_fcxp_mod_s *mod); 587 struct bfa_fcxp_s * bfa_fcxp_get(struct bfa_fcxp_mod_s *fm, enum bfa_boolean req); 603 void bfa_fcxp_init_reqrsp(struct bfa_fcxp_s *fcxp, struct bfa_s *bfa, u8 *use_ibuf, u32 *nr_sgles, bfa_fcxp_get_sgaddr_t (**r_sga_cbfn)(void *, int), bfa_fcxp_get_sglen_t (**r_sglen_cbfn)(void *, int), struct list_head *r_sgpg_q, int n_sgles, u64 (*sga_cbfn)(void *, int), u32 (*sglen_cbfn)(void *, int)); 641 void bfa_fcxp_init(struct bfa_fcxp_s *fcxp, void *caller, struct bfa_s *bfa, int nreq_sgles, int nrsp_sgles, u64 (*req_sga_cbfn)(void *, int), u32 (*req_sglen_cbfn)(void *, int), u64 (*rsp_sga_cbfn)(void *, int), u32 (*rsp_sglen_cbfn)(void *, int)); 668 void bfa_fcxp_put(struct bfa_fcxp_s *fcxp); 700 void bfa_fcxp_null_comp(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, enum bfa_status req_status, u32 rsp_len, u32 resid_len, struct fchs_s *rsp_fchs); 722 void hal_fcxp_send_comp(struct bfa_s *bfa, struct bfi_fcxp_send_rsp_s *fcxp_rsp); 1695 void bfa_lps_rx_cvl_event(struct bfa_s *bfa, struct bfi_lps_cvl_event_s *cvl); 1799 void bfa_lps_login_comp_cb(void *arg, enum bfa_boolean complete___0); 1834 void bfa_lps_logout_comp_cb(void *arg, enum bfa_boolean complete___0); 1866 void bfa_lps_cvl_event_cb(void *arg, enum bfa_boolean complete___0); 2068 void bfa_fcport_aen_post(struct bfa_fcport_s *fcport, enum bfa_port_aen_event event); 3067 void bfa_fcport_qresume(void *cbarg); 3075 void bfa_fcport_mem_claim(struct bfa_fcport_s *fcport); 3173 void bfa_fcport_update_loop_info(struct bfa_fcport_s *fcport, struct bfa_fcport_loop_info_s *loop_info); 3320 void bfa_fcport_qos_stats_swap(struct bfa_qos_stats_s *d, struct bfa_qos_stats_s *s); 3333 void bfa_fcport_fcoe_stats_swap(struct bfa_fcoe_stats_s *d, struct bfa_fcoe_stats_s *s); 3353 void __bfa_cb_fcport_stats_get(void *cbarg, enum bfa_boolean complete___0); 3408 void bfa_fcport_send_stats_get(void *cbarg); 3476 void bfa_fcport_send_stats_clear(void *cbarg); 3503 void bfa_trunk_scn(struct bfa_fcport_s *fcport, struct bfi_fcport_trunk_scn_s *scn); 4378 void bfa_fcport_ddportenable(struct bfa_s *bfa); 4387 void bfa_fcport_ddportdisable(struct bfa_s *bfa); 4881 void bfa_rport_qresume(void *cbarg); 5475 void __bfa_cb_uf_recv(void *cbarg, enum bfa_boolean complete___0); 5485 void claim_uf_post_msgs(struct bfa_uf_mod_s *ufm); 5513 void claim_ufs(struct bfa_uf_mod_s *ufm); 5543 void uf_mem_claim(struct bfa_uf_mod_s *ufm); 5598 struct bfa_uf_s * bfa_uf_get(struct bfa_uf_mod_s *uf_mod); 5607 void bfa_uf_put(struct bfa_uf_mod_s *uf_mod, struct bfa_uf_s *uf); 5613 enum bfa_status bfa_uf_post(struct bfa_uf_mod_s *ufm, struct bfa_uf_s *uf); 5632 void bfa_uf_post_all(struct bfa_uf_mod_s *uf_mod); 5643 void uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m); 5802 void bfa_dport_sm_disabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5804 void bfa_dport_sm_enabling_qwait(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5806 void bfa_dport_sm_enabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5808 void bfa_dport_sm_enabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5810 void bfa_dport_sm_disabling_qwait(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5812 void bfa_dport_sm_disabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5814 void bfa_dport_sm_starting_qwait(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5816 void bfa_dport_sm_starting(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5818 void bfa_dport_sm_dynamic_disabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5820 void bfa_dport_sm_dynamic_disabling_qwait(struct bfa_dport_s *dport, enum bfa_dport_sm_event event); 5822 void bfa_dport_qresume(void *cbarg); 5823 void bfa_dport_req_comp(struct bfa_dport_s *dport, struct bfi_diag_dport_rsp_s *msg); 5825 void bfa_dport_scn(struct bfa_dport_s *dport, struct bfi_diag_dport_scn_s *msg); 5837 void bfa_fcdiag_set_busy_status(struct bfa_fcdiag_s *fcdiag); 5905 void bfa_fcdiag_queuetest_timeout(void *cbarg); 5927 enum bfa_status bfa_fcdiag_queuetest_send(struct bfa_fcdiag_s *fcdiag); 5950 void bfa_fcdiag_queuetest_comp(struct bfa_fcdiag_s *fcdiag, struct bfi_diag_qtest_req_s *rsp); 6008 void bfa_fcdiag_loopback_comp(struct bfa_fcdiag_s *fcdiag, struct bfi_diag_lb_rsp_s *rsp); 6027 enum bfa_status bfa_fcdiag_loopback_send(struct bfa_fcdiag_s *fcdiag, struct bfa_diag_loopback_s *loopback); 6289 enum bfa_boolean bfa_dport_send_req(struct bfa_dport_s *dport, enum bfi_dport_req req); 6292 void bfa_cb_fcdiag_dport(struct bfa_dport_s *dport, enum bfa_status bfa_status); 6695 enum bfa_boolean bfa_dport_is_sending_req(struct bfa_dport_s *dport); 14 void * ldv_err_ptr(long error); 28 bool ldv_is_err_or_null(const void *ptr); 18 int ldv_state_bfad_im_port_index = 0; 21 void ldv_idr_init_bfad_im_port_index(); 43 void ldv_idr_find_bfad_im_port_index(); 67 void ldv_idr_destroy_bfad_im_port_index(); return ; } { 1041 struct scsi_target *var_group1; 1042 struct Scsi_Host *var_group2; 1043 struct fc_rport *var_group3; 1044 unsigned int var_bfad_im_set_rport_loss_tmo_11_p1; 1045 struct fc_vport *var_group4; 1046 _Bool var_bfad_im_vport_create_12_p1; 1047 _Bool var_bfad_im_vport_disable_15_p1; 1048 int tmp; 1049 int tmp___0; 1127 LDV_IN_INTERRUPT = 1; 1142 goto ldv_48669; 1142 tmp___0 = nondet_int() { /* Function call is skipped due to function is undefined */} 1144 goto ldv_48668; 1143 ldv_48668:; 1145 tmp = nondet_int() { /* Function call is skipped due to function is undefined */} 1145 switch (tmp) 1393 ldv_handler_precall() { /* Function call is skipped due to function is undefined */} { 486 struct bfad_vport_s *vport; 487 struct bfad_im_port_s *im_port; 488 struct bfad_s *bfad; 489 struct bfad_port_s *port; 490 struct bfa_fcs_vport_s *fcs_vport; 491 struct Scsi_Host *vshost; 492 unsigned long long pwwn; 493 int rc; 494 unsigned long flags; 495 struct completion fcomp; 496 raw_spinlock_t *tmp; 497 raw_spinlock_t *tmp___0; 498 enum bfa_status tmp___1; 486 struct bfad_vport_s *__CPAchecker_TMP_0 = (struct bfad_vport_s *)(fc_vport->dd_data); 486 vport = __CPAchecker_TMP_0; 487 im_port = vport->drv_port.im_port; 489 bfad = im_port->bfad; 498 int __CPAchecker_TMP_1 = (int)(im_port->flags); { 737 int __CPAchecker_TMP_0 = (int)(im_port->flags); { 582 unsigned long long __CPAchecker_TMP_0 = (unsigned long long)(bfad->inst_no); { 114 int tail; 115 struct bfa_trc_s *trc; 116 struct timeval tv; 113 int __CPAchecker_TMP_0 = (int)(trcm->tail); 113 tail = __CPAchecker_TMP_0; 114 trc = ((struct bfa_trc_s *)(&(trcm->trc))) + ((unsigned long)tail); 116 assume(!((trcm->stopped) != 0U)); 119 trc->fileno = (unsigned short)fileno; 120 trc->line = (unsigned short)line; 121 trc->data.u64 = data; 122 do_gettimeofday(&tv) { /* Function call is skipped due to function is undefined */} 122 trc->timestamp = (u32 )(((tv.tv_sec) * 1000000L) + (tv.tv_usec)); 124 trcm->tail = ((trcm->tail) + 1U) & 4095U; 125 assume(!((trcm->tail) == (trcm->head))); 127 return ;; } 583 dev_printk("\016", (const struct device *)(&(bfad->pcidev->dev)), "Free scsi%d\n", im_port->shost->host_no) { /* Function call is skipped due to function is undefined */} 586 fc_remove_host(im_port->shost) { /* Function call is skipped due to function is undefined */} 588 scsi_remove_host(im_port->shost) { /* Function call is skipped due to function is undefined */} 589 scsi_host_put(im_port->shost) { /* Function call is skipped due to function is undefined */} 591 mutex_lock_nested(&bfad_mutex, 0U) { /* Function call is skipped due to function is undefined */} 593 mutex_unlock(&bfad_mutex) { /* Function call is skipped due to function is undefined */} } { 643 struct bfad_fcp_binding *bp; 644 struct bfad_fcp_binding *bp_new; 645 unsigned long flags; 646 struct bfad_s *bfad; 647 raw_spinlock_t *tmp; 648 const struct list_head *__mptr; 649 const struct list_head *__mptr___0; 650 const struct list_head *__mptr___1; 651 int __ret_warn_on; 652 int tmp___0; 653 long tmp___1; 645 bfad = im_port->bfad; 647 flags = _raw_spin_lock_irqsave(tmp) { /* Function call is skipped due to function is undefined */} 648 __mptr = (const struct list_head *)(im_port->binding_list.next); 648 bp = (struct bfad_fcp_binding *)__mptr; 648 __mptr___0 = (const struct list_head *)(bp->list_entry.next); 648 bp_new = (struct bfad_fcp_binding *)__mptr___0; 648 goto ldv_48392; 655 __ret_warn_on = tmp___0 == 0; 655 warn_slowpath_null("/work/ldvuser/ref_launch/work/current--X--drivers--X--defaultlinux-4.0-rc1.tar.xz--X--153_7a--X--cpachecker/linux-4.0-rc1.tar.xz/csd_deg_dscv/11450/dscv_tempdir/dscv/ri/153_7a/drivers/scsi/bfa/bfad_im.c", 655) { /* Function call is skipped due to function is undefined */} { } 372 _raw_spin_unlock_irqrestore(&(lock->__annonCompField19.rlock), flags) { /* Function call is skipped due to function is undefined */} } 741 kfree((const void *)im_port) { /* Function call is skipped due to function is undefined */} } 500 list_del(&(vport->list_entry)) { /* Function call is skipped due to function is undefined */} 501 kfree((const void *)vport) { /* Function call is skipped due to function is undefined */} } 1401 goto ldv_48638; 1642 ldv_48638:; 1643 ldv_48669:; 1142 tmp___0 = nondet_int() { /* Function call is skipped due to function is undefined */} { }} | Source code 1
2 /*
3 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
4 * All rights reserved
5 * www.brocade.com
6 *
7 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License (GPL) Version 2 as
11 * published by the Free Software Foundation
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 */
18
19 /*
20 * bfa_attr.c Linux driver configuration interface module.
21 */
22
23 #include "bfad_drv.h"
24 #include "bfad_im.h"
25
26 /*
27 * FC transport template entry, get SCSI target port ID.
28 */
29 static void
30 bfad_im_get_starget_port_id(struct scsi_target *starget)
31 {
32 struct Scsi_Host *shost;
33 struct bfad_im_port_s *im_port;
34 struct bfad_s *bfad;
35 struct bfad_itnim_s *itnim = NULL;
36 u32 fc_id = -1;
37 unsigned long flags;
38
39 shost = dev_to_shost(starget->dev.parent);
40 im_port = (struct bfad_im_port_s *) shost->hostdata[0];
41 bfad = im_port->bfad;
42 spin_lock_irqsave(&bfad->bfad_lock, flags);
43
44 itnim = bfad_get_itnim(im_port, starget->id);
45 if (itnim)
46 fc_id = bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim);
47
48 fc_starget_port_id(starget) = fc_id;
49 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
50 }
51
52 /*
53 * FC transport template entry, get SCSI target nwwn.
54 */
55 static void
56 bfad_im_get_starget_node_name(struct scsi_target *starget)
57 {
58 struct Scsi_Host *shost;
59 struct bfad_im_port_s *im_port;
60 struct bfad_s *bfad;
61 struct bfad_itnim_s *itnim = NULL;
62 u64 node_name = 0;
63 unsigned long flags;
64
65 shost = dev_to_shost(starget->dev.parent);
66 im_port = (struct bfad_im_port_s *) shost->hostdata[0];
67 bfad = im_port->bfad;
68 spin_lock_irqsave(&bfad->bfad_lock, flags);
69
70 itnim = bfad_get_itnim(im_port, starget->id);
71 if (itnim)
72 node_name = bfa_fcs_itnim_get_nwwn(&itnim->fcs_itnim);
73
74 fc_starget_node_name(starget) = cpu_to_be64(node_name);
75 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
76 }
77
78 /*
79 * FC transport template entry, get SCSI target pwwn.
80 */
81 static void
82 bfad_im_get_starget_port_name(struct scsi_target *starget)
83 {
84 struct Scsi_Host *shost;
85 struct bfad_im_port_s *im_port;
86 struct bfad_s *bfad;
87 struct bfad_itnim_s *itnim = NULL;
88 u64 port_name = 0;
89 unsigned long flags;
90
91 shost = dev_to_shost(starget->dev.parent);
92 im_port = (struct bfad_im_port_s *) shost->hostdata[0];
93 bfad = im_port->bfad;
94 spin_lock_irqsave(&bfad->bfad_lock, flags);
95
96 itnim = bfad_get_itnim(im_port, starget->id);
97 if (itnim)
98 port_name = bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim);
99
100 fc_starget_port_name(starget) = cpu_to_be64(port_name);
101 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
102 }
103
104 /*
105 * FC transport template entry, get SCSI host port ID.
106 */
107 static void
108 bfad_im_get_host_port_id(struct Scsi_Host *shost)
109 {
110 struct bfad_im_port_s *im_port =
111 (struct bfad_im_port_s *) shost->hostdata[0];
112 struct bfad_port_s *port = im_port->port;
113
114 fc_host_port_id(shost) =
115 bfa_hton3b(bfa_fcs_lport_get_fcid(port->fcs_port));
116 }
117
118 /*
119 * FC transport template entry, get SCSI host port type.
120 */
121 static void
122 bfad_im_get_host_port_type(struct Scsi_Host *shost)
123 {
124 struct bfad_im_port_s *im_port =
125 (struct bfad_im_port_s *) shost->hostdata[0];
126 struct bfad_s *bfad = im_port->bfad;
127 struct bfa_lport_attr_s port_attr;
128
129 bfa_fcs_lport_get_attr(&bfad->bfa_fcs.fabric.bport, &port_attr);
130
131 switch (port_attr.port_type) {
132 case BFA_PORT_TYPE_NPORT:
133 fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
134 break;
135 case BFA_PORT_TYPE_NLPORT:
136 fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
137 break;
138 case BFA_PORT_TYPE_P2P:
139 fc_host_port_type(shost) = FC_PORTTYPE_PTP;
140 break;
141 case BFA_PORT_TYPE_LPORT:
142 fc_host_port_type(shost) = FC_PORTTYPE_LPORT;
143 break;
144 default:
145 fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
146 break;
147 }
148 }
149
150 /*
151 * FC transport template entry, get SCSI host port state.
152 */
153 static void
154 bfad_im_get_host_port_state(struct Scsi_Host *shost)
155 {
156 struct bfad_im_port_s *im_port =
157 (struct bfad_im_port_s *) shost->hostdata[0];
158 struct bfad_s *bfad = im_port->bfad;
159 struct bfa_port_attr_s attr;
160
161 bfa_fcport_get_attr(&bfad->bfa, &attr);
162
163 switch (attr.port_state) {
164 case BFA_PORT_ST_LINKDOWN:
165 fc_host_port_state(shost) = FC_PORTSTATE_LINKDOWN;
166 break;
167 case BFA_PORT_ST_LINKUP:
168 fc_host_port_state(shost) = FC_PORTSTATE_ONLINE;
169 break;
170 case BFA_PORT_ST_DISABLED:
171 case BFA_PORT_ST_STOPPED:
172 case BFA_PORT_ST_IOCDOWN:
173 case BFA_PORT_ST_IOCDIS:
174 fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
175 break;
176 case BFA_PORT_ST_UNINIT:
177 case BFA_PORT_ST_ENABLING_QWAIT:
178 case BFA_PORT_ST_ENABLING:
179 case BFA_PORT_ST_DISABLING_QWAIT:
180 case BFA_PORT_ST_DISABLING:
181 default:
182 fc_host_port_state(shost) = FC_PORTSTATE_UNKNOWN;
183 break;
184 }
185 }
186
187 /*
188 * FC transport template entry, get SCSI host active fc4s.
189 */
190 static void
191 bfad_im_get_host_active_fc4s(struct Scsi_Host *shost)
192 {
193 struct bfad_im_port_s *im_port =
194 (struct bfad_im_port_s *) shost->hostdata[0];
195 struct bfad_port_s *port = im_port->port;
196
197 memset(fc_host_active_fc4s(shost), 0,
198 sizeof(fc_host_active_fc4s(shost)));
199
200 if (port->supported_fc4s & BFA_LPORT_ROLE_FCP_IM)
201 fc_host_active_fc4s(shost)[2] = 1;
202
203 fc_host_active_fc4s(shost)[7] = 1;
204 }
205
206 /*
207 * FC transport template entry, get SCSI host link speed.
208 */
209 static void
210 bfad_im_get_host_speed(struct Scsi_Host *shost)
211 {
212 struct bfad_im_port_s *im_port =
213 (struct bfad_im_port_s *) shost->hostdata[0];
214 struct bfad_s *bfad = im_port->bfad;
215 struct bfa_port_attr_s attr;
216
217 bfa_fcport_get_attr(&bfad->bfa, &attr);
218 switch (attr.speed) {
219 case BFA_PORT_SPEED_10GBPS:
220 fc_host_speed(shost) = FC_PORTSPEED_10GBIT;
221 break;
222 case BFA_PORT_SPEED_16GBPS:
223 fc_host_speed(shost) = FC_PORTSPEED_16GBIT;
224 break;
225 case BFA_PORT_SPEED_8GBPS:
226 fc_host_speed(shost) = FC_PORTSPEED_8GBIT;
227 break;
228 case BFA_PORT_SPEED_4GBPS:
229 fc_host_speed(shost) = FC_PORTSPEED_4GBIT;
230 break;
231 case BFA_PORT_SPEED_2GBPS:
232 fc_host_speed(shost) = FC_PORTSPEED_2GBIT;
233 break;
234 case BFA_PORT_SPEED_1GBPS:
235 fc_host_speed(shost) = FC_PORTSPEED_1GBIT;
236 break;
237 default:
238 fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
239 break;
240 }
241 }
242
243 /*
244 * FC transport template entry, get SCSI host port type.
245 */
246 static void
247 bfad_im_get_host_fabric_name(struct Scsi_Host *shost)
248 {
249 struct bfad_im_port_s *im_port =
250 (struct bfad_im_port_s *) shost->hostdata[0];
251 struct bfad_port_s *port = im_port->port;
252 wwn_t fabric_nwwn = 0;
253
254 fabric_nwwn = bfa_fcs_lport_get_fabric_name(port->fcs_port);
255
256 fc_host_fabric_name(shost) = cpu_to_be64(fabric_nwwn);
257
258 }
259
260 /*
261 * FC transport template entry, get BFAD statistics.
262 */
263 static struct fc_host_statistics *
264 bfad_im_get_stats(struct Scsi_Host *shost)
265 {
266 struct bfad_im_port_s *im_port =
267 (struct bfad_im_port_s *) shost->hostdata[0];
268 struct bfad_s *bfad = im_port->bfad;
269 struct bfad_hal_comp fcomp;
270 union bfa_port_stats_u *fcstats;
271 struct fc_host_statistics *hstats;
272 bfa_status_t rc;
273 unsigned long flags;
274
275 fcstats = kzalloc(sizeof(union bfa_port_stats_u), GFP_KERNEL);
276 if (fcstats == NULL)
277 return NULL;
278
279 hstats = &bfad->link_stats;
280 init_completion(&fcomp.comp);
281 spin_lock_irqsave(&bfad->bfad_lock, flags);
282 memset(hstats, 0, sizeof(struct fc_host_statistics));
283 rc = bfa_port_get_stats(BFA_FCPORT(&bfad->bfa),
284 fcstats, bfad_hcb_comp, &fcomp);
285 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
286 if (rc != BFA_STATUS_OK)
287 return NULL;
288
289 wait_for_completion(&fcomp.comp);
290
291 /* Fill the fc_host_statistics structure */
292 hstats->seconds_since_last_reset = fcstats->fc.secs_reset;
293 hstats->tx_frames = fcstats->fc.tx_frames;
294 hstats->tx_words = fcstats->fc.tx_words;
295 hstats->rx_frames = fcstats->fc.rx_frames;
296 hstats->rx_words = fcstats->fc.rx_words;
297 hstats->lip_count = fcstats->fc.lip_count;
298 hstats->nos_count = fcstats->fc.nos_count;
299 hstats->error_frames = fcstats->fc.error_frames;
300 hstats->dumped_frames = fcstats->fc.dropped_frames;
301 hstats->link_failure_count = fcstats->fc.link_failures;
302 hstats->loss_of_sync_count = fcstats->fc.loss_of_syncs;
303 hstats->loss_of_signal_count = fcstats->fc.loss_of_signals;
304 hstats->prim_seq_protocol_err_count = fcstats->fc.primseq_errs;
305 hstats->invalid_crc_count = fcstats->fc.invalid_crcs;
306
307 kfree(fcstats);
308 return hstats;
309 }
310
311 /*
312 * FC transport template entry, reset BFAD statistics.
313 */
314 static void
315 bfad_im_reset_stats(struct Scsi_Host *shost)
316 {
317 struct bfad_im_port_s *im_port =
318 (struct bfad_im_port_s *) shost->hostdata[0];
319 struct bfad_s *bfad = im_port->bfad;
320 struct bfad_hal_comp fcomp;
321 unsigned long flags;
322 bfa_status_t rc;
323
324 init_completion(&fcomp.comp);
325 spin_lock_irqsave(&bfad->bfad_lock, flags);
326 rc = bfa_port_clear_stats(BFA_FCPORT(&bfad->bfa), bfad_hcb_comp,
327 &fcomp);
328 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
329
330 if (rc != BFA_STATUS_OK)
331 return;
332
333 wait_for_completion(&fcomp.comp);
334
335 return;
336 }
337
338 /*
339 * FC transport template entry, set rport loss timeout.
340 * Update dev_loss_tmo based on the value pushed down by the stack
341 * In case it is lesser than path_tov of driver, set it to path_tov + 1
342 * to ensure that the driver times out before the application
343 */
344 static void
345 bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)
346 {
347 struct bfad_itnim_data_s *itnim_data = rport->dd_data;
348 struct bfad_itnim_s *itnim = itnim_data->itnim;
349 struct bfad_s *bfad = itnim->im->bfad;
350 uint16_t path_tov = bfa_fcpim_path_tov_get(&bfad->bfa);
351
352 rport->dev_loss_tmo = timeout;
353 if (timeout < path_tov)
354 rport->dev_loss_tmo = path_tov + 1;
355 }
356
357 static int
358 bfad_im_vport_create(struct fc_vport *fc_vport, bool disable)
359 {
360 char *vname = fc_vport->symbolic_name;
361 struct Scsi_Host *shost = fc_vport->shost;
362 struct bfad_im_port_s *im_port =
363 (struct bfad_im_port_s *) shost->hostdata[0];
364 struct bfad_s *bfad = im_port->bfad;
365 struct bfa_lport_cfg_s port_cfg;
366 struct bfad_vport_s *vp;
367 int status = 0, rc;
368 unsigned long flags;
369
370 memset(&port_cfg, 0, sizeof(port_cfg));
371 u64_to_wwn(fc_vport->node_name, (u8 *)&port_cfg.nwwn);
372 u64_to_wwn(fc_vport->port_name, (u8 *)&port_cfg.pwwn);
373 if (strlen(vname) > 0)
374 strcpy((char *)&port_cfg.sym_name, vname);
375 port_cfg.roles = BFA_LPORT_ROLE_FCP_IM;
376
377 spin_lock_irqsave(&bfad->bfad_lock, flags);
378 list_for_each_entry(vp, &bfad->pbc_vport_list, list_entry) {
379 if (port_cfg.pwwn ==
380 vp->fcs_vport.lport.port_cfg.pwwn) {
381 port_cfg.preboot_vp =
382 vp->fcs_vport.lport.port_cfg.preboot_vp;
383 break;
384 }
385 }
386 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
387
388 rc = bfad_vport_create(bfad, 0, &port_cfg, &fc_vport->dev);
389 if (rc == BFA_STATUS_OK) {
390 struct bfad_vport_s *vport;
391 struct bfa_fcs_vport_s *fcs_vport;
392 struct Scsi_Host *vshost;
393
394 spin_lock_irqsave(&bfad->bfad_lock, flags);
395 fcs_vport = bfa_fcs_vport_lookup(&bfad->bfa_fcs, 0,
396 port_cfg.pwwn);
397 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
398 if (fcs_vport == NULL)
399 return VPCERR_BAD_WWN;
400
401 fc_vport_set_state(fc_vport, FC_VPORT_ACTIVE);
402 if (disable) {
403 spin_lock_irqsave(&bfad->bfad_lock, flags);
404 bfa_fcs_vport_stop(fcs_vport);
405 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
406 fc_vport_set_state(fc_vport, FC_VPORT_DISABLED);
407 }
408
409 vport = fcs_vport->vport_drv;
410 vshost = vport->drv_port.im_port->shost;
411 fc_host_node_name(vshost) = wwn_to_u64((u8 *)&port_cfg.nwwn);
412 fc_host_port_name(vshost) = wwn_to_u64((u8 *)&port_cfg.pwwn);
413 fc_host_supported_classes(vshost) = FC_COS_CLASS3;
414
415 memset(fc_host_supported_fc4s(vshost), 0,
416 sizeof(fc_host_supported_fc4s(vshost)));
417
418 /* For FCP type 0x08 */
419 if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM)
420 fc_host_supported_fc4s(vshost)[2] = 1;
421
422 /* For fibre channel services type 0x20 */
423 fc_host_supported_fc4s(vshost)[7] = 1;
424
425 fc_host_supported_speeds(vshost) =
426 bfad_im_supported_speeds(&bfad->bfa);
427 fc_host_maxframe_size(vshost) =
428 bfa_fcport_get_maxfrsize(&bfad->bfa);
429
430 fc_vport->dd_data = vport;
431 vport->drv_port.im_port->fc_vport = fc_vport;
432 } else if (rc == BFA_STATUS_INVALID_WWN)
433 return VPCERR_BAD_WWN;
434 else if (rc == BFA_STATUS_VPORT_EXISTS)
435 return VPCERR_BAD_WWN;
436 else if (rc == BFA_STATUS_VPORT_MAX)
437 return VPCERR_NO_FABRIC_SUPP;
438 else if (rc == BFA_STATUS_VPORT_WWN_BP)
439 return VPCERR_BAD_WWN;
440 else
441 return FC_VPORT_FAILED;
442
443 return status;
444 }
445
446 int
447 bfad_im_issue_fc_host_lip(struct Scsi_Host *shost)
448 {
449 struct bfad_im_port_s *im_port =
450 (struct bfad_im_port_s *) shost->hostdata[0];
451 struct bfad_s *bfad = im_port->bfad;
452 struct bfad_hal_comp fcomp;
453 unsigned long flags;
454 uint32_t status;
455
456 init_completion(&fcomp.comp);
457 spin_lock_irqsave(&bfad->bfad_lock, flags);
458 status = bfa_port_disable(&bfad->bfa.modules.port,
459 bfad_hcb_comp, &fcomp);
460 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
461
462 if (status != BFA_STATUS_OK)
463 return -EIO;
464
465 wait_for_completion(&fcomp.comp);
466 if (fcomp.status != BFA_STATUS_OK)
467 return -EIO;
468
469 spin_lock_irqsave(&bfad->bfad_lock, flags);
470 status = bfa_port_enable(&bfad->bfa.modules.port,
471 bfad_hcb_comp, &fcomp);
472 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
473 if (status != BFA_STATUS_OK)
474 return -EIO;
475
476 wait_for_completion(&fcomp.comp);
477 if (fcomp.status != BFA_STATUS_OK)
478 return -EIO;
479
480 return 0;
481 }
482
483 static int
484 bfad_im_vport_delete(struct fc_vport *fc_vport)
485 {
486 struct bfad_vport_s *vport = (struct bfad_vport_s *)fc_vport->dd_data;
487 struct bfad_im_port_s *im_port =
488 (struct bfad_im_port_s *) vport->drv_port.im_port;
489 struct bfad_s *bfad = im_port->bfad;
490 struct bfad_port_s *port;
491 struct bfa_fcs_vport_s *fcs_vport;
492 struct Scsi_Host *vshost;
493 wwn_t pwwn;
494 int rc;
495 unsigned long flags;
496 struct completion fcomp;
497
498 if (im_port->flags & BFAD_PORT_DELETE) {
499 bfad_scsi_host_free(bfad, im_port);
500 list_del(&vport->list_entry);
501 kfree(vport);
502 return 0;
503 }
504
505 port = im_port->port;
506
507 vshost = vport->drv_port.im_port->shost;
508 u64_to_wwn(fc_host_port_name(vshost), (u8 *)&pwwn);
509
510 spin_lock_irqsave(&bfad->bfad_lock, flags);
511 fcs_vport = bfa_fcs_vport_lookup(&bfad->bfa_fcs, 0, pwwn);
512 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
513
514 if (fcs_vport == NULL)
515 return VPCERR_BAD_WWN;
516
517 vport->drv_port.flags |= BFAD_PORT_DELETE;
518
519 vport->comp_del = &fcomp;
520 init_completion(vport->comp_del);
521
522 spin_lock_irqsave(&bfad->bfad_lock, flags);
523 rc = bfa_fcs_vport_delete(&vport->fcs_vport);
524 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
525
526 if (rc == BFA_STATUS_PBC) {
527 vport->drv_port.flags &= ~BFAD_PORT_DELETE;
528 vport->comp_del = NULL;
529 return -1;
530 }
531
532 wait_for_completion(vport->comp_del);
533
534 bfad_scsi_host_free(bfad, im_port);
535 list_del(&vport->list_entry);
536 kfree(vport);
537
538 return 0;
539 }
540
541 static int
542 bfad_im_vport_disable(struct fc_vport *fc_vport, bool disable)
543 {
544 struct bfad_vport_s *vport;
545 struct bfad_s *bfad;
546 struct bfa_fcs_vport_s *fcs_vport;
547 struct Scsi_Host *vshost;
548 wwn_t pwwn;
549 unsigned long flags;
550
551 vport = (struct bfad_vport_s *)fc_vport->dd_data;
552 bfad = vport->drv_port.bfad;
553 vshost = vport->drv_port.im_port->shost;
554 u64_to_wwn(fc_host_port_name(vshost), (u8 *)&pwwn);
555
556 spin_lock_irqsave(&bfad->bfad_lock, flags);
557 fcs_vport = bfa_fcs_vport_lookup(&bfad->bfa_fcs, 0, pwwn);
558 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
559
560 if (fcs_vport == NULL)
561 return VPCERR_BAD_WWN;
562
563 if (disable) {
564 bfa_fcs_vport_stop(fcs_vport);
565 fc_vport_set_state(fc_vport, FC_VPORT_DISABLED);
566 } else {
567 bfa_fcs_vport_start(fcs_vport);
568 fc_vport_set_state(fc_vport, FC_VPORT_ACTIVE);
569 }
570
571 return 0;
572 }
573
574 void
575 bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)
576 {
577 struct bfad_vport_s *vport = (struct bfad_vport_s *)fc_vport->dd_data;
578 struct bfad_im_port_s *im_port =
579 (struct bfad_im_port_s *)vport->drv_port.im_port;
580 struct bfad_s *bfad = im_port->bfad;
581 struct Scsi_Host *vshost = vport->drv_port.im_port->shost;
582 char *sym_name = fc_vport->symbolic_name;
583 struct bfa_fcs_vport_s *fcs_vport;
584 wwn_t pwwn;
585 unsigned long flags;
586
587 u64_to_wwn(fc_host_port_name(vshost), (u8 *)&pwwn);
588
589 spin_lock_irqsave(&bfad->bfad_lock, flags);
590 fcs_vport = bfa_fcs_vport_lookup(&bfad->bfa_fcs, 0, pwwn);
591 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
592
593 if (fcs_vport == NULL)
594 return;
595
596 spin_lock_irqsave(&bfad->bfad_lock, flags);
597 if (strlen(sym_name) > 0)
598 bfa_fcs_lport_set_symname(&fcs_vport->lport, sym_name);
599 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
600 }
601
602 struct fc_function_template bfad_im_fc_function_template = {
603
604 /* Target dynamic attributes */
605 .get_starget_port_id = bfad_im_get_starget_port_id,
606 .show_starget_port_id = 1,
607 .get_starget_node_name = bfad_im_get_starget_node_name,
608 .show_starget_node_name = 1,
609 .get_starget_port_name = bfad_im_get_starget_port_name,
610 .show_starget_port_name = 1,
611
612 /* Host dynamic attribute */
613 .get_host_port_id = bfad_im_get_host_port_id,
614 .show_host_port_id = 1,
615
616 /* Host fixed attributes */
617 .show_host_node_name = 1,
618 .show_host_port_name = 1,
619 .show_host_supported_classes = 1,
620 .show_host_supported_fc4s = 1,
621 .show_host_supported_speeds = 1,
622 .show_host_maxframe_size = 1,
623
624 /* More host dynamic attributes */
625 .show_host_port_type = 1,
626 .get_host_port_type = bfad_im_get_host_port_type,
627 .show_host_port_state = 1,
628 .get_host_port_state = bfad_im_get_host_port_state,
629 .show_host_active_fc4s = 1,
630 .get_host_active_fc4s = bfad_im_get_host_active_fc4s,
631 .show_host_speed = 1,
632 .get_host_speed = bfad_im_get_host_speed,
633 .show_host_fabric_name = 1,
634 .get_host_fabric_name = bfad_im_get_host_fabric_name,
635
636 .show_host_symbolic_name = 1,
637
638 /* Statistics */
639 .get_fc_host_stats = bfad_im_get_stats,
640 .reset_fc_host_stats = bfad_im_reset_stats,
641
642 /* Allocation length for host specific data */
643 .dd_fcrport_size = sizeof(struct bfad_itnim_data_s *),
644
645 /* Remote port fixed attributes */
646 .show_rport_maxframe_size = 1,
647 .show_rport_supported_classes = 1,
648 .show_rport_dev_loss_tmo = 1,
649 .set_rport_dev_loss_tmo = bfad_im_set_rport_loss_tmo,
650 .issue_fc_host_lip = bfad_im_issue_fc_host_lip,
651 .vport_create = bfad_im_vport_create,
652 .vport_delete = bfad_im_vport_delete,
653 .vport_disable = bfad_im_vport_disable,
654 .set_vport_symbolic_name = bfad_im_vport_set_symbolic_name,
655 .bsg_request = bfad_im_bsg_request,
656 .bsg_timeout = bfad_im_bsg_timeout,
657 };
658
659 struct fc_function_template bfad_im_vport_fc_function_template = {
660
661 /* Target dynamic attributes */
662 .get_starget_port_id = bfad_im_get_starget_port_id,
663 .show_starget_port_id = 1,
664 .get_starget_node_name = bfad_im_get_starget_node_name,
665 .show_starget_node_name = 1,
666 .get_starget_port_name = bfad_im_get_starget_port_name,
667 .show_starget_port_name = 1,
668
669 /* Host dynamic attribute */
670 .get_host_port_id = bfad_im_get_host_port_id,
671 .show_host_port_id = 1,
672
673 /* Host fixed attributes */
674 .show_host_node_name = 1,
675 .show_host_port_name = 1,
676 .show_host_supported_classes = 1,
677 .show_host_supported_fc4s = 1,
678 .show_host_supported_speeds = 1,
679 .show_host_maxframe_size = 1,
680
681 /* More host dynamic attributes */
682 .show_host_port_type = 1,
683 .get_host_port_type = bfad_im_get_host_port_type,
684 .show_host_port_state = 1,
685 .get_host_port_state = bfad_im_get_host_port_state,
686 .show_host_active_fc4s = 1,
687 .get_host_active_fc4s = bfad_im_get_host_active_fc4s,
688 .show_host_speed = 1,
689 .get_host_speed = bfad_im_get_host_speed,
690 .show_host_fabric_name = 1,
691 .get_host_fabric_name = bfad_im_get_host_fabric_name,
692
693 .show_host_symbolic_name = 1,
694
695 /* Statistics */
696 .get_fc_host_stats = bfad_im_get_stats,
697 .reset_fc_host_stats = bfad_im_reset_stats,
698
699 /* Allocation length for host specific data */
700 .dd_fcrport_size = sizeof(struct bfad_itnim_data_s *),
701
702 /* Remote port fixed attributes */
703 .show_rport_maxframe_size = 1,
704 .show_rport_supported_classes = 1,
705 .show_rport_dev_loss_tmo = 1,
706 .set_rport_dev_loss_tmo = bfad_im_set_rport_loss_tmo,
707 };
708
709 /*
710 * Scsi_Host_attrs SCSI host attributes
711 */
712 static ssize_t
713 bfad_im_serial_num_show(struct device *dev, struct device_attribute *attr,
714 char *buf)
715 {
716 struct Scsi_Host *shost = class_to_shost(dev);
717 struct bfad_im_port_s *im_port =
718 (struct bfad_im_port_s *) shost->hostdata[0];
719 struct bfad_s *bfad = im_port->bfad;
720 char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN];
721
722 bfa_get_adapter_serial_num(&bfad->bfa, serial_num);
723 return snprintf(buf, PAGE_SIZE, "%s\n", serial_num);
724 }
725
726 static ssize_t
727 bfad_im_model_show(struct device *dev, struct device_attribute *attr,
728 char *buf)
729 {
730 struct Scsi_Host *shost = class_to_shost(dev);
731 struct bfad_im_port_s *im_port =
732 (struct bfad_im_port_s *) shost->hostdata[0];
733 struct bfad_s *bfad = im_port->bfad;
734 char model[BFA_ADAPTER_MODEL_NAME_LEN];
735
736 bfa_get_adapter_model(&bfad->bfa, model);
737 return snprintf(buf, PAGE_SIZE, "%s\n", model);
738 }
739
740 static ssize_t
741 bfad_im_model_desc_show(struct device *dev, struct device_attribute *attr,
742 char *buf)
743 {
744 struct Scsi_Host *shost = class_to_shost(dev);
745 struct bfad_im_port_s *im_port =
746 (struct bfad_im_port_s *) shost->hostdata[0];
747 struct bfad_s *bfad = im_port->bfad;
748 char model[BFA_ADAPTER_MODEL_NAME_LEN];
749 char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN];
750 int nports = 0;
751
752 bfa_get_adapter_model(&bfad->bfa, model);
753 nports = bfa_get_nports(&bfad->bfa);
754 if (!strcmp(model, "Brocade-425"))
755 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
756 "Brocade 4Gbps PCIe dual port FC HBA");
757 else if (!strcmp(model, "Brocade-825"))
758 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
759 "Brocade 8Gbps PCIe dual port FC HBA");
760 else if (!strcmp(model, "Brocade-42B"))
761 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
762 "Brocade 4Gbps PCIe dual port FC HBA for HP");
763 else if (!strcmp(model, "Brocade-82B"))
764 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
765 "Brocade 8Gbps PCIe dual port FC HBA for HP");
766 else if (!strcmp(model, "Brocade-1010"))
767 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
768 "Brocade 10Gbps single port CNA");
769 else if (!strcmp(model, "Brocade-1020"))
770 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
771 "Brocade 10Gbps dual port CNA");
772 else if (!strcmp(model, "Brocade-1007"))
773 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
774 "Brocade 10Gbps CNA for IBM Blade Center");
775 else if (!strcmp(model, "Brocade-415"))
776 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
777 "Brocade 4Gbps PCIe single port FC HBA");
778 else if (!strcmp(model, "Brocade-815"))
779 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
780 "Brocade 8Gbps PCIe single port FC HBA");
781 else if (!strcmp(model, "Brocade-41B"))
782 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
783 "Brocade 4Gbps PCIe single port FC HBA for HP");
784 else if (!strcmp(model, "Brocade-81B"))
785 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
786 "Brocade 8Gbps PCIe single port FC HBA for HP");
787 else if (!strcmp(model, "Brocade-804"))
788 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
789 "Brocade 8Gbps FC HBA for HP Bladesystem C-class");
790 else if (!strcmp(model, "Brocade-1741"))
791 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
792 "Brocade 10Gbps CNA for Dell M-Series Blade Servers");
793 else if (strstr(model, "Brocade-1860")) {
794 if (nports == 1 && bfa_ioc_is_cna(&bfad->bfa.ioc))
795 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
796 "Brocade 10Gbps single port CNA");
797 else if (nports == 1 && !bfa_ioc_is_cna(&bfad->bfa.ioc))
798 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
799 "Brocade 16Gbps PCIe single port FC HBA");
800 else if (nports == 2 && bfa_ioc_is_cna(&bfad->bfa.ioc))
801 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
802 "Brocade 10Gbps dual port CNA");
803 else if (nports == 2 && !bfa_ioc_is_cna(&bfad->bfa.ioc))
804 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
805 "Brocade 16Gbps PCIe dual port FC HBA");
806 } else if (!strcmp(model, "Brocade-1867")) {
807 if (nports == 1 && !bfa_ioc_is_cna(&bfad->bfa.ioc))
808 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
809 "Brocade 16Gbps PCIe single port FC HBA for IBM");
810 else if (nports == 2 && !bfa_ioc_is_cna(&bfad->bfa.ioc))
811 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
812 "Brocade 16Gbps PCIe dual port FC HBA for IBM");
813 } else
814 snprintf(model_descr, BFA_ADAPTER_MODEL_DESCR_LEN,
815 "Invalid Model");
816
817 return snprintf(buf, PAGE_SIZE, "%s\n", model_descr);
818 }
819
820 static ssize_t
821 bfad_im_node_name_show(struct device *dev, struct device_attribute *attr,
822 char *buf)
823 {
824 struct Scsi_Host *shost = class_to_shost(dev);
825 struct bfad_im_port_s *im_port =
826 (struct bfad_im_port_s *) shost->hostdata[0];
827 struct bfad_port_s *port = im_port->port;
828 u64 nwwn;
829
830 nwwn = bfa_fcs_lport_get_nwwn(port->fcs_port);
831 return snprintf(buf, PAGE_SIZE, "0x%llx\n", cpu_to_be64(nwwn));
832 }
833
834 static ssize_t
835 bfad_im_symbolic_name_show(struct device *dev, struct device_attribute *attr,
836 char *buf)
837 {
838 struct Scsi_Host *shost = class_to_shost(dev);
839 struct bfad_im_port_s *im_port =
840 (struct bfad_im_port_s *) shost->hostdata[0];
841 struct bfad_s *bfad = im_port->bfad;
842 struct bfa_lport_attr_s port_attr;
843 char symname[BFA_SYMNAME_MAXLEN];
844
845 bfa_fcs_lport_get_attr(&bfad->bfa_fcs.fabric.bport, &port_attr);
846 strncpy(symname, port_attr.port_cfg.sym_name.symname,
847 BFA_SYMNAME_MAXLEN);
848 return snprintf(buf, PAGE_SIZE, "%s\n", symname);
849 }
850
851 static ssize_t
852 bfad_im_hw_version_show(struct device *dev, struct device_attribute *attr,
853 char *buf)
854 {
855 struct Scsi_Host *shost = class_to_shost(dev);
856 struct bfad_im_port_s *im_port =
857 (struct bfad_im_port_s *) shost->hostdata[0];
858 struct bfad_s *bfad = im_port->bfad;
859 char hw_ver[BFA_VERSION_LEN];
860
861 bfa_get_pci_chip_rev(&bfad->bfa, hw_ver);
862 return snprintf(buf, PAGE_SIZE, "%s\n", hw_ver);
863 }
864
865 static ssize_t
866 bfad_im_drv_version_show(struct device *dev, struct device_attribute *attr,
867 char *buf)
868 {
869 return snprintf(buf, PAGE_SIZE, "%s\n", BFAD_DRIVER_VERSION);
870 }
871
872 static ssize_t
873 bfad_im_optionrom_version_show(struct device *dev,
874 struct device_attribute *attr, char *buf)
875 {
876 struct Scsi_Host *shost = class_to_shost(dev);
877 struct bfad_im_port_s *im_port =
878 (struct bfad_im_port_s *) shost->hostdata[0];
879 struct bfad_s *bfad = im_port->bfad;
880 char optrom_ver[BFA_VERSION_LEN];
881
882 bfa_get_adapter_optrom_ver(&bfad->bfa, optrom_ver);
883 return snprintf(buf, PAGE_SIZE, "%s\n", optrom_ver);
884 }
885
886 static ssize_t
887 bfad_im_fw_version_show(struct device *dev, struct device_attribute *attr,
888 char *buf)
889 {
890 struct Scsi_Host *shost = class_to_shost(dev);
891 struct bfad_im_port_s *im_port =
892 (struct bfad_im_port_s *) shost->hostdata[0];
893 struct bfad_s *bfad = im_port->bfad;
894 char fw_ver[BFA_VERSION_LEN];
895
896 bfa_get_adapter_fw_ver(&bfad->bfa, fw_ver);
897 return snprintf(buf, PAGE_SIZE, "%s\n", fw_ver);
898 }
899
900 static ssize_t
901 bfad_im_num_of_ports_show(struct device *dev, struct device_attribute *attr,
902 char *buf)
903 {
904 struct Scsi_Host *shost = class_to_shost(dev);
905 struct bfad_im_port_s *im_port =
906 (struct bfad_im_port_s *) shost->hostdata[0];
907 struct bfad_s *bfad = im_port->bfad;
908
909 return snprintf(buf, PAGE_SIZE, "%d\n",
910 bfa_get_nports(&bfad->bfa));
911 }
912
913 static ssize_t
914 bfad_im_drv_name_show(struct device *dev, struct device_attribute *attr,
915 char *buf)
916 {
917 return snprintf(buf, PAGE_SIZE, "%s\n", BFAD_DRIVER_NAME);
918 }
919
920 static ssize_t
921 bfad_im_num_of_discovered_ports_show(struct device *dev,
922 struct device_attribute *attr, char *buf)
923 {
924 struct Scsi_Host *shost = class_to_shost(dev);
925 struct bfad_im_port_s *im_port =
926 (struct bfad_im_port_s *) shost->hostdata[0];
927 struct bfad_port_s *port = im_port->port;
928 struct bfad_s *bfad = im_port->bfad;
929 int nrports = 2048;
930 struct bfa_rport_qualifier_s *rports = NULL;
931 unsigned long flags;
932
933 rports = kzalloc(sizeof(struct bfa_rport_qualifier_s) * nrports,
934 GFP_ATOMIC);
935 if (rports == NULL)
936 return snprintf(buf, PAGE_SIZE, "Failed\n");
937
938 spin_lock_irqsave(&bfad->bfad_lock, flags);
939 bfa_fcs_lport_get_rport_quals(port->fcs_port, rports, &nrports);
940 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
941 kfree(rports);
942
943 return snprintf(buf, PAGE_SIZE, "%d\n", nrports);
944 }
945
946 static DEVICE_ATTR(serial_number, S_IRUGO,
947 bfad_im_serial_num_show, NULL);
948 static DEVICE_ATTR(model, S_IRUGO, bfad_im_model_show, NULL);
949 static DEVICE_ATTR(model_description, S_IRUGO,
950 bfad_im_model_desc_show, NULL);
951 static DEVICE_ATTR(node_name, S_IRUGO, bfad_im_node_name_show, NULL);
952 static DEVICE_ATTR(symbolic_name, S_IRUGO,
953 bfad_im_symbolic_name_show, NULL);
954 static DEVICE_ATTR(hardware_version, S_IRUGO,
955 bfad_im_hw_version_show, NULL);
956 static DEVICE_ATTR(driver_version, S_IRUGO,
957 bfad_im_drv_version_show, NULL);
958 static DEVICE_ATTR(option_rom_version, S_IRUGO,
959 bfad_im_optionrom_version_show, NULL);
960 static DEVICE_ATTR(firmware_version, S_IRUGO,
961 bfad_im_fw_version_show, NULL);
962 static DEVICE_ATTR(number_of_ports, S_IRUGO,
963 bfad_im_num_of_ports_show, NULL);
964 static DEVICE_ATTR(driver_name, S_IRUGO, bfad_im_drv_name_show, NULL);
965 static DEVICE_ATTR(number_of_discovered_ports, S_IRUGO,
966 bfad_im_num_of_discovered_ports_show, NULL);
967
968 struct device_attribute *bfad_im_host_attrs[] = {
969 &dev_attr_serial_number,
970 &dev_attr_model,
971 &dev_attr_model_description,
972 &dev_attr_node_name,
973 &dev_attr_symbolic_name,
974 &dev_attr_hardware_version,
975 &dev_attr_driver_version,
976 &dev_attr_option_rom_version,
977 &dev_attr_firmware_version,
978 &dev_attr_number_of_ports,
979 &dev_attr_driver_name,
980 &dev_attr_number_of_discovered_ports,
981 NULL,
982 };
983
984 struct device_attribute *bfad_im_vport_attrs[] = {
985 &dev_attr_serial_number,
986 &dev_attr_model,
987 &dev_attr_model_description,
988 &dev_attr_node_name,
989 &dev_attr_symbolic_name,
990 &dev_attr_hardware_version,
991 &dev_attr_driver_version,
992 &dev_attr_option_rom_version,
993 &dev_attr_firmware_version,
994 &dev_attr_number_of_ports,
995 &dev_attr_driver_name,
996 &dev_attr_number_of_discovered_ports,
997 NULL,
998 };
999
1000
1001
1002
1003
1004
1005
1006 /* LDV_COMMENT_BEGIN_MAIN */
1007 #ifdef LDV_MAIN2_sequence_infinite_withcheck_stateful
1008
1009 /*###########################################################################*/
1010
1011 /*############## Driver Environment Generator 0.2 output ####################*/
1012
1013 /*###########################################################################*/
1014
1015
1016
1017 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test if all kernel resources are correctly released by driver before driver will be unloaded. */
1018 void ldv_check_final_state(void);
1019
1020 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result. */
1021 void ldv_check_return_value(int res);
1022
1023 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result of probe() function. */
1024 void ldv_check_return_value_probe(int res);
1025
1026 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Initializes the model. */
1027 void ldv_initialize(void);
1028
1029 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Reinitializes the model between distinct model function calls. */
1030 void ldv_handler_precall(void);
1031
1032 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Returns arbitrary interger value. */
1033 int nondet_int(void);
1034
1035 /* LDV_COMMENT_VAR_DECLARE_LDV Special variable for LDV verifier. */
1036 int LDV_IN_INTERRUPT;
1037
1038 /* LDV_COMMENT_FUNCTION_MAIN Main function for LDV verifier. */
1039 void ldv_main2_sequence_infinite_withcheck_stateful(void) {
1040
1041
1042
1043 /* LDV_COMMENT_BEGIN_VARIABLE_DECLARATION_PART */
1044 /*============================= VARIABLE DECLARATION PART =============================*/
1045 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1046 /* content: static void bfad_im_get_starget_port_id(struct scsi_target *starget)*/
1047 /* LDV_COMMENT_END_PREP */
1048 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_get_starget_port_id" */
1049 struct scsi_target * var_group1;
1050 /* content: static void bfad_im_get_starget_node_name(struct scsi_target *starget)*/
1051 /* LDV_COMMENT_END_PREP */
1052 /* content: static void bfad_im_get_starget_port_name(struct scsi_target *starget)*/
1053 /* LDV_COMMENT_END_PREP */
1054 /* content: static void bfad_im_get_host_port_id(struct Scsi_Host *shost)*/
1055 /* LDV_COMMENT_END_PREP */
1056 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_get_host_port_id" */
1057 struct Scsi_Host * var_group2;
1058 /* content: static void bfad_im_get_host_port_type(struct Scsi_Host *shost)*/
1059 /* LDV_COMMENT_END_PREP */
1060 /* content: static void bfad_im_get_host_port_state(struct Scsi_Host *shost)*/
1061 /* LDV_COMMENT_END_PREP */
1062 /* content: static void bfad_im_get_host_active_fc4s(struct Scsi_Host *shost)*/
1063 /* LDV_COMMENT_END_PREP */
1064 /* content: static void bfad_im_get_host_speed(struct Scsi_Host *shost)*/
1065 /* LDV_COMMENT_END_PREP */
1066 /* content: static void bfad_im_get_host_fabric_name(struct Scsi_Host *shost)*/
1067 /* LDV_COMMENT_END_PREP */
1068 /* content: static struct fc_host_statistics * bfad_im_get_stats(struct Scsi_Host *shost)*/
1069 /* LDV_COMMENT_END_PREP */
1070 /* content: static void bfad_im_reset_stats(struct Scsi_Host *shost)*/
1071 /* LDV_COMMENT_END_PREP */
1072 /* content: static void bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)*/
1073 /* LDV_COMMENT_END_PREP */
1074 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_set_rport_loss_tmo" */
1075 struct fc_rport * var_group3;
1076 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_set_rport_loss_tmo" */
1077 u32 var_bfad_im_set_rport_loss_tmo_11_p1;
1078 /* content: int bfad_im_issue_fc_host_lip(struct Scsi_Host *shost)*/
1079 /* LDV_COMMENT_END_PREP */
1080 /* content: static int bfad_im_vport_create(struct fc_vport *fc_vport, bool disable)*/
1081 /* LDV_COMMENT_END_PREP */
1082 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_vport_create" */
1083 struct fc_vport * var_group4;
1084 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_vport_create" */
1085 bool var_bfad_im_vport_create_12_p1;
1086 /* content: static int bfad_im_vport_delete(struct fc_vport *fc_vport)*/
1087 /* LDV_COMMENT_END_PREP */
1088 /* content: static int bfad_im_vport_disable(struct fc_vport *fc_vport, bool disable)*/
1089 /* LDV_COMMENT_END_PREP */
1090 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_vport_disable" */
1091 bool var_bfad_im_vport_disable_15_p1;
1092 /* content: void bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)*/
1093 /* LDV_COMMENT_END_PREP */
1094
1095 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1096 /* content: static void bfad_im_get_starget_port_id(struct scsi_target *starget)*/
1097 /* LDV_COMMENT_END_PREP */
1098 /* content: static void bfad_im_get_starget_node_name(struct scsi_target *starget)*/
1099 /* LDV_COMMENT_END_PREP */
1100 /* content: static void bfad_im_get_starget_port_name(struct scsi_target *starget)*/
1101 /* LDV_COMMENT_END_PREP */
1102 /* content: static void bfad_im_get_host_port_id(struct Scsi_Host *shost)*/
1103 /* LDV_COMMENT_END_PREP */
1104 /* content: static void bfad_im_get_host_port_type(struct Scsi_Host *shost)*/
1105 /* LDV_COMMENT_END_PREP */
1106 /* content: static void bfad_im_get_host_port_state(struct Scsi_Host *shost)*/
1107 /* LDV_COMMENT_END_PREP */
1108 /* content: static void bfad_im_get_host_active_fc4s(struct Scsi_Host *shost)*/
1109 /* LDV_COMMENT_END_PREP */
1110 /* content: static void bfad_im_get_host_speed(struct Scsi_Host *shost)*/
1111 /* LDV_COMMENT_END_PREP */
1112 /* content: static void bfad_im_get_host_fabric_name(struct Scsi_Host *shost)*/
1113 /* LDV_COMMENT_END_PREP */
1114 /* content: static struct fc_host_statistics * bfad_im_get_stats(struct Scsi_Host *shost)*/
1115 /* LDV_COMMENT_END_PREP */
1116 /* content: static void bfad_im_reset_stats(struct Scsi_Host *shost)*/
1117 /* LDV_COMMENT_END_PREP */
1118 /* content: static void bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)*/
1119 /* LDV_COMMENT_END_PREP */
1120
1121
1122
1123
1124 /* LDV_COMMENT_END_VARIABLE_DECLARATION_PART */
1125 /* LDV_COMMENT_BEGIN_VARIABLE_INITIALIZING_PART */
1126 /*============================= VARIABLE INITIALIZING PART =============================*/
1127 LDV_IN_INTERRUPT=1;
1128
1129
1130
1131
1132 /* LDV_COMMENT_END_VARIABLE_INITIALIZING_PART */
1133 /* LDV_COMMENT_BEGIN_FUNCTION_CALL_SECTION */
1134 /*============================= FUNCTION CALL SECTION =============================*/
1135 /* LDV_COMMENT_FUNCTION_CALL Initialize LDV model. */
1136 ldv_initialize();
1137
1138
1139
1140
1141
1142 while( nondet_int()
1143 ) {
1144
1145 switch(nondet_int()) {
1146
1147 case 0: {
1148
1149 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1150
1151
1152 /* content: static void bfad_im_get_starget_port_id(struct scsi_target *starget)*/
1153 /* LDV_COMMENT_END_PREP */
1154 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_port_id" from driver structure with callbacks "bfad_im_fc_function_template" */
1155 ldv_handler_precall();
1156 bfad_im_get_starget_port_id( var_group1);
1157
1158
1159
1160
1161 }
1162
1163 break;
1164 case 1: {
1165
1166 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1167
1168
1169 /* content: static void bfad_im_get_starget_node_name(struct scsi_target *starget)*/
1170 /* LDV_COMMENT_END_PREP */
1171 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_node_name" from driver structure with callbacks "bfad_im_fc_function_template" */
1172 ldv_handler_precall();
1173 bfad_im_get_starget_node_name( var_group1);
1174
1175
1176
1177
1178 }
1179
1180 break;
1181 case 2: {
1182
1183 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1184
1185
1186 /* content: static void bfad_im_get_starget_port_name(struct scsi_target *starget)*/
1187 /* LDV_COMMENT_END_PREP */
1188 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_port_name" from driver structure with callbacks "bfad_im_fc_function_template" */
1189 ldv_handler_precall();
1190 bfad_im_get_starget_port_name( var_group1);
1191
1192
1193
1194
1195 }
1196
1197 break;
1198 case 3: {
1199
1200 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1201
1202
1203 /* content: static void bfad_im_get_host_port_id(struct Scsi_Host *shost)*/
1204 /* LDV_COMMENT_END_PREP */
1205 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_id" from driver structure with callbacks "bfad_im_fc_function_template" */
1206 ldv_handler_precall();
1207 bfad_im_get_host_port_id( var_group2);
1208
1209
1210
1211
1212 }
1213
1214 break;
1215 case 4: {
1216
1217 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1218
1219
1220 /* content: static void bfad_im_get_host_port_type(struct Scsi_Host *shost)*/
1221 /* LDV_COMMENT_END_PREP */
1222 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_type" from driver structure with callbacks "bfad_im_fc_function_template" */
1223 ldv_handler_precall();
1224 bfad_im_get_host_port_type( var_group2);
1225
1226
1227
1228
1229 }
1230
1231 break;
1232 case 5: {
1233
1234 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1235
1236
1237 /* content: static void bfad_im_get_host_port_state(struct Scsi_Host *shost)*/
1238 /* LDV_COMMENT_END_PREP */
1239 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_state" from driver structure with callbacks "bfad_im_fc_function_template" */
1240 ldv_handler_precall();
1241 bfad_im_get_host_port_state( var_group2);
1242
1243
1244
1245
1246 }
1247
1248 break;
1249 case 6: {
1250
1251 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1252
1253
1254 /* content: static void bfad_im_get_host_active_fc4s(struct Scsi_Host *shost)*/
1255 /* LDV_COMMENT_END_PREP */
1256 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_active_fc4s" from driver structure with callbacks "bfad_im_fc_function_template" */
1257 ldv_handler_precall();
1258 bfad_im_get_host_active_fc4s( var_group2);
1259
1260
1261
1262
1263 }
1264
1265 break;
1266 case 7: {
1267
1268 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1269
1270
1271 /* content: static void bfad_im_get_host_speed(struct Scsi_Host *shost)*/
1272 /* LDV_COMMENT_END_PREP */
1273 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_speed" from driver structure with callbacks "bfad_im_fc_function_template" */
1274 ldv_handler_precall();
1275 bfad_im_get_host_speed( var_group2);
1276
1277
1278
1279
1280 }
1281
1282 break;
1283 case 8: {
1284
1285 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1286
1287
1288 /* content: static void bfad_im_get_host_fabric_name(struct Scsi_Host *shost)*/
1289 /* LDV_COMMENT_END_PREP */
1290 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_fabric_name" from driver structure with callbacks "bfad_im_fc_function_template" */
1291 ldv_handler_precall();
1292 bfad_im_get_host_fabric_name( var_group2);
1293
1294
1295
1296
1297 }
1298
1299 break;
1300 case 9: {
1301
1302 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1303
1304
1305 /* content: static struct fc_host_statistics * bfad_im_get_stats(struct Scsi_Host *shost)*/
1306 /* LDV_COMMENT_END_PREP */
1307 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_fc_host_stats" from driver structure with callbacks "bfad_im_fc_function_template" */
1308 ldv_handler_precall();
1309 bfad_im_get_stats( var_group2);
1310
1311
1312
1313
1314 }
1315
1316 break;
1317 case 10: {
1318
1319 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1320
1321
1322 /* content: static void bfad_im_reset_stats(struct Scsi_Host *shost)*/
1323 /* LDV_COMMENT_END_PREP */
1324 /* LDV_COMMENT_FUNCTION_CALL Function from field "reset_fc_host_stats" from driver structure with callbacks "bfad_im_fc_function_template" */
1325 ldv_handler_precall();
1326 bfad_im_reset_stats( var_group2);
1327
1328
1329
1330
1331 }
1332
1333 break;
1334 case 11: {
1335
1336 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1337
1338
1339 /* content: static void bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)*/
1340 /* LDV_COMMENT_END_PREP */
1341 /* LDV_COMMENT_FUNCTION_CALL Function from field "set_rport_dev_loss_tmo" from driver structure with callbacks "bfad_im_fc_function_template" */
1342 ldv_handler_precall();
1343 bfad_im_set_rport_loss_tmo( var_group3, var_bfad_im_set_rport_loss_tmo_11_p1);
1344
1345
1346
1347
1348 }
1349
1350 break;
1351 case 12: {
1352
1353 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1354
1355
1356 /* content: int bfad_im_issue_fc_host_lip(struct Scsi_Host *shost)*/
1357 /* LDV_COMMENT_END_PREP */
1358 /* LDV_COMMENT_FUNCTION_CALL Function from field "issue_fc_host_lip" from driver structure with callbacks "bfad_im_fc_function_template" */
1359 ldv_handler_precall();
1360 bfad_im_issue_fc_host_lip( var_group2);
1361
1362
1363
1364
1365 }
1366
1367 break;
1368 case 13: {
1369
1370 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1371
1372
1373 /* content: static int bfad_im_vport_create(struct fc_vport *fc_vport, bool disable)*/
1374 /* LDV_COMMENT_END_PREP */
1375 /* LDV_COMMENT_FUNCTION_CALL Function from field "vport_create" from driver structure with callbacks "bfad_im_fc_function_template" */
1376 ldv_handler_precall();
1377 bfad_im_vport_create( var_group4, var_bfad_im_vport_create_12_p1);
1378
1379
1380
1381
1382 }
1383
1384 break;
1385 case 14: {
1386
1387 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1388
1389
1390 /* content: static int bfad_im_vport_delete(struct fc_vport *fc_vport)*/
1391 /* LDV_COMMENT_END_PREP */
1392 /* LDV_COMMENT_FUNCTION_CALL Function from field "vport_delete" from driver structure with callbacks "bfad_im_fc_function_template" */
1393 ldv_handler_precall();
1394 bfad_im_vport_delete( var_group4);
1395
1396
1397
1398
1399 }
1400
1401 break;
1402 case 15: {
1403
1404 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1405
1406
1407 /* content: static int bfad_im_vport_disable(struct fc_vport *fc_vport, bool disable)*/
1408 /* LDV_COMMENT_END_PREP */
1409 /* LDV_COMMENT_FUNCTION_CALL Function from field "vport_disable" from driver structure with callbacks "bfad_im_fc_function_template" */
1410 ldv_handler_precall();
1411 bfad_im_vport_disable( var_group4, var_bfad_im_vport_disable_15_p1);
1412
1413
1414
1415
1416 }
1417
1418 break;
1419 case 16: {
1420
1421 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_fc_function_template **/
1422
1423
1424 /* content: void bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)*/
1425 /* LDV_COMMENT_END_PREP */
1426 /* LDV_COMMENT_FUNCTION_CALL Function from field "set_vport_symbolic_name" from driver structure with callbacks "bfad_im_fc_function_template" */
1427 ldv_handler_precall();
1428 bfad_im_vport_set_symbolic_name( var_group4);
1429
1430
1431
1432
1433 }
1434
1435 break;
1436 case 17: {
1437
1438 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1439
1440
1441 /* content: static void bfad_im_get_starget_port_id(struct scsi_target *starget)*/
1442 /* LDV_COMMENT_END_PREP */
1443 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_port_id" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1444 ldv_handler_precall();
1445 bfad_im_get_starget_port_id( var_group1);
1446
1447
1448
1449
1450 }
1451
1452 break;
1453 case 18: {
1454
1455 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1456
1457
1458 /* content: static void bfad_im_get_starget_node_name(struct scsi_target *starget)*/
1459 /* LDV_COMMENT_END_PREP */
1460 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_node_name" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1461 ldv_handler_precall();
1462 bfad_im_get_starget_node_name( var_group1);
1463
1464
1465
1466
1467 }
1468
1469 break;
1470 case 19: {
1471
1472 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1473
1474
1475 /* content: static void bfad_im_get_starget_port_name(struct scsi_target *starget)*/
1476 /* LDV_COMMENT_END_PREP */
1477 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_starget_port_name" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1478 ldv_handler_precall();
1479 bfad_im_get_starget_port_name( var_group1);
1480
1481
1482
1483
1484 }
1485
1486 break;
1487 case 20: {
1488
1489 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1490
1491
1492 /* content: static void bfad_im_get_host_port_id(struct Scsi_Host *shost)*/
1493 /* LDV_COMMENT_END_PREP */
1494 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_id" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1495 ldv_handler_precall();
1496 bfad_im_get_host_port_id( var_group2);
1497
1498
1499
1500
1501 }
1502
1503 break;
1504 case 21: {
1505
1506 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1507
1508
1509 /* content: static void bfad_im_get_host_port_type(struct Scsi_Host *shost)*/
1510 /* LDV_COMMENT_END_PREP */
1511 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_type" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1512 ldv_handler_precall();
1513 bfad_im_get_host_port_type( var_group2);
1514
1515
1516
1517
1518 }
1519
1520 break;
1521 case 22: {
1522
1523 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1524
1525
1526 /* content: static void bfad_im_get_host_port_state(struct Scsi_Host *shost)*/
1527 /* LDV_COMMENT_END_PREP */
1528 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_port_state" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1529 ldv_handler_precall();
1530 bfad_im_get_host_port_state( var_group2);
1531
1532
1533
1534
1535 }
1536
1537 break;
1538 case 23: {
1539
1540 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1541
1542
1543 /* content: static void bfad_im_get_host_active_fc4s(struct Scsi_Host *shost)*/
1544 /* LDV_COMMENT_END_PREP */
1545 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_active_fc4s" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1546 ldv_handler_precall();
1547 bfad_im_get_host_active_fc4s( var_group2);
1548
1549
1550
1551
1552 }
1553
1554 break;
1555 case 24: {
1556
1557 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1558
1559
1560 /* content: static void bfad_im_get_host_speed(struct Scsi_Host *shost)*/
1561 /* LDV_COMMENT_END_PREP */
1562 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_speed" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1563 ldv_handler_precall();
1564 bfad_im_get_host_speed( var_group2);
1565
1566
1567
1568
1569 }
1570
1571 break;
1572 case 25: {
1573
1574 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1575
1576
1577 /* content: static void bfad_im_get_host_fabric_name(struct Scsi_Host *shost)*/
1578 /* LDV_COMMENT_END_PREP */
1579 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_host_fabric_name" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1580 ldv_handler_precall();
1581 bfad_im_get_host_fabric_name( var_group2);
1582
1583
1584
1585
1586 }
1587
1588 break;
1589 case 26: {
1590
1591 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1592
1593
1594 /* content: static struct fc_host_statistics * bfad_im_get_stats(struct Scsi_Host *shost)*/
1595 /* LDV_COMMENT_END_PREP */
1596 /* LDV_COMMENT_FUNCTION_CALL Function from field "get_fc_host_stats" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1597 ldv_handler_precall();
1598 bfad_im_get_stats( var_group2);
1599
1600
1601
1602
1603 }
1604
1605 break;
1606 case 27: {
1607
1608 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1609
1610
1611 /* content: static void bfad_im_reset_stats(struct Scsi_Host *shost)*/
1612 /* LDV_COMMENT_END_PREP */
1613 /* LDV_COMMENT_FUNCTION_CALL Function from field "reset_fc_host_stats" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1614 ldv_handler_precall();
1615 bfad_im_reset_stats( var_group2);
1616
1617
1618
1619
1620 }
1621
1622 break;
1623 case 28: {
1624
1625 /** STRUCT: struct type: fc_function_template, struct name: bfad_im_vport_fc_function_template **/
1626
1627
1628 /* content: static void bfad_im_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)*/
1629 /* LDV_COMMENT_END_PREP */
1630 /* LDV_COMMENT_FUNCTION_CALL Function from field "set_rport_dev_loss_tmo" from driver structure with callbacks "bfad_im_vport_fc_function_template" */
1631 ldv_handler_precall();
1632 bfad_im_set_rport_loss_tmo( var_group3, var_bfad_im_set_rport_loss_tmo_11_p1);
1633
1634
1635
1636
1637 }
1638
1639 break;
1640 default: break;
1641
1642 }
1643
1644 }
1645
1646 ldv_module_exit:
1647
1648 /* LDV_COMMENT_FUNCTION_CALL Checks that all resources and locks are correctly released before the driver will be unloaded. */
1649 ldv_final: ldv_check_final_state();
1650
1651 /* LDV_COMMENT_END_FUNCTION_CALL_SECTION */
1652 return;
1653
1654 }
1655 #endif
1656
1657 /* LDV_COMMENT_END_MAIN */ 1
2 /*
3 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
4 * All rights reserved
5 * www.brocade.com
6 *
7 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License (GPL) Version 2 as
11 * published by the Free Software Foundation
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 */
18
19 /*
20 * bfad_im.c Linux driver IM module.
21 */
22
23 #include <linux/export.h>
24
25 #include "bfad_drv.h"
26 #include "bfad_im.h"
27 #include "bfa_fcs.h"
28
29 BFA_TRC_FILE(LDRV, IM);
30
31 DEFINE_IDR(bfad_im_port_index);
32 struct scsi_transport_template *bfad_im_scsi_transport_template;
33 struct scsi_transport_template *bfad_im_scsi_vport_transport_template;
34 static void bfad_im_itnim_work_handler(struct work_struct *work);
35 static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd);
36 static int bfad_im_slave_alloc(struct scsi_device *sdev);
37 static void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port,
38 struct bfad_itnim_s *itnim);
39
40 void
41 bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,
42 enum bfi_ioim_status io_status, u8 scsi_status,
43 int sns_len, u8 *sns_info, s32 residue)
44 {
45 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
46 struct bfad_s *bfad = drv;
47 struct bfad_itnim_data_s *itnim_data;
48 struct bfad_itnim_s *itnim;
49 u8 host_status = DID_OK;
50
51 switch (io_status) {
52 case BFI_IOIM_STS_OK:
53 bfa_trc(bfad, scsi_status);
54 scsi_set_resid(cmnd, 0);
55
56 if (sns_len > 0) {
57 bfa_trc(bfad, sns_len);
58 if (sns_len > SCSI_SENSE_BUFFERSIZE)
59 sns_len = SCSI_SENSE_BUFFERSIZE;
60 memcpy(cmnd->sense_buffer, sns_info, sns_len);
61 }
62
63 if (residue > 0) {
64 bfa_trc(bfad, residue);
65 scsi_set_resid(cmnd, residue);
66 if (!sns_len && (scsi_status == SAM_STAT_GOOD) &&
67 (scsi_bufflen(cmnd) - residue) <
68 cmnd->underflow) {
69 bfa_trc(bfad, 0);
70 host_status = DID_ERROR;
71 }
72 }
73 cmnd->result = ScsiResult(host_status, scsi_status);
74
75 break;
76
77 case BFI_IOIM_STS_TIMEDOUT:
78 host_status = DID_TIME_OUT;
79 cmnd->result = ScsiResult(host_status, 0);
80 break;
81 case BFI_IOIM_STS_PATHTOV:
82 host_status = DID_TRANSPORT_DISRUPTED;
83 cmnd->result = ScsiResult(host_status, 0);
84 break;
85 default:
86 host_status = DID_ERROR;
87 cmnd->result = ScsiResult(host_status, 0);
88 }
89
90 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
91 if (cmnd->device->host != NULL)
92 scsi_dma_unmap(cmnd);
93
94 cmnd->host_scribble = NULL;
95 bfa_trc(bfad, cmnd->result);
96
97 itnim_data = cmnd->device->hostdata;
98 if (itnim_data) {
99 itnim = itnim_data->itnim;
100 if (!cmnd->result && itnim &&
101 (bfa_lun_queue_depth > cmnd->device->queue_depth)) {
102 /* Queue depth adjustment for good status completion */
103 bfad_ramp_up_qdepth(itnim, cmnd->device);
104 } else if (cmnd->result == SAM_STAT_TASK_SET_FULL && itnim) {
105 /* qfull handling */
106 bfad_handle_qfull(itnim, cmnd->device);
107 }
108 }
109
110 cmnd->scsi_done(cmnd);
111 }
112
113 void
114 bfa_cb_ioim_good_comp(void *drv, struct bfad_ioim_s *dio)
115 {
116 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
117 struct bfad_itnim_data_s *itnim_data;
118 struct bfad_itnim_s *itnim;
119
120 cmnd->result = ScsiResult(DID_OK, SCSI_STATUS_GOOD);
121
122 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
123 if (cmnd->device->host != NULL)
124 scsi_dma_unmap(cmnd);
125
126 cmnd->host_scribble = NULL;
127
128 /* Queue depth adjustment */
129 if (bfa_lun_queue_depth > cmnd->device->queue_depth) {
130 itnim_data = cmnd->device->hostdata;
131 if (itnim_data) {
132 itnim = itnim_data->itnim;
133 if (itnim)
134 bfad_ramp_up_qdepth(itnim, cmnd->device);
135 }
136 }
137
138 cmnd->scsi_done(cmnd);
139 }
140
141 void
142 bfa_cb_ioim_abort(void *drv, struct bfad_ioim_s *dio)
143 {
144 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
145 struct bfad_s *bfad = drv;
146
147 cmnd->result = ScsiResult(DID_ERROR, 0);
148
149 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
150 if (cmnd->device->host != NULL)
151 scsi_dma_unmap(cmnd);
152
153 bfa_trc(bfad, cmnd->result);
154 cmnd->host_scribble = NULL;
155 }
156
157 void
158 bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk,
159 enum bfi_tskim_status tsk_status)
160 {
161 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dtsk;
162 wait_queue_head_t *wq;
163
164 cmnd->SCp.Status |= tsk_status << 1;
165 set_bit(IO_DONE_BIT, (unsigned long *)&cmnd->SCp.Status);
166 wq = (wait_queue_head_t *) cmnd->SCp.ptr;
167 cmnd->SCp.ptr = NULL;
168
169 if (wq)
170 wake_up(wq);
171 }
172
173 /*
174 * Scsi_Host_template SCSI host template
175 */
176 /*
177 * Scsi_Host template entry, returns BFAD PCI info.
178 */
179 static const char *
180 bfad_im_info(struct Scsi_Host *shost)
181 {
182 static char bfa_buf[256];
183 struct bfad_im_port_s *im_port =
184 (struct bfad_im_port_s *) shost->hostdata[0];
185 struct bfad_s *bfad = im_port->bfad;
186
187 memset(bfa_buf, 0, sizeof(bfa_buf));
188 snprintf(bfa_buf, sizeof(bfa_buf),
189 "Brocade FC/FCOE Adapter, " "hwpath: %s driver: %s",
190 bfad->pci_name, BFAD_DRIVER_VERSION);
191
192 return bfa_buf;
193 }
194
195 /*
196 * Scsi_Host template entry, aborts the specified SCSI command.
197 *
198 * Returns: SUCCESS or FAILED.
199 */
200 static int
201 bfad_im_abort_handler(struct scsi_cmnd *cmnd)
202 {
203 struct Scsi_Host *shost = cmnd->device->host;
204 struct bfad_im_port_s *im_port =
205 (struct bfad_im_port_s *) shost->hostdata[0];
206 struct bfad_s *bfad = im_port->bfad;
207 struct bfa_ioim_s *hal_io;
208 unsigned long flags;
209 u32 timeout;
210 int rc = FAILED;
211
212 spin_lock_irqsave(&bfad->bfad_lock, flags);
213 hal_io = (struct bfa_ioim_s *) cmnd->host_scribble;
214 if (!hal_io) {
215 /* IO has been completed, return success */
216 rc = SUCCESS;
217 goto out;
218 }
219 if (hal_io->dio != (struct bfad_ioim_s *) cmnd) {
220 rc = FAILED;
221 goto out;
222 }
223
224 bfa_trc(bfad, hal_io->iotag);
225 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
226 "scsi%d: abort cmnd %p iotag %x\n",
227 im_port->shost->host_no, cmnd, hal_io->iotag);
228 (void) bfa_ioim_abort(hal_io);
229 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
230
231 /* Need to wait until the command get aborted */
232 timeout = 10;
233 while ((struct bfa_ioim_s *) cmnd->host_scribble == hal_io) {
234 set_current_state(TASK_UNINTERRUPTIBLE);
235 schedule_timeout(timeout);
236 if (timeout < 4 * HZ)
237 timeout *= 2;
238 }
239
240 cmnd->scsi_done(cmnd);
241 bfa_trc(bfad, hal_io->iotag);
242 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
243 "scsi%d: complete abort 0x%p iotag 0x%x\n",
244 im_port->shost->host_no, cmnd, hal_io->iotag);
245 return SUCCESS;
246 out:
247 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
248 return rc;
249 }
250
251 static bfa_status_t
252 bfad_im_target_reset_send(struct bfad_s *bfad, struct scsi_cmnd *cmnd,
253 struct bfad_itnim_s *itnim)
254 {
255 struct bfa_tskim_s *tskim;
256 struct bfa_itnim_s *bfa_itnim;
257 bfa_status_t rc = BFA_STATUS_OK;
258 struct scsi_lun scsilun;
259
260 tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd);
261 if (!tskim) {
262 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
263 "target reset, fail to allocate tskim\n");
264 rc = BFA_STATUS_FAILED;
265 goto out;
266 }
267
268 /*
269 * Set host_scribble to NULL to avoid aborting a task command if
270 * happens.
271 */
272 cmnd->host_scribble = NULL;
273 cmnd->SCp.Status = 0;
274 bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim);
275 memset(&scsilun, 0, sizeof(scsilun));
276 bfa_tskim_start(tskim, bfa_itnim, scsilun,
277 FCP_TM_TARGET_RESET, BFAD_TARGET_RESET_TMO);
278 out:
279 return rc;
280 }
281
282 /*
283 * Scsi_Host template entry, resets a LUN and abort its all commands.
284 *
285 * Returns: SUCCESS or FAILED.
286 *
287 */
288 static int
289 bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)
290 {
291 struct Scsi_Host *shost = cmnd->device->host;
292 struct bfad_im_port_s *im_port =
293 (struct bfad_im_port_s *) shost->hostdata[0];
294 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata;
295 struct bfad_s *bfad = im_port->bfad;
296 struct bfa_tskim_s *tskim;
297 struct bfad_itnim_s *itnim;
298 struct bfa_itnim_s *bfa_itnim;
299 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
300 int rc = SUCCESS;
301 unsigned long flags;
302 enum bfi_tskim_status task_status;
303 struct scsi_lun scsilun;
304
305 spin_lock_irqsave(&bfad->bfad_lock, flags);
306 itnim = itnim_data->itnim;
307 if (!itnim) {
308 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
309 rc = FAILED;
310 goto out;
311 }
312
313 tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd);
314 if (!tskim) {
315 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
316 "LUN reset, fail to allocate tskim");
317 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
318 rc = FAILED;
319 goto out;
320 }
321
322 /*
323 * Set host_scribble to NULL to avoid aborting a task command
324 * if happens.
325 */
326 cmnd->host_scribble = NULL;
327 cmnd->SCp.ptr = (char *)&wq;
328 cmnd->SCp.Status = 0;
329 bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim);
330 int_to_scsilun(cmnd->device->lun, &scsilun);
331 bfa_tskim_start(tskim, bfa_itnim, scsilun,
332 FCP_TM_LUN_RESET, BFAD_LUN_RESET_TMO);
333 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
334
335 wait_event(wq, test_bit(IO_DONE_BIT,
336 (unsigned long *)&cmnd->SCp.Status));
337
338 task_status = cmnd->SCp.Status >> 1;
339 if (task_status != BFI_TSKIM_STS_OK) {
340 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
341 "LUN reset failure, status: %d\n", task_status);
342 rc = FAILED;
343 }
344
345 out:
346 return rc;
347 }
348
349 /*
350 * Scsi_Host template entry, resets the bus and abort all commands.
351 */
352 static int
353 bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)
354 {
355 struct Scsi_Host *shost = cmnd->device->host;
356 struct bfad_im_port_s *im_port =
357 (struct bfad_im_port_s *) shost->hostdata[0];
358 struct bfad_s *bfad = im_port->bfad;
359 struct bfad_itnim_s *itnim;
360 unsigned long flags;
361 u32 i, rc, err_cnt = 0;
362 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
363 enum bfi_tskim_status task_status;
364
365 spin_lock_irqsave(&bfad->bfad_lock, flags);
366 for (i = 0; i < MAX_FCP_TARGET; i++) {
367 itnim = bfad_get_itnim(im_port, i);
368 if (itnim) {
369 cmnd->SCp.ptr = (char *)&wq;
370 rc = bfad_im_target_reset_send(bfad, cmnd, itnim);
371 if (rc != BFA_STATUS_OK) {
372 err_cnt++;
373 continue;
374 }
375
376 /* wait target reset to complete */
377 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
378 wait_event(wq, test_bit(IO_DONE_BIT,
379 (unsigned long *)&cmnd->SCp.Status));
380 spin_lock_irqsave(&bfad->bfad_lock, flags);
381
382 task_status = cmnd->SCp.Status >> 1;
383 if (task_status != BFI_TSKIM_STS_OK) {
384 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
385 "target reset failure,"
386 " status: %d\n", task_status);
387 err_cnt++;
388 }
389 }
390 }
391 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
392
393 if (err_cnt)
394 return FAILED;
395
396 return SUCCESS;
397 }
398
399 /*
400 * Scsi_Host template entry slave_destroy.
401 */
402 static void
403 bfad_im_slave_destroy(struct scsi_device *sdev)
404 {
405 sdev->hostdata = NULL;
406 return;
407 }
408
409 /*
410 * BFA FCS itnim callbacks
411 */
412
413 /*
414 * BFA FCS itnim alloc callback, after successful PRLI
415 * Context: Interrupt
416 */
417 void
418 bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim,
419 struct bfad_itnim_s **itnim_drv)
420 {
421 *itnim_drv = kzalloc(sizeof(struct bfad_itnim_s), GFP_ATOMIC);
422 if (*itnim_drv == NULL)
423 return;
424
425 (*itnim_drv)->im = bfad->im;
426 *itnim = &(*itnim_drv)->fcs_itnim;
427 (*itnim_drv)->state = ITNIM_STATE_NONE;
428
429 /*
430 * Initiaze the itnim_work
431 */
432 INIT_WORK(&(*itnim_drv)->itnim_work, bfad_im_itnim_work_handler);
433 bfad->bfad_flags |= BFAD_RPORT_ONLINE;
434 }
435
436 /*
437 * BFA FCS itnim free callback.
438 * Context: Interrupt. bfad_lock is held
439 */
440 void
441 bfa_fcb_itnim_free(struct bfad_s *bfad, struct bfad_itnim_s *itnim_drv)
442 {
443 struct bfad_port_s *port;
444 wwn_t wwpn;
445 u32 fcid;
446 char wwpn_str[32], fcid_str[16];
447 struct bfad_im_s *im = itnim_drv->im;
448
449 /* online to free state transtion should not happen */
450 WARN_ON(itnim_drv->state == ITNIM_STATE_ONLINE);
451
452 itnim_drv->queue_work = 1;
453 /* offline request is not yet done, use the same request to free */
454 if (itnim_drv->state == ITNIM_STATE_OFFLINE_PENDING)
455 itnim_drv->queue_work = 0;
456
457 itnim_drv->state = ITNIM_STATE_FREE;
458 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
459 itnim_drv->im_port = port->im_port;
460 wwpn = bfa_fcs_itnim_get_pwwn(&itnim_drv->fcs_itnim);
461 fcid = bfa_fcs_itnim_get_fcid(&itnim_drv->fcs_itnim);
462 wwn2str(wwpn_str, wwpn);
463 fcid2str(fcid_str, fcid);
464 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
465 "ITNIM FREE scsi%d: FCID: %s WWPN: %s\n",
466 port->im_port->shost->host_no,
467 fcid_str, wwpn_str);
468
469 /* ITNIM processing */
470 if (itnim_drv->queue_work)
471 queue_work(im->drv_workq, &itnim_drv->itnim_work);
472 }
473
474 /*
475 * BFA FCS itnim online callback.
476 * Context: Interrupt. bfad_lock is held
477 */
478 void
479 bfa_fcb_itnim_online(struct bfad_itnim_s *itnim_drv)
480 {
481 struct bfad_port_s *port;
482 struct bfad_im_s *im = itnim_drv->im;
483
484 itnim_drv->bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim_drv->fcs_itnim);
485 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
486 itnim_drv->state = ITNIM_STATE_ONLINE;
487 itnim_drv->queue_work = 1;
488 itnim_drv->im_port = port->im_port;
489
490 /* ITNIM processing */
491 if (itnim_drv->queue_work)
492 queue_work(im->drv_workq, &itnim_drv->itnim_work);
493 }
494
495 /*
496 * BFA FCS itnim offline callback.
497 * Context: Interrupt. bfad_lock is held
498 */
499 void
500 bfa_fcb_itnim_offline(struct bfad_itnim_s *itnim_drv)
501 {
502 struct bfad_port_s *port;
503 struct bfad_s *bfad;
504 struct bfad_im_s *im = itnim_drv->im;
505
506 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
507 bfad = port->bfad;
508 if ((bfad->pport.flags & BFAD_PORT_DELETE) ||
509 (port->flags & BFAD_PORT_DELETE)) {
510 itnim_drv->state = ITNIM_STATE_OFFLINE;
511 return;
512 }
513 itnim_drv->im_port = port->im_port;
514 itnim_drv->state = ITNIM_STATE_OFFLINE_PENDING;
515 itnim_drv->queue_work = 1;
516
517 /* ITNIM processing */
518 if (itnim_drv->queue_work)
519 queue_work(im->drv_workq, &itnim_drv->itnim_work);
520 }
521
522 /*
523 * Allocate a Scsi_Host for a port.
524 */
525 int
526 bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
527 struct device *dev)
528 {
529 int error = 1;
530
531 mutex_lock(&bfad_mutex);
532 error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL);
533 if (error < 0) {
534 mutex_unlock(&bfad_mutex);
535 printk(KERN_WARNING "idr_alloc failure\n");
536 goto out;
537 }
538 im_port->idr_id = error;
539 mutex_unlock(&bfad_mutex);
540
541 im_port->shost = bfad_scsi_host_alloc(im_port, bfad);
542 if (!im_port->shost) {
543 error = 1;
544 goto out_free_idr;
545 }
546
547 im_port->shost->hostdata[0] = (unsigned long)im_port;
548 im_port->shost->unique_id = im_port->idr_id;
549 im_port->shost->this_id = -1;
550 im_port->shost->max_id = MAX_FCP_TARGET;
551 im_port->shost->max_lun = MAX_FCP_LUN;
552 im_port->shost->max_cmd_len = 16;
553 im_port->shost->can_queue = bfad->cfg_data.ioc_queue_depth;
554 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
555 im_port->shost->transportt = bfad_im_scsi_transport_template;
556 else
557 im_port->shost->transportt =
558 bfad_im_scsi_vport_transport_template;
559
560 error = scsi_add_host_with_dma(im_port->shost, dev, &bfad->pcidev->dev);
561 if (error) {
562 printk(KERN_WARNING "scsi_add_host failure %d\n", error);
563 goto out_fc_rel;
564 }
565
566 return 0;
567
568 out_fc_rel:
569 scsi_host_put(im_port->shost);
570 im_port->shost = NULL;
571 out_free_idr:
572 mutex_lock(&bfad_mutex);
573 idr_remove(&bfad_im_port_index, im_port->idr_id);
574 mutex_unlock(&bfad_mutex);
575 out:
576 return error;
577 }
578
579 void
580 bfad_im_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
581 {
582 bfa_trc(bfad, bfad->inst_no);
583 BFA_LOG(KERN_INFO, bfad, bfa_log_level, "Free scsi%d\n",
584 im_port->shost->host_no);
585
586 fc_remove_host(im_port->shost);
587
588 scsi_remove_host(im_port->shost);
589 scsi_host_put(im_port->shost);
590
591 mutex_lock(&bfad_mutex);
592 idr_remove(&bfad_im_port_index, im_port->idr_id);
593 mutex_unlock(&bfad_mutex);
594 }
595
596 static void
597 bfad_im_port_delete_handler(struct work_struct *work)
598 {
599 struct bfad_im_port_s *im_port =
600 container_of(work, struct bfad_im_port_s, port_delete_work);
601
602 if (im_port->port->pvb_type != BFAD_PORT_PHYS_BASE) {
603 im_port->flags |= BFAD_PORT_DELETE;
604 fc_vport_terminate(im_port->fc_vport);
605 }
606 }
607
608 bfa_status_t
609 bfad_im_port_new(struct bfad_s *bfad, struct bfad_port_s *port)
610 {
611 int rc = BFA_STATUS_OK;
612 struct bfad_im_port_s *im_port;
613
614 im_port = kzalloc(sizeof(struct bfad_im_port_s), GFP_ATOMIC);
615 if (im_port == NULL) {
616 rc = BFA_STATUS_ENOMEM;
617 goto ext;
618 }
619 port->im_port = im_port;
620 im_port->port = port;
621 im_port->bfad = bfad;
622
623 INIT_WORK(&im_port->port_delete_work, bfad_im_port_delete_handler);
624 INIT_LIST_HEAD(&im_port->itnim_mapped_list);
625 INIT_LIST_HEAD(&im_port->binding_list);
626
627 ext:
628 return rc;
629 }
630
631 void
632 bfad_im_port_delete(struct bfad_s *bfad, struct bfad_port_s *port)
633 {
634 struct bfad_im_port_s *im_port = port->im_port;
635
636 queue_work(bfad->im->drv_workq,
637 &im_port->port_delete_work);
638 }
639
640 void
641 bfad_im_port_clean(struct bfad_im_port_s *im_port)
642 {
643 struct bfad_fcp_binding *bp, *bp_new;
644 unsigned long flags;
645 struct bfad_s *bfad = im_port->bfad;
646
647 spin_lock_irqsave(&bfad->bfad_lock, flags);
648 list_for_each_entry_safe(bp, bp_new, &im_port->binding_list,
649 list_entry) {
650 list_del(&bp->list_entry);
651 kfree(bp);
652 }
653
654 /* the itnim_mapped_list must be empty at this time */
655 WARN_ON(!list_empty(&im_port->itnim_mapped_list));
656
657 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
658 }
659
660 static void bfad_aen_im_notify_handler(struct work_struct *work)
661 {
662 struct bfad_im_s *im =
663 container_of(work, struct bfad_im_s, aen_im_notify_work);
664 struct bfa_aen_entry_s *aen_entry;
665 struct bfad_s *bfad = im->bfad;
666 struct Scsi_Host *shost = bfad->pport.im_port->shost;
667 void *event_data;
668 unsigned long flags;
669
670 while (!list_empty(&bfad->active_aen_q)) {
671 spin_lock_irqsave(&bfad->bfad_aen_spinlock, flags);
672 bfa_q_deq(&bfad->active_aen_q, &aen_entry);
673 spin_unlock_irqrestore(&bfad->bfad_aen_spinlock, flags);
674 event_data = (char *)aen_entry + sizeof(struct list_head);
675 fc_host_post_vendor_event(shost, fc_get_event_number(),
676 sizeof(struct bfa_aen_entry_s) -
677 sizeof(struct list_head),
678 (char *)event_data, BFAD_NL_VENDOR_ID);
679 spin_lock_irqsave(&bfad->bfad_aen_spinlock, flags);
680 list_add_tail(&aen_entry->qe, &bfad->free_aen_q);
681 spin_unlock_irqrestore(&bfad->bfad_aen_spinlock, flags);
682 }
683 }
684
685 bfa_status_t
686 bfad_im_probe(struct bfad_s *bfad)
687 {
688 struct bfad_im_s *im;
689
690 im = kzalloc(sizeof(struct bfad_im_s), GFP_KERNEL);
691 if (im == NULL)
692 return BFA_STATUS_ENOMEM;
693
694 bfad->im = im;
695 im->bfad = bfad;
696
697 if (bfad_thread_workq(bfad) != BFA_STATUS_OK) {
698 kfree(im);
699 return BFA_STATUS_FAILED;
700 }
701
702 INIT_WORK(&im->aen_im_notify_work, bfad_aen_im_notify_handler);
703 return BFA_STATUS_OK;
704 }
705
706 void
707 bfad_im_probe_undo(struct bfad_s *bfad)
708 {
709 if (bfad->im) {
710 bfad_destroy_workq(bfad->im);
711 kfree(bfad->im);
712 bfad->im = NULL;
713 }
714 }
715
716 struct Scsi_Host *
717 bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)
718 {
719 struct scsi_host_template *sht;
720
721 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
722 sht = &bfad_im_scsi_host_template;
723 else
724 sht = &bfad_im_vport_template;
725
726 if (max_xfer_size != BFAD_MAX_SECTORS >> 1)
727 sht->max_sectors = max_xfer_size << 1;
728
729 sht->sg_tablesize = bfad->cfg_data.io_max_sge;
730
731 return scsi_host_alloc(sht, sizeof(unsigned long));
732 }
733
734 void
735 bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
736 {
737 if (!(im_port->flags & BFAD_PORT_DELETE))
738 flush_workqueue(bfad->im->drv_workq);
739 bfad_im_scsi_host_free(im_port->bfad, im_port);
740 bfad_im_port_clean(im_port);
741 kfree(im_port);
742 }
743
744 void
745 bfad_destroy_workq(struct bfad_im_s *im)
746 {
747 if (im && im->drv_workq) {
748 flush_workqueue(im->drv_workq);
749 destroy_workqueue(im->drv_workq);
750 im->drv_workq = NULL;
751 }
752 }
753
754 bfa_status_t
755 bfad_thread_workq(struct bfad_s *bfad)
756 {
757 struct bfad_im_s *im = bfad->im;
758
759 bfa_trc(bfad, 0);
760 snprintf(im->drv_workq_name, KOBJ_NAME_LEN, "bfad_wq_%d",
761 bfad->inst_no);
762 im->drv_workq = create_singlethread_workqueue(im->drv_workq_name);
763 if (!im->drv_workq)
764 return BFA_STATUS_FAILED;
765
766 return BFA_STATUS_OK;
767 }
768
769 /*
770 * Scsi_Host template entry.
771 *
772 * Description:
773 * OS entry point to adjust the queue_depths on a per-device basis.
774 * Called once per device during the bus scan.
775 * Return non-zero if fails.
776 */
777 static int
778 bfad_im_slave_configure(struct scsi_device *sdev)
779 {
780 scsi_change_queue_depth(sdev, bfa_lun_queue_depth);
781 return 0;
782 }
783
784 struct scsi_host_template bfad_im_scsi_host_template = {
785 .module = THIS_MODULE,
786 .name = BFAD_DRIVER_NAME,
787 .info = bfad_im_info,
788 .queuecommand = bfad_im_queuecommand,
789 .eh_abort_handler = bfad_im_abort_handler,
790 .eh_device_reset_handler = bfad_im_reset_lun_handler,
791 .eh_bus_reset_handler = bfad_im_reset_bus_handler,
792
793 .slave_alloc = bfad_im_slave_alloc,
794 .slave_configure = bfad_im_slave_configure,
795 .slave_destroy = bfad_im_slave_destroy,
796
797 .this_id = -1,
798 .sg_tablesize = BFAD_IO_MAX_SGE,
799 .cmd_per_lun = 3,
800 .use_clustering = ENABLE_CLUSTERING,
801 .shost_attrs = bfad_im_host_attrs,
802 .max_sectors = BFAD_MAX_SECTORS,
803 .vendor_id = BFA_PCI_VENDOR_ID_BROCADE,
804 .use_blk_tags = 1,
805 };
806
807 struct scsi_host_template bfad_im_vport_template = {
808 .module = THIS_MODULE,
809 .name = BFAD_DRIVER_NAME,
810 .info = bfad_im_info,
811 .queuecommand = bfad_im_queuecommand,
812 .eh_abort_handler = bfad_im_abort_handler,
813 .eh_device_reset_handler = bfad_im_reset_lun_handler,
814 .eh_bus_reset_handler = bfad_im_reset_bus_handler,
815
816 .slave_alloc = bfad_im_slave_alloc,
817 .slave_configure = bfad_im_slave_configure,
818 .slave_destroy = bfad_im_slave_destroy,
819
820 .this_id = -1,
821 .sg_tablesize = BFAD_IO_MAX_SGE,
822 .cmd_per_lun = 3,
823 .use_clustering = ENABLE_CLUSTERING,
824 .shost_attrs = bfad_im_vport_attrs,
825 .max_sectors = BFAD_MAX_SECTORS,
826 .use_blk_tags = 1,
827 };
828
829 bfa_status_t
830 bfad_im_module_init(void)
831 {
832 bfad_im_scsi_transport_template =
833 fc_attach_transport(&bfad_im_fc_function_template);
834 if (!bfad_im_scsi_transport_template)
835 return BFA_STATUS_ENOMEM;
836
837 bfad_im_scsi_vport_transport_template =
838 fc_attach_transport(&bfad_im_vport_fc_function_template);
839 if (!bfad_im_scsi_vport_transport_template) {
840 fc_release_transport(bfad_im_scsi_transport_template);
841 return BFA_STATUS_ENOMEM;
842 }
843
844 return BFA_STATUS_OK;
845 }
846
847 void
848 bfad_im_module_exit(void)
849 {
850 if (bfad_im_scsi_transport_template)
851 fc_release_transport(bfad_im_scsi_transport_template);
852
853 if (bfad_im_scsi_vport_transport_template)
854 fc_release_transport(bfad_im_scsi_vport_transport_template);
855 }
856
857 void
858 bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
859 {
860 struct scsi_device *tmp_sdev;
861
862 if (((jiffies - itnim->last_ramp_up_time) >
863 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ) &&
864 ((jiffies - itnim->last_queue_full_time) >
865 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ)) {
866 shost_for_each_device(tmp_sdev, sdev->host) {
867 if (bfa_lun_queue_depth > tmp_sdev->queue_depth) {
868 if (tmp_sdev->id != sdev->id)
869 continue;
870 scsi_change_queue_depth(tmp_sdev,
871 tmp_sdev->queue_depth + 1);
872
873 itnim->last_ramp_up_time = jiffies;
874 }
875 }
876 }
877 }
878
879 void
880 bfad_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
881 {
882 struct scsi_device *tmp_sdev;
883
884 itnim->last_queue_full_time = jiffies;
885
886 shost_for_each_device(tmp_sdev, sdev->host) {
887 if (tmp_sdev->id != sdev->id)
888 continue;
889 scsi_track_queue_full(tmp_sdev, tmp_sdev->queue_depth - 1);
890 }
891 }
892
893 struct bfad_itnim_s *
894 bfad_get_itnim(struct bfad_im_port_s *im_port, int id)
895 {
896 struct bfad_itnim_s *itnim = NULL;
897
898 /* Search the mapped list for this target ID */
899 list_for_each_entry(itnim, &im_port->itnim_mapped_list, list_entry) {
900 if (id == itnim->scsi_tgt_id)
901 return itnim;
902 }
903
904 return NULL;
905 }
906
907 /*
908 * Function is invoked from the SCSI Host Template slave_alloc() entry point.
909 * Has the logic to query the LUN Mask database to check if this LUN needs to
910 * be made visible to the SCSI mid-layer or not.
911 *
912 * Returns BFA_STATUS_OK if this LUN needs to be added to the OS stack.
913 * Returns -ENXIO to notify SCSI mid-layer to not add this LUN to the OS stack.
914 */
915 static int
916 bfad_im_check_if_make_lun_visible(struct scsi_device *sdev,
917 struct fc_rport *rport)
918 {
919 struct bfad_itnim_data_s *itnim_data =
920 (struct bfad_itnim_data_s *) rport->dd_data;
921 struct bfa_s *bfa = itnim_data->itnim->bfa_itnim->bfa;
922 struct bfa_rport_s *bfa_rport = itnim_data->itnim->bfa_itnim->rport;
923 struct bfa_lun_mask_s *lun_list = bfa_get_lun_mask_list(bfa);
924 int i = 0, ret = -ENXIO;
925
926 for (i = 0; i < MAX_LUN_MASK_CFG; i++) {
927 if (lun_list[i].state == BFA_IOIM_LUN_MASK_ACTIVE &&
928 scsilun_to_int(&lun_list[i].lun) == sdev->lun &&
929 lun_list[i].rp_tag == bfa_rport->rport_tag &&
930 lun_list[i].lp_tag == (u8)bfa_rport->rport_info.lp_tag) {
931 ret = BFA_STATUS_OK;
932 break;
933 }
934 }
935 return ret;
936 }
937
938 /*
939 * Scsi_Host template entry slave_alloc
940 */
941 static int
942 bfad_im_slave_alloc(struct scsi_device *sdev)
943 {
944 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
945 struct bfad_itnim_data_s *itnim_data;
946 struct bfa_s *bfa;
947
948 if (!rport || fc_remote_port_chkready(rport))
949 return -ENXIO;
950
951 itnim_data = (struct bfad_itnim_data_s *) rport->dd_data;
952 bfa = itnim_data->itnim->bfa_itnim->bfa;
953
954 if (bfa_get_lun_mask_status(bfa) == BFA_LUNMASK_ENABLED) {
955 /*
956 * We should not mask LUN 0 - since this will translate
957 * to no LUN / TARGET for SCSI ml resulting no scan.
958 */
959 if (sdev->lun == 0) {
960 sdev->sdev_bflags |= BLIST_NOREPORTLUN |
961 BLIST_SPARSELUN;
962 goto done;
963 }
964
965 /*
966 * Query LUN Mask configuration - to expose this LUN
967 * to the SCSI mid-layer or to mask it.
968 */
969 if (bfad_im_check_if_make_lun_visible(sdev, rport) !=
970 BFA_STATUS_OK)
971 return -ENXIO;
972 }
973 done:
974 sdev->hostdata = rport->dd_data;
975
976 return 0;
977 }
978
979 u32
980 bfad_im_supported_speeds(struct bfa_s *bfa)
981 {
982 struct bfa_ioc_attr_s *ioc_attr;
983 u32 supported_speed = 0;
984
985 ioc_attr = kzalloc(sizeof(struct bfa_ioc_attr_s), GFP_KERNEL);
986 if (!ioc_attr)
987 return 0;
988
989 bfa_ioc_get_attr(&bfa->ioc, ioc_attr);
990 if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_16GBPS)
991 supported_speed |= FC_PORTSPEED_16GBIT | FC_PORTSPEED_8GBIT |
992 FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT;
993 else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) {
994 if (ioc_attr->adapter_attr.is_mezz) {
995 supported_speed |= FC_PORTSPEED_8GBIT |
996 FC_PORTSPEED_4GBIT |
997 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT;
998 } else {
999 supported_speed |= FC_PORTSPEED_8GBIT |
1000 FC_PORTSPEED_4GBIT |
1001 FC_PORTSPEED_2GBIT;
1002 }
1003 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) {
1004 supported_speed |= FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT |
1005 FC_PORTSPEED_1GBIT;
1006 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) {
1007 supported_speed |= FC_PORTSPEED_10GBIT;
1008 }
1009 kfree(ioc_attr);
1010 return supported_speed;
1011 }
1012
1013 void
1014 bfad_fc_host_init(struct bfad_im_port_s *im_port)
1015 {
1016 struct Scsi_Host *host = im_port->shost;
1017 struct bfad_s *bfad = im_port->bfad;
1018 struct bfad_port_s *port = im_port->port;
1019 char symname[BFA_SYMNAME_MAXLEN];
1020 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
1021
1022 fc_host_node_name(host) =
1023 cpu_to_be64((bfa_fcs_lport_get_nwwn(port->fcs_port)));
1024 fc_host_port_name(host) =
1025 cpu_to_be64((bfa_fcs_lport_get_pwwn(port->fcs_port)));
1026 fc_host_max_npiv_vports(host) = bfa_lps_get_max_vport(&bfad->bfa);
1027
1028 fc_host_supported_classes(host) = FC_COS_CLASS3;
1029
1030 memset(fc_host_supported_fc4s(host), 0,
1031 sizeof(fc_host_supported_fc4s(host)));
1032 if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM)
1033 /* For FCP type 0x08 */
1034 fc_host_supported_fc4s(host)[2] = 1;
1035 /* For fibre channel services type 0x20 */
1036 fc_host_supported_fc4s(host)[7] = 1;
1037
1038 strlcpy(symname, bfad->bfa_fcs.fabric.bport.port_cfg.sym_name.symname,
1039 BFA_SYMNAME_MAXLEN);
1040 sprintf(fc_host_symbolic_name(host), "%s", symname);
1041
1042 fc_host_supported_speeds(host) = bfad_im_supported_speeds(&bfad->bfa);
1043 fc_host_maxframe_size(host) = fcport->cfg.maxfrsize;
1044 }
1045
1046 static void
1047 bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim)
1048 {
1049 struct fc_rport_identifiers rport_ids;
1050 struct fc_rport *fc_rport;
1051 struct bfad_itnim_data_s *itnim_data;
1052
1053 rport_ids.node_name =
1054 cpu_to_be64(bfa_fcs_itnim_get_nwwn(&itnim->fcs_itnim));
1055 rport_ids.port_name =
1056 cpu_to_be64(bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim));
1057 rport_ids.port_id =
1058 bfa_hton3b(bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim));
1059 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
1060
1061 itnim->fc_rport = fc_rport =
1062 fc_remote_port_add(im_port->shost, 0, &rport_ids);
1063
1064 if (!fc_rport)
1065 return;
1066
1067 fc_rport->maxframe_size =
1068 bfa_fcs_itnim_get_maxfrsize(&itnim->fcs_itnim);
1069 fc_rport->supported_classes = bfa_fcs_itnim_get_cos(&itnim->fcs_itnim);
1070
1071 itnim_data = fc_rport->dd_data;
1072 itnim_data->itnim = itnim;
1073
1074 rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
1075
1076 if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
1077 fc_remote_port_rolechg(fc_rport, rport_ids.roles);
1078
1079 if ((fc_rport->scsi_target_id != -1)
1080 && (fc_rport->scsi_target_id < MAX_FCP_TARGET))
1081 itnim->scsi_tgt_id = fc_rport->scsi_target_id;
1082
1083 itnim->channel = fc_rport->channel;
1084
1085 return;
1086 }
1087
1088 /*
1089 * Work queue handler using FC transport service
1090 * Context: kernel
1091 */
1092 static void
1093 bfad_im_itnim_work_handler(struct work_struct *work)
1094 {
1095 struct bfad_itnim_s *itnim = container_of(work, struct bfad_itnim_s,
1096 itnim_work);
1097 struct bfad_im_s *im = itnim->im;
1098 struct bfad_s *bfad = im->bfad;
1099 struct bfad_im_port_s *im_port;
1100 unsigned long flags;
1101 struct fc_rport *fc_rport;
1102 wwn_t wwpn;
1103 u32 fcid;
1104 char wwpn_str[32], fcid_str[16];
1105
1106 spin_lock_irqsave(&bfad->bfad_lock, flags);
1107 im_port = itnim->im_port;
1108 bfa_trc(bfad, itnim->state);
1109 switch (itnim->state) {
1110 case ITNIM_STATE_ONLINE:
1111 if (!itnim->fc_rport) {
1112 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1113 bfad_im_fc_rport_add(im_port, itnim);
1114 spin_lock_irqsave(&bfad->bfad_lock, flags);
1115 wwpn = bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim);
1116 fcid = bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim);
1117 wwn2str(wwpn_str, wwpn);
1118 fcid2str(fcid_str, fcid);
1119 list_add_tail(&itnim->list_entry,
1120 &im_port->itnim_mapped_list);
1121 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
1122 "ITNIM ONLINE Target: %d:0:%d "
1123 "FCID: %s WWPN: %s\n",
1124 im_port->shost->host_no,
1125 itnim->scsi_tgt_id,
1126 fcid_str, wwpn_str);
1127 } else {
1128 printk(KERN_WARNING
1129 "%s: itnim %llx is already in online state\n",
1130 __func__,
1131 bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim));
1132 }
1133
1134 break;
1135 case ITNIM_STATE_OFFLINE_PENDING:
1136 itnim->state = ITNIM_STATE_OFFLINE;
1137 if (itnim->fc_rport) {
1138 fc_rport = itnim->fc_rport;
1139 ((struct bfad_itnim_data_s *)
1140 fc_rport->dd_data)->itnim = NULL;
1141 itnim->fc_rport = NULL;
1142 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1143 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1144 fc_rport->dev_loss_tmo =
1145 bfa_fcpim_path_tov_get(&bfad->bfa) + 1;
1146 fc_remote_port_delete(fc_rport);
1147 spin_lock_irqsave(&bfad->bfad_lock, flags);
1148 }
1149 wwpn = bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim);
1150 fcid = bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim);
1151 wwn2str(wwpn_str, wwpn);
1152 fcid2str(fcid_str, fcid);
1153 list_del(&itnim->list_entry);
1154 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
1155 "ITNIM OFFLINE Target: %d:0:%d "
1156 "FCID: %s WWPN: %s\n",
1157 im_port->shost->host_no,
1158 itnim->scsi_tgt_id,
1159 fcid_str, wwpn_str);
1160 }
1161 break;
1162 case ITNIM_STATE_FREE:
1163 if (itnim->fc_rport) {
1164 fc_rport = itnim->fc_rport;
1165 ((struct bfad_itnim_data_s *)
1166 fc_rport->dd_data)->itnim = NULL;
1167 itnim->fc_rport = NULL;
1168 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1169 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1170 fc_rport->dev_loss_tmo =
1171 bfa_fcpim_path_tov_get(&bfad->bfa) + 1;
1172 fc_remote_port_delete(fc_rport);
1173 spin_lock_irqsave(&bfad->bfad_lock, flags);
1174 }
1175 list_del(&itnim->list_entry);
1176 }
1177
1178 kfree(itnim);
1179 break;
1180 default:
1181 WARN_ON(1);
1182 break;
1183 }
1184
1185 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1186 }
1187
1188 /*
1189 * Scsi_Host template entry, queue a SCSI command to the BFAD.
1190 */
1191 static int
1192 bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1193 {
1194 struct bfad_im_port_s *im_port =
1195 (struct bfad_im_port_s *) cmnd->device->host->hostdata[0];
1196 struct bfad_s *bfad = im_port->bfad;
1197 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata;
1198 struct bfad_itnim_s *itnim;
1199 struct bfa_ioim_s *hal_io;
1200 unsigned long flags;
1201 int rc;
1202 int sg_cnt = 0;
1203 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
1204
1205 rc = fc_remote_port_chkready(rport);
1206 if (rc) {
1207 cmnd->result = rc;
1208 done(cmnd);
1209 return 0;
1210 }
1211
1212 if (bfad->bfad_flags & BFAD_EEH_BUSY) {
1213 if (bfad->bfad_flags & BFAD_EEH_PCI_CHANNEL_IO_PERM_FAILURE)
1214 cmnd->result = DID_NO_CONNECT << 16;
1215 else
1216 cmnd->result = DID_REQUEUE << 16;
1217 done(cmnd);
1218 return 0;
1219 }
1220
1221 sg_cnt = scsi_dma_map(cmnd);
1222 if (sg_cnt < 0)
1223 return SCSI_MLQUEUE_HOST_BUSY;
1224
1225 cmnd->scsi_done = done;
1226
1227 spin_lock_irqsave(&bfad->bfad_lock, flags);
1228 if (!(bfad->bfad_flags & BFAD_HAL_START_DONE)) {
1229 printk(KERN_WARNING
1230 "bfad%d, queuecommand %p %x failed, BFA stopped\n",
1231 bfad->inst_no, cmnd, cmnd->cmnd[0]);
1232 cmnd->result = ScsiResult(DID_NO_CONNECT, 0);
1233 goto out_fail_cmd;
1234 }
1235
1236
1237 itnim = itnim_data->itnim;
1238 if (!itnim) {
1239 cmnd->result = ScsiResult(DID_IMM_RETRY, 0);
1240 goto out_fail_cmd;
1241 }
1242
1243 hal_io = bfa_ioim_alloc(&bfad->bfa, (struct bfad_ioim_s *) cmnd,
1244 itnim->bfa_itnim, sg_cnt);
1245 if (!hal_io) {
1246 printk(KERN_WARNING "hal_io failure\n");
1247 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1248 scsi_dma_unmap(cmnd);
1249 return SCSI_MLQUEUE_HOST_BUSY;
1250 }
1251
1252 cmnd->host_scribble = (char *)hal_io;
1253 bfa_ioim_start(hal_io);
1254 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1255
1256 return 0;
1257
1258 out_fail_cmd:
1259 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1260 scsi_dma_unmap(cmnd);
1261 if (done)
1262 done(cmnd);
1263
1264 return 0;
1265 }
1266
1267 static DEF_SCSI_QCMD(bfad_im_queuecommand)
1268
1269 void
1270 bfad_rport_online_wait(struct bfad_s *bfad)
1271 {
1272 int i;
1273 int rport_delay = 10;
1274
1275 for (i = 0; !(bfad->bfad_flags & BFAD_PORT_ONLINE)
1276 && i < bfa_linkup_delay; i++) {
1277 set_current_state(TASK_UNINTERRUPTIBLE);
1278 schedule_timeout(HZ);
1279 }
1280
1281 if (bfad->bfad_flags & BFAD_PORT_ONLINE) {
1282 rport_delay = rport_delay < bfa_linkup_delay ?
1283 rport_delay : bfa_linkup_delay;
1284 for (i = 0; !(bfad->bfad_flags & BFAD_RPORT_ONLINE)
1285 && i < rport_delay; i++) {
1286 set_current_state(TASK_UNINTERRUPTIBLE);
1287 schedule_timeout(HZ);
1288 }
1289
1290 if (rport_delay > 0 && (bfad->bfad_flags & BFAD_RPORT_ONLINE)) {
1291 set_current_state(TASK_UNINTERRUPTIBLE);
1292 schedule_timeout(rport_delay * HZ);
1293 }
1294 }
1295 }
1296
1297 int
1298 bfad_get_linkup_delay(struct bfad_s *bfad)
1299 {
1300 u8 nwwns = 0;
1301 wwn_t wwns[BFA_PREBOOT_BOOTLUN_MAX];
1302 int linkup_delay;
1303
1304 /*
1305 * Querying for the boot target port wwns
1306 * -- read from boot information in flash.
1307 * If nwwns > 0 => boot over SAN and set linkup_delay = 30
1308 * else => local boot machine set linkup_delay = 0
1309 */
1310
1311 bfa_iocfc_get_bootwwns(&bfad->bfa, &nwwns, wwns);
1312
1313 if (nwwns > 0)
1314 /* If Boot over SAN set linkup_delay = 30sec */
1315 linkup_delay = 30;
1316 else
1317 /* If local boot; no linkup_delay */
1318 linkup_delay = 0;
1319
1320 return linkup_delay;
1321 }
1322
1323
1324
1325
1326
1327 /* LDV_COMMENT_BEGIN_MAIN */
1328 #ifdef LDV_MAIN1_sequence_infinite_withcheck_stateful
1329
1330 /*###########################################################################*/
1331
1332 /*############## Driver Environment Generator 0.2 output ####################*/
1333
1334 /*###########################################################################*/
1335
1336
1337
1338 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test if all kernel resources are correctly released by driver before driver will be unloaded. */
1339 void ldv_check_final_state(void);
1340
1341 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result. */
1342 void ldv_check_return_value(int res);
1343
1344 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result of probe() function. */
1345 void ldv_check_return_value_probe(int res);
1346
1347 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Initializes the model. */
1348 void ldv_initialize(void);
1349
1350 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Reinitializes the model between distinct model function calls. */
1351 void ldv_handler_precall(void);
1352
1353 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Returns arbitrary interger value. */
1354 int nondet_int(void);
1355
1356 /* LDV_COMMENT_VAR_DECLARE_LDV Special variable for LDV verifier. */
1357 int LDV_IN_INTERRUPT;
1358
1359 /* LDV_COMMENT_FUNCTION_MAIN Main function for LDV verifier. */
1360 void ldv_main1_sequence_infinite_withcheck_stateful(void) {
1361
1362
1363
1364 /* LDV_COMMENT_BEGIN_VARIABLE_DECLARATION_PART */
1365 /*============================= VARIABLE DECLARATION PART =============================*/
1366 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1367 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1368 /* LDV_COMMENT_END_PREP */
1369 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_info" */
1370 struct Scsi_Host * var_group1;
1371 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1372 /* LDV_COMMENT_END_PREP */
1373 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_abort_handler" */
1374 struct scsi_cmnd * var_group2;
1375 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1376 /* LDV_COMMENT_END_PREP */
1377 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1378 /* LDV_COMMENT_END_PREP */
1379 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1380 /* LDV_COMMENT_END_PREP */
1381 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_slave_alloc" */
1382 struct scsi_device * var_group3;
1383 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1384 /* LDV_COMMENT_END_PREP */
1385 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1386 /* LDV_COMMENT_END_PREP */
1387
1388 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1389 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1390 /* LDV_COMMENT_END_PREP */
1391 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1392 /* LDV_COMMENT_END_PREP */
1393 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1394 /* LDV_COMMENT_END_PREP */
1395 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1396 /* LDV_COMMENT_END_PREP */
1397 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1398 /* LDV_COMMENT_END_PREP */
1399 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1400 /* LDV_COMMENT_END_PREP */
1401 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1402 /* LDV_COMMENT_END_PREP */
1403
1404
1405
1406
1407 /* LDV_COMMENT_END_VARIABLE_DECLARATION_PART */
1408 /* LDV_COMMENT_BEGIN_VARIABLE_INITIALIZING_PART */
1409 /*============================= VARIABLE INITIALIZING PART =============================*/
1410 LDV_IN_INTERRUPT=1;
1411
1412
1413
1414
1415 /* LDV_COMMENT_END_VARIABLE_INITIALIZING_PART */
1416 /* LDV_COMMENT_BEGIN_FUNCTION_CALL_SECTION */
1417 /*============================= FUNCTION CALL SECTION =============================*/
1418 /* LDV_COMMENT_FUNCTION_CALL Initialize LDV model. */
1419 ldv_initialize();
1420
1421
1422
1423
1424
1425 while( nondet_int()
1426 ) {
1427
1428 switch(nondet_int()) {
1429
1430 case 0: {
1431
1432 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1433
1434
1435 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1436 /* LDV_COMMENT_END_PREP */
1437 /* LDV_COMMENT_FUNCTION_CALL Function from field "info" from driver structure with callbacks "bfad_im_scsi_host_template" */
1438 ldv_handler_precall();
1439 bfad_im_info( var_group1);
1440
1441
1442
1443
1444 }
1445
1446 break;
1447 case 1: {
1448
1449 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1450
1451
1452 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1453 /* LDV_COMMENT_END_PREP */
1454 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_abort_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1455 ldv_handler_precall();
1456 bfad_im_abort_handler( var_group2);
1457
1458
1459
1460
1461 }
1462
1463 break;
1464 case 2: {
1465
1466 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1467
1468
1469 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1470 /* LDV_COMMENT_END_PREP */
1471 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_device_reset_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1472 ldv_handler_precall();
1473 bfad_im_reset_lun_handler( var_group2);
1474
1475
1476
1477
1478 }
1479
1480 break;
1481 case 3: {
1482
1483 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1484
1485
1486 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1487 /* LDV_COMMENT_END_PREP */
1488 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_bus_reset_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1489 ldv_handler_precall();
1490 bfad_im_reset_bus_handler( var_group2);
1491
1492
1493
1494
1495 }
1496
1497 break;
1498 case 4: {
1499
1500 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1501
1502
1503 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1504 /* LDV_COMMENT_END_PREP */
1505 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_alloc" from driver structure with callbacks "bfad_im_scsi_host_template" */
1506 ldv_handler_precall();
1507 bfad_im_slave_alloc( var_group3);
1508
1509
1510
1511
1512 }
1513
1514 break;
1515 case 5: {
1516
1517 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1518
1519
1520 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1521 /* LDV_COMMENT_END_PREP */
1522 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_configure" from driver structure with callbacks "bfad_im_scsi_host_template" */
1523 ldv_handler_precall();
1524 bfad_im_slave_configure( var_group3);
1525
1526
1527
1528
1529 }
1530
1531 break;
1532 case 6: {
1533
1534 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1535
1536
1537 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1538 /* LDV_COMMENT_END_PREP */
1539 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_destroy" from driver structure with callbacks "bfad_im_scsi_host_template" */
1540 ldv_handler_precall();
1541 bfad_im_slave_destroy( var_group3);
1542
1543
1544
1545
1546 }
1547
1548 break;
1549 case 7: {
1550
1551 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1552
1553
1554 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1555 /* LDV_COMMENT_END_PREP */
1556 /* LDV_COMMENT_FUNCTION_CALL Function from field "info" from driver structure with callbacks "bfad_im_vport_template" */
1557 ldv_handler_precall();
1558 bfad_im_info( var_group1);
1559
1560
1561
1562
1563 }
1564
1565 break;
1566 case 8: {
1567
1568 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1569
1570
1571 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1572 /* LDV_COMMENT_END_PREP */
1573 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_abort_handler" from driver structure with callbacks "bfad_im_vport_template" */
1574 ldv_handler_precall();
1575 bfad_im_abort_handler( var_group2);
1576
1577
1578
1579
1580 }
1581
1582 break;
1583 case 9: {
1584
1585 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1586
1587
1588 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1589 /* LDV_COMMENT_END_PREP */
1590 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_device_reset_handler" from driver structure with callbacks "bfad_im_vport_template" */
1591 ldv_handler_precall();
1592 bfad_im_reset_lun_handler( var_group2);
1593
1594
1595
1596
1597 }
1598
1599 break;
1600 case 10: {
1601
1602 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1603
1604
1605 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1606 /* LDV_COMMENT_END_PREP */
1607 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_bus_reset_handler" from driver structure with callbacks "bfad_im_vport_template" */
1608 ldv_handler_precall();
1609 bfad_im_reset_bus_handler( var_group2);
1610
1611
1612
1613
1614 }
1615
1616 break;
1617 case 11: {
1618
1619 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1620
1621
1622 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1623 /* LDV_COMMENT_END_PREP */
1624 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_alloc" from driver structure with callbacks "bfad_im_vport_template" */
1625 ldv_handler_precall();
1626 bfad_im_slave_alloc( var_group3);
1627
1628
1629
1630
1631 }
1632
1633 break;
1634 case 12: {
1635
1636 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1637
1638
1639 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1640 /* LDV_COMMENT_END_PREP */
1641 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_configure" from driver structure with callbacks "bfad_im_vport_template" */
1642 ldv_handler_precall();
1643 bfad_im_slave_configure( var_group3);
1644
1645
1646
1647
1648 }
1649
1650 break;
1651 case 13: {
1652
1653 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1654
1655
1656 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1657 /* LDV_COMMENT_END_PREP */
1658 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_destroy" from driver structure with callbacks "bfad_im_vport_template" */
1659 ldv_handler_precall();
1660 bfad_im_slave_destroy( var_group3);
1661
1662
1663
1664
1665 }
1666
1667 break;
1668 default: break;
1669
1670 }
1671
1672 }
1673
1674 ldv_module_exit:
1675
1676 /* LDV_COMMENT_FUNCTION_CALL Checks that all resources and locks are correctly released before the driver will be unloaded. */
1677 ldv_final: ldv_check_final_state();
1678
1679 /* LDV_COMMENT_END_FUNCTION_CALL_SECTION */
1680 return;
1681
1682 }
1683 #endif
1684
1685 /* LDV_COMMENT_END_MAIN */ 1
2 #include <linux/kernel.h>
3 bool ldv_is_err(const void *ptr);
4 bool ldv_is_err_or_null(const void *ptr);
5 void* ldv_err_ptr(long error);
6 long ldv_ptr_err(const void *ptr);
7
8 #include <linux/idr.h>
9 #include <verifier/rcv.h>
10
11
12 extern void ldv_idr_init_bfad_im_port_index(void);
13 extern void ldv_idr_alloc_bfad_im_port_index(void);
14 extern void ldv_idr_find_bfad_im_port_index(void);
15 extern void ldv_idr_remove_bfad_im_port_index(void);
16 extern void ldv_idr_destroy_bfad_im_port_index(void);
17
18 #line 1 "/work/ldvuser/ref_launch/work/current--X--drivers--X--defaultlinux-4.0-rc1.tar.xz--X--153_7a--X--cpachecker/linux-4.0-rc1.tar.xz/csd_deg_dscv/11450/dscv_tempdir/dscv/ri/153_7a/drivers/scsi/bfa/bfad_im.c"
19
20 /*
21 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
22 * All rights reserved
23 * www.brocade.com
24 *
25 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
26 *
27 * This program is free software; you can redistribute it and/or modify it
28 * under the terms of the GNU General Public License (GPL) Version 2 as
29 * published by the Free Software Foundation
30 *
31 * This program is distributed in the hope that it will be useful, but
32 * WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34 * General Public License for more details.
35 */
36
37 /*
38 * bfad_im.c Linux driver IM module.
39 */
40
41 #include <linux/export.h>
42
43 #include "bfad_drv.h"
44 #include "bfad_im.h"
45 #include "bfa_fcs.h"
46
47 BFA_TRC_FILE(LDRV, IM);
48
49 DEFINE_IDR(bfad_im_port_index);
50 struct scsi_transport_template *bfad_im_scsi_transport_template;
51 struct scsi_transport_template *bfad_im_scsi_vport_transport_template;
52 static void bfad_im_itnim_work_handler(struct work_struct *work);
53 static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd);
54 static int bfad_im_slave_alloc(struct scsi_device *sdev);
55 static void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port,
56 struct bfad_itnim_s *itnim);
57
58 void
59 bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,
60 enum bfi_ioim_status io_status, u8 scsi_status,
61 int sns_len, u8 *sns_info, s32 residue)
62 {
63 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
64 struct bfad_s *bfad = drv;
65 struct bfad_itnim_data_s *itnim_data;
66 struct bfad_itnim_s *itnim;
67 u8 host_status = DID_OK;
68
69 switch (io_status) {
70 case BFI_IOIM_STS_OK:
71 bfa_trc(bfad, scsi_status);
72 scsi_set_resid(cmnd, 0);
73
74 if (sns_len > 0) {
75 bfa_trc(bfad, sns_len);
76 if (sns_len > SCSI_SENSE_BUFFERSIZE)
77 sns_len = SCSI_SENSE_BUFFERSIZE;
78 memcpy(cmnd->sense_buffer, sns_info, sns_len);
79 }
80
81 if (residue > 0) {
82 bfa_trc(bfad, residue);
83 scsi_set_resid(cmnd, residue);
84 if (!sns_len && (scsi_status == SAM_STAT_GOOD) &&
85 (scsi_bufflen(cmnd) - residue) <
86 cmnd->underflow) {
87 bfa_trc(bfad, 0);
88 host_status = DID_ERROR;
89 }
90 }
91 cmnd->result = ScsiResult(host_status, scsi_status);
92
93 break;
94
95 case BFI_IOIM_STS_TIMEDOUT:
96 host_status = DID_TIME_OUT;
97 cmnd->result = ScsiResult(host_status, 0);
98 break;
99 case BFI_IOIM_STS_PATHTOV:
100 host_status = DID_TRANSPORT_DISRUPTED;
101 cmnd->result = ScsiResult(host_status, 0);
102 break;
103 default:
104 host_status = DID_ERROR;
105 cmnd->result = ScsiResult(host_status, 0);
106 }
107
108 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
109 if (cmnd->device->host != NULL)
110 scsi_dma_unmap(cmnd);
111
112 cmnd->host_scribble = NULL;
113 bfa_trc(bfad, cmnd->result);
114
115 itnim_data = cmnd->device->hostdata;
116 if (itnim_data) {
117 itnim = itnim_data->itnim;
118 if (!cmnd->result && itnim &&
119 (bfa_lun_queue_depth > cmnd->device->queue_depth)) {
120 /* Queue depth adjustment for good status completion */
121 bfad_ramp_up_qdepth(itnim, cmnd->device);
122 } else if (cmnd->result == SAM_STAT_TASK_SET_FULL && itnim) {
123 /* qfull handling */
124 bfad_handle_qfull(itnim, cmnd->device);
125 }
126 }
127
128 cmnd->scsi_done(cmnd);
129 }
130
131 void
132 bfa_cb_ioim_good_comp(void *drv, struct bfad_ioim_s *dio)
133 {
134 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
135 struct bfad_itnim_data_s *itnim_data;
136 struct bfad_itnim_s *itnim;
137
138 cmnd->result = ScsiResult(DID_OK, SCSI_STATUS_GOOD);
139
140 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
141 if (cmnd->device->host != NULL)
142 scsi_dma_unmap(cmnd);
143
144 cmnd->host_scribble = NULL;
145
146 /* Queue depth adjustment */
147 if (bfa_lun_queue_depth > cmnd->device->queue_depth) {
148 itnim_data = cmnd->device->hostdata;
149 if (itnim_data) {
150 itnim = itnim_data->itnim;
151 if (itnim)
152 bfad_ramp_up_qdepth(itnim, cmnd->device);
153 }
154 }
155
156 cmnd->scsi_done(cmnd);
157 }
158
159 void
160 bfa_cb_ioim_abort(void *drv, struct bfad_ioim_s *dio)
161 {
162 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
163 struct bfad_s *bfad = drv;
164
165 cmnd->result = ScsiResult(DID_ERROR, 0);
166
167 /* Unmap DMA, if host is NULL, it means a scsi passthru cmd */
168 if (cmnd->device->host != NULL)
169 scsi_dma_unmap(cmnd);
170
171 bfa_trc(bfad, cmnd->result);
172 cmnd->host_scribble = NULL;
173 }
174
175 void
176 bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk,
177 enum bfi_tskim_status tsk_status)
178 {
179 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dtsk;
180 wait_queue_head_t *wq;
181
182 cmnd->SCp.Status |= tsk_status << 1;
183 set_bit(IO_DONE_BIT, (unsigned long *)&cmnd->SCp.Status);
184 wq = (wait_queue_head_t *) cmnd->SCp.ptr;
185 cmnd->SCp.ptr = NULL;
186
187 if (wq)
188 wake_up(wq);
189 }
190
191 /*
192 * Scsi_Host_template SCSI host template
193 */
194 /*
195 * Scsi_Host template entry, returns BFAD PCI info.
196 */
197 static const char *
198 bfad_im_info(struct Scsi_Host *shost)
199 {
200 static char bfa_buf[256];
201 struct bfad_im_port_s *im_port =
202 (struct bfad_im_port_s *) shost->hostdata[0];
203 struct bfad_s *bfad = im_port->bfad;
204
205 memset(bfa_buf, 0, sizeof(bfa_buf));
206 snprintf(bfa_buf, sizeof(bfa_buf),
207 "Brocade FC/FCOE Adapter, " "hwpath: %s driver: %s",
208 bfad->pci_name, BFAD_DRIVER_VERSION);
209
210 return bfa_buf;
211 }
212
213 /*
214 * Scsi_Host template entry, aborts the specified SCSI command.
215 *
216 * Returns: SUCCESS or FAILED.
217 */
218 static int
219 bfad_im_abort_handler(struct scsi_cmnd *cmnd)
220 {
221 struct Scsi_Host *shost = cmnd->device->host;
222 struct bfad_im_port_s *im_port =
223 (struct bfad_im_port_s *) shost->hostdata[0];
224 struct bfad_s *bfad = im_port->bfad;
225 struct bfa_ioim_s *hal_io;
226 unsigned long flags;
227 u32 timeout;
228 int rc = FAILED;
229
230 spin_lock_irqsave(&bfad->bfad_lock, flags);
231 hal_io = (struct bfa_ioim_s *) cmnd->host_scribble;
232 if (!hal_io) {
233 /* IO has been completed, return success */
234 rc = SUCCESS;
235 goto out;
236 }
237 if (hal_io->dio != (struct bfad_ioim_s *) cmnd) {
238 rc = FAILED;
239 goto out;
240 }
241
242 bfa_trc(bfad, hal_io->iotag);
243 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
244 "scsi%d: abort cmnd %p iotag %x\n",
245 im_port->shost->host_no, cmnd, hal_io->iotag);
246 (void) bfa_ioim_abort(hal_io);
247 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
248
249 /* Need to wait until the command get aborted */
250 timeout = 10;
251 while ((struct bfa_ioim_s *) cmnd->host_scribble == hal_io) {
252 set_current_state(TASK_UNINTERRUPTIBLE);
253 schedule_timeout(timeout);
254 if (timeout < 4 * HZ)
255 timeout *= 2;
256 }
257
258 cmnd->scsi_done(cmnd);
259 bfa_trc(bfad, hal_io->iotag);
260 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
261 "scsi%d: complete abort 0x%p iotag 0x%x\n",
262 im_port->shost->host_no, cmnd, hal_io->iotag);
263 return SUCCESS;
264 out:
265 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
266 return rc;
267 }
268
269 static bfa_status_t
270 bfad_im_target_reset_send(struct bfad_s *bfad, struct scsi_cmnd *cmnd,
271 struct bfad_itnim_s *itnim)
272 {
273 struct bfa_tskim_s *tskim;
274 struct bfa_itnim_s *bfa_itnim;
275 bfa_status_t rc = BFA_STATUS_OK;
276 struct scsi_lun scsilun;
277
278 tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd);
279 if (!tskim) {
280 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
281 "target reset, fail to allocate tskim\n");
282 rc = BFA_STATUS_FAILED;
283 goto out;
284 }
285
286 /*
287 * Set host_scribble to NULL to avoid aborting a task command if
288 * happens.
289 */
290 cmnd->host_scribble = NULL;
291 cmnd->SCp.Status = 0;
292 bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim);
293 memset(&scsilun, 0, sizeof(scsilun));
294 bfa_tskim_start(tskim, bfa_itnim, scsilun,
295 FCP_TM_TARGET_RESET, BFAD_TARGET_RESET_TMO);
296 out:
297 return rc;
298 }
299
300 /*
301 * Scsi_Host template entry, resets a LUN and abort its all commands.
302 *
303 * Returns: SUCCESS or FAILED.
304 *
305 */
306 static int
307 bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)
308 {
309 struct Scsi_Host *shost = cmnd->device->host;
310 struct bfad_im_port_s *im_port =
311 (struct bfad_im_port_s *) shost->hostdata[0];
312 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata;
313 struct bfad_s *bfad = im_port->bfad;
314 struct bfa_tskim_s *tskim;
315 struct bfad_itnim_s *itnim;
316 struct bfa_itnim_s *bfa_itnim;
317 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
318 int rc = SUCCESS;
319 unsigned long flags;
320 enum bfi_tskim_status task_status;
321 struct scsi_lun scsilun;
322
323 spin_lock_irqsave(&bfad->bfad_lock, flags);
324 itnim = itnim_data->itnim;
325 if (!itnim) {
326 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
327 rc = FAILED;
328 goto out;
329 }
330
331 tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd);
332 if (!tskim) {
333 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
334 "LUN reset, fail to allocate tskim");
335 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
336 rc = FAILED;
337 goto out;
338 }
339
340 /*
341 * Set host_scribble to NULL to avoid aborting a task command
342 * if happens.
343 */
344 cmnd->host_scribble = NULL;
345 cmnd->SCp.ptr = (char *)&wq;
346 cmnd->SCp.Status = 0;
347 bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim);
348 int_to_scsilun(cmnd->device->lun, &scsilun);
349 bfa_tskim_start(tskim, bfa_itnim, scsilun,
350 FCP_TM_LUN_RESET, BFAD_LUN_RESET_TMO);
351 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
352
353 wait_event(wq, test_bit(IO_DONE_BIT,
354 (unsigned long *)&cmnd->SCp.Status));
355
356 task_status = cmnd->SCp.Status >> 1;
357 if (task_status != BFI_TSKIM_STS_OK) {
358 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
359 "LUN reset failure, status: %d\n", task_status);
360 rc = FAILED;
361 }
362
363 out:
364 return rc;
365 }
366
367 /*
368 * Scsi_Host template entry, resets the bus and abort all commands.
369 */
370 static int
371 bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)
372 {
373 struct Scsi_Host *shost = cmnd->device->host;
374 struct bfad_im_port_s *im_port =
375 (struct bfad_im_port_s *) shost->hostdata[0];
376 struct bfad_s *bfad = im_port->bfad;
377 struct bfad_itnim_s *itnim;
378 unsigned long flags;
379 u32 i, rc, err_cnt = 0;
380 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
381 enum bfi_tskim_status task_status;
382
383 spin_lock_irqsave(&bfad->bfad_lock, flags);
384 for (i = 0; i < MAX_FCP_TARGET; i++) {
385 itnim = bfad_get_itnim(im_port, i);
386 if (itnim) {
387 cmnd->SCp.ptr = (char *)&wq;
388 rc = bfad_im_target_reset_send(bfad, cmnd, itnim);
389 if (rc != BFA_STATUS_OK) {
390 err_cnt++;
391 continue;
392 }
393
394 /* wait target reset to complete */
395 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
396 wait_event(wq, test_bit(IO_DONE_BIT,
397 (unsigned long *)&cmnd->SCp.Status));
398 spin_lock_irqsave(&bfad->bfad_lock, flags);
399
400 task_status = cmnd->SCp.Status >> 1;
401 if (task_status != BFI_TSKIM_STS_OK) {
402 BFA_LOG(KERN_ERR, bfad, bfa_log_level,
403 "target reset failure,"
404 " status: %d\n", task_status);
405 err_cnt++;
406 }
407 }
408 }
409 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
410
411 if (err_cnt)
412 return FAILED;
413
414 return SUCCESS;
415 }
416
417 /*
418 * Scsi_Host template entry slave_destroy.
419 */
420 static void
421 bfad_im_slave_destroy(struct scsi_device *sdev)
422 {
423 sdev->hostdata = NULL;
424 return;
425 }
426
427 /*
428 * BFA FCS itnim callbacks
429 */
430
431 /*
432 * BFA FCS itnim alloc callback, after successful PRLI
433 * Context: Interrupt
434 */
435 void
436 bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim,
437 struct bfad_itnim_s **itnim_drv)
438 {
439 *itnim_drv = kzalloc(sizeof(struct bfad_itnim_s), GFP_ATOMIC);
440 if (*itnim_drv == NULL)
441 return;
442
443 (*itnim_drv)->im = bfad->im;
444 *itnim = &(*itnim_drv)->fcs_itnim;
445 (*itnim_drv)->state = ITNIM_STATE_NONE;
446
447 /*
448 * Initiaze the itnim_work
449 */
450 INIT_WORK(&(*itnim_drv)->itnim_work, bfad_im_itnim_work_handler);
451 bfad->bfad_flags |= BFAD_RPORT_ONLINE;
452 }
453
454 /*
455 * BFA FCS itnim free callback.
456 * Context: Interrupt. bfad_lock is held
457 */
458 void
459 bfa_fcb_itnim_free(struct bfad_s *bfad, struct bfad_itnim_s *itnim_drv)
460 {
461 struct bfad_port_s *port;
462 wwn_t wwpn;
463 u32 fcid;
464 char wwpn_str[32], fcid_str[16];
465 struct bfad_im_s *im = itnim_drv->im;
466
467 /* online to free state transtion should not happen */
468 WARN_ON(itnim_drv->state == ITNIM_STATE_ONLINE);
469
470 itnim_drv->queue_work = 1;
471 /* offline request is not yet done, use the same request to free */
472 if (itnim_drv->state == ITNIM_STATE_OFFLINE_PENDING)
473 itnim_drv->queue_work = 0;
474
475 itnim_drv->state = ITNIM_STATE_FREE;
476 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
477 itnim_drv->im_port = port->im_port;
478 wwpn = bfa_fcs_itnim_get_pwwn(&itnim_drv->fcs_itnim);
479 fcid = bfa_fcs_itnim_get_fcid(&itnim_drv->fcs_itnim);
480 wwn2str(wwpn_str, wwpn);
481 fcid2str(fcid_str, fcid);
482 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
483 "ITNIM FREE scsi%d: FCID: %s WWPN: %s\n",
484 port->im_port->shost->host_no,
485 fcid_str, wwpn_str);
486
487 /* ITNIM processing */
488 if (itnim_drv->queue_work)
489 queue_work(im->drv_workq, &itnim_drv->itnim_work);
490 }
491
492 /*
493 * BFA FCS itnim online callback.
494 * Context: Interrupt. bfad_lock is held
495 */
496 void
497 bfa_fcb_itnim_online(struct bfad_itnim_s *itnim_drv)
498 {
499 struct bfad_port_s *port;
500 struct bfad_im_s *im = itnim_drv->im;
501
502 itnim_drv->bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim_drv->fcs_itnim);
503 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
504 itnim_drv->state = ITNIM_STATE_ONLINE;
505 itnim_drv->queue_work = 1;
506 itnim_drv->im_port = port->im_port;
507
508 /* ITNIM processing */
509 if (itnim_drv->queue_work)
510 queue_work(im->drv_workq, &itnim_drv->itnim_work);
511 }
512
513 /*
514 * BFA FCS itnim offline callback.
515 * Context: Interrupt. bfad_lock is held
516 */
517 void
518 bfa_fcb_itnim_offline(struct bfad_itnim_s *itnim_drv)
519 {
520 struct bfad_port_s *port;
521 struct bfad_s *bfad;
522 struct bfad_im_s *im = itnim_drv->im;
523
524 port = bfa_fcs_itnim_get_drvport(&itnim_drv->fcs_itnim);
525 bfad = port->bfad;
526 if ((bfad->pport.flags & BFAD_PORT_DELETE) ||
527 (port->flags & BFAD_PORT_DELETE)) {
528 itnim_drv->state = ITNIM_STATE_OFFLINE;
529 return;
530 }
531 itnim_drv->im_port = port->im_port;
532 itnim_drv->state = ITNIM_STATE_OFFLINE_PENDING;
533 itnim_drv->queue_work = 1;
534
535 /* ITNIM processing */
536 if (itnim_drv->queue_work)
537 queue_work(im->drv_workq, &itnim_drv->itnim_work);
538 }
539
540 /*
541 * Allocate a Scsi_Host for a port.
542 */
543 int
544 bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
545 struct device *dev)
546 {
547 int error = 1;
548
549 mutex_lock(&bfad_mutex);
550 error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL);
551 if (error < 0) {
552 mutex_unlock(&bfad_mutex);
553 printk(KERN_WARNING "idr_alloc failure\n");
554 goto out;
555 }
556 im_port->idr_id = error;
557 mutex_unlock(&bfad_mutex);
558
559 im_port->shost = bfad_scsi_host_alloc(im_port, bfad);
560 if (!im_port->shost) {
561 error = 1;
562 goto out_free_idr;
563 }
564
565 im_port->shost->hostdata[0] = (unsigned long)im_port;
566 im_port->shost->unique_id = im_port->idr_id;
567 im_port->shost->this_id = -1;
568 im_port->shost->max_id = MAX_FCP_TARGET;
569 im_port->shost->max_lun = MAX_FCP_LUN;
570 im_port->shost->max_cmd_len = 16;
571 im_port->shost->can_queue = bfad->cfg_data.ioc_queue_depth;
572 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
573 im_port->shost->transportt = bfad_im_scsi_transport_template;
574 else
575 im_port->shost->transportt =
576 bfad_im_scsi_vport_transport_template;
577
578 error = scsi_add_host_with_dma(im_port->shost, dev, &bfad->pcidev->dev);
579 if (error) {
580 printk(KERN_WARNING "scsi_add_host failure %d\n", error);
581 goto out_fc_rel;
582 }
583
584 return 0;
585
586 out_fc_rel:
587 scsi_host_put(im_port->shost);
588 im_port->shost = NULL;
589 out_free_idr:
590 mutex_lock(&bfad_mutex);
591 idr_remove(&bfad_im_port_index, im_port->idr_id);
592 mutex_unlock(&bfad_mutex);
593 out:
594 return error;
595 }
596
597 void
598 bfad_im_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
599 {
600 bfa_trc(bfad, bfad->inst_no);
601 BFA_LOG(KERN_INFO, bfad, bfa_log_level, "Free scsi%d\n",
602 im_port->shost->host_no);
603
604 fc_remove_host(im_port->shost);
605
606 scsi_remove_host(im_port->shost);
607 scsi_host_put(im_port->shost);
608
609 mutex_lock(&bfad_mutex);
610 idr_remove(&bfad_im_port_index, im_port->idr_id);
611 mutex_unlock(&bfad_mutex);
612 }
613
614 static void
615 bfad_im_port_delete_handler(struct work_struct *work)
616 {
617 struct bfad_im_port_s *im_port =
618 container_of(work, struct bfad_im_port_s, port_delete_work);
619
620 if (im_port->port->pvb_type != BFAD_PORT_PHYS_BASE) {
621 im_port->flags |= BFAD_PORT_DELETE;
622 fc_vport_terminate(im_port->fc_vport);
623 }
624 }
625
626 bfa_status_t
627 bfad_im_port_new(struct bfad_s *bfad, struct bfad_port_s *port)
628 {
629 int rc = BFA_STATUS_OK;
630 struct bfad_im_port_s *im_port;
631
632 im_port = kzalloc(sizeof(struct bfad_im_port_s), GFP_ATOMIC);
633 if (im_port == NULL) {
634 rc = BFA_STATUS_ENOMEM;
635 goto ext;
636 }
637 port->im_port = im_port;
638 im_port->port = port;
639 im_port->bfad = bfad;
640
641 INIT_WORK(&im_port->port_delete_work, bfad_im_port_delete_handler);
642 INIT_LIST_HEAD(&im_port->itnim_mapped_list);
643 INIT_LIST_HEAD(&im_port->binding_list);
644
645 ext:
646 return rc;
647 }
648
649 void
650 bfad_im_port_delete(struct bfad_s *bfad, struct bfad_port_s *port)
651 {
652 struct bfad_im_port_s *im_port = port->im_port;
653
654 queue_work(bfad->im->drv_workq,
655 &im_port->port_delete_work);
656 }
657
658 void
659 bfad_im_port_clean(struct bfad_im_port_s *im_port)
660 {
661 struct bfad_fcp_binding *bp, *bp_new;
662 unsigned long flags;
663 struct bfad_s *bfad = im_port->bfad;
664
665 spin_lock_irqsave(&bfad->bfad_lock, flags);
666 list_for_each_entry_safe(bp, bp_new, &im_port->binding_list,
667 list_entry) {
668 list_del(&bp->list_entry);
669 kfree(bp);
670 }
671
672 /* the itnim_mapped_list must be empty at this time */
673 WARN_ON(!list_empty(&im_port->itnim_mapped_list));
674
675 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
676 }
677
678 static void bfad_aen_im_notify_handler(struct work_struct *work)
679 {
680 struct bfad_im_s *im =
681 container_of(work, struct bfad_im_s, aen_im_notify_work);
682 struct bfa_aen_entry_s *aen_entry;
683 struct bfad_s *bfad = im->bfad;
684 struct Scsi_Host *shost = bfad->pport.im_port->shost;
685 void *event_data;
686 unsigned long flags;
687
688 while (!list_empty(&bfad->active_aen_q)) {
689 spin_lock_irqsave(&bfad->bfad_aen_spinlock, flags);
690 bfa_q_deq(&bfad->active_aen_q, &aen_entry);
691 spin_unlock_irqrestore(&bfad->bfad_aen_spinlock, flags);
692 event_data = (char *)aen_entry + sizeof(struct list_head);
693 fc_host_post_vendor_event(shost, fc_get_event_number(),
694 sizeof(struct bfa_aen_entry_s) -
695 sizeof(struct list_head),
696 (char *)event_data, BFAD_NL_VENDOR_ID);
697 spin_lock_irqsave(&bfad->bfad_aen_spinlock, flags);
698 list_add_tail(&aen_entry->qe, &bfad->free_aen_q);
699 spin_unlock_irqrestore(&bfad->bfad_aen_spinlock, flags);
700 }
701 }
702
703 bfa_status_t
704 bfad_im_probe(struct bfad_s *bfad)
705 {
706 struct bfad_im_s *im;
707
708 im = kzalloc(sizeof(struct bfad_im_s), GFP_KERNEL);
709 if (im == NULL)
710 return BFA_STATUS_ENOMEM;
711
712 bfad->im = im;
713 im->bfad = bfad;
714
715 if (bfad_thread_workq(bfad) != BFA_STATUS_OK) {
716 kfree(im);
717 return BFA_STATUS_FAILED;
718 }
719
720 INIT_WORK(&im->aen_im_notify_work, bfad_aen_im_notify_handler);
721 return BFA_STATUS_OK;
722 }
723
724 void
725 bfad_im_probe_undo(struct bfad_s *bfad)
726 {
727 if (bfad->im) {
728 bfad_destroy_workq(bfad->im);
729 kfree(bfad->im);
730 bfad->im = NULL;
731 }
732 }
733
734 struct Scsi_Host *
735 bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)
736 {
737 struct scsi_host_template *sht;
738
739 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
740 sht = &bfad_im_scsi_host_template;
741 else
742 sht = &bfad_im_vport_template;
743
744 if (max_xfer_size != BFAD_MAX_SECTORS >> 1)
745 sht->max_sectors = max_xfer_size << 1;
746
747 sht->sg_tablesize = bfad->cfg_data.io_max_sge;
748
749 return scsi_host_alloc(sht, sizeof(unsigned long));
750 }
751
752 void
753 bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
754 {
755 if (!(im_port->flags & BFAD_PORT_DELETE))
756 flush_workqueue(bfad->im->drv_workq);
757 bfad_im_scsi_host_free(im_port->bfad, im_port);
758 bfad_im_port_clean(im_port);
759 kfree(im_port);
760 }
761
762 void
763 bfad_destroy_workq(struct bfad_im_s *im)
764 {
765 if (im && im->drv_workq) {
766 flush_workqueue(im->drv_workq);
767 destroy_workqueue(im->drv_workq);
768 im->drv_workq = NULL;
769 }
770 }
771
772 bfa_status_t
773 bfad_thread_workq(struct bfad_s *bfad)
774 {
775 struct bfad_im_s *im = bfad->im;
776
777 bfa_trc(bfad, 0);
778 snprintf(im->drv_workq_name, KOBJ_NAME_LEN, "bfad_wq_%d",
779 bfad->inst_no);
780 im->drv_workq = create_singlethread_workqueue(im->drv_workq_name);
781 if (!im->drv_workq)
782 return BFA_STATUS_FAILED;
783
784 return BFA_STATUS_OK;
785 }
786
787 /*
788 * Scsi_Host template entry.
789 *
790 * Description:
791 * OS entry point to adjust the queue_depths on a per-device basis.
792 * Called once per device during the bus scan.
793 * Return non-zero if fails.
794 */
795 static int
796 bfad_im_slave_configure(struct scsi_device *sdev)
797 {
798 scsi_change_queue_depth(sdev, bfa_lun_queue_depth);
799 return 0;
800 }
801
802 struct scsi_host_template bfad_im_scsi_host_template = {
803 .module = THIS_MODULE,
804 .name = BFAD_DRIVER_NAME,
805 .info = bfad_im_info,
806 .queuecommand = bfad_im_queuecommand,
807 .eh_abort_handler = bfad_im_abort_handler,
808 .eh_device_reset_handler = bfad_im_reset_lun_handler,
809 .eh_bus_reset_handler = bfad_im_reset_bus_handler,
810
811 .slave_alloc = bfad_im_slave_alloc,
812 .slave_configure = bfad_im_slave_configure,
813 .slave_destroy = bfad_im_slave_destroy,
814
815 .this_id = -1,
816 .sg_tablesize = BFAD_IO_MAX_SGE,
817 .cmd_per_lun = 3,
818 .use_clustering = ENABLE_CLUSTERING,
819 .shost_attrs = bfad_im_host_attrs,
820 .max_sectors = BFAD_MAX_SECTORS,
821 .vendor_id = BFA_PCI_VENDOR_ID_BROCADE,
822 .use_blk_tags = 1,
823 };
824
825 struct scsi_host_template bfad_im_vport_template = {
826 .module = THIS_MODULE,
827 .name = BFAD_DRIVER_NAME,
828 .info = bfad_im_info,
829 .queuecommand = bfad_im_queuecommand,
830 .eh_abort_handler = bfad_im_abort_handler,
831 .eh_device_reset_handler = bfad_im_reset_lun_handler,
832 .eh_bus_reset_handler = bfad_im_reset_bus_handler,
833
834 .slave_alloc = bfad_im_slave_alloc,
835 .slave_configure = bfad_im_slave_configure,
836 .slave_destroy = bfad_im_slave_destroy,
837
838 .this_id = -1,
839 .sg_tablesize = BFAD_IO_MAX_SGE,
840 .cmd_per_lun = 3,
841 .use_clustering = ENABLE_CLUSTERING,
842 .shost_attrs = bfad_im_vport_attrs,
843 .max_sectors = BFAD_MAX_SECTORS,
844 .use_blk_tags = 1,
845 };
846
847 bfa_status_t
848 bfad_im_module_init(void)
849 {
850 bfad_im_scsi_transport_template =
851 fc_attach_transport(&bfad_im_fc_function_template);
852 if (!bfad_im_scsi_transport_template)
853 return BFA_STATUS_ENOMEM;
854
855 bfad_im_scsi_vport_transport_template =
856 fc_attach_transport(&bfad_im_vport_fc_function_template);
857 if (!bfad_im_scsi_vport_transport_template) {
858 fc_release_transport(bfad_im_scsi_transport_template);
859 return BFA_STATUS_ENOMEM;
860 }
861
862 return BFA_STATUS_OK;
863 }
864
865 void
866 bfad_im_module_exit(void)
867 {
868 if (bfad_im_scsi_transport_template)
869 fc_release_transport(bfad_im_scsi_transport_template);
870
871 if (bfad_im_scsi_vport_transport_template)
872 fc_release_transport(bfad_im_scsi_vport_transport_template);
873 }
874
875 void
876 bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
877 {
878 struct scsi_device *tmp_sdev;
879
880 if (((jiffies - itnim->last_ramp_up_time) >
881 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ) &&
882 ((jiffies - itnim->last_queue_full_time) >
883 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ)) {
884 shost_for_each_device(tmp_sdev, sdev->host) {
885 if (bfa_lun_queue_depth > tmp_sdev->queue_depth) {
886 if (tmp_sdev->id != sdev->id)
887 continue;
888 scsi_change_queue_depth(tmp_sdev,
889 tmp_sdev->queue_depth + 1);
890
891 itnim->last_ramp_up_time = jiffies;
892 }
893 }
894 }
895 }
896
897 void
898 bfad_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
899 {
900 struct scsi_device *tmp_sdev;
901
902 itnim->last_queue_full_time = jiffies;
903
904 shost_for_each_device(tmp_sdev, sdev->host) {
905 if (tmp_sdev->id != sdev->id)
906 continue;
907 scsi_track_queue_full(tmp_sdev, tmp_sdev->queue_depth - 1);
908 }
909 }
910
911 struct bfad_itnim_s *
912 bfad_get_itnim(struct bfad_im_port_s *im_port, int id)
913 {
914 struct bfad_itnim_s *itnim = NULL;
915
916 /* Search the mapped list for this target ID */
917 list_for_each_entry(itnim, &im_port->itnim_mapped_list, list_entry) {
918 if (id == itnim->scsi_tgt_id)
919 return itnim;
920 }
921
922 return NULL;
923 }
924
925 /*
926 * Function is invoked from the SCSI Host Template slave_alloc() entry point.
927 * Has the logic to query the LUN Mask database to check if this LUN needs to
928 * be made visible to the SCSI mid-layer or not.
929 *
930 * Returns BFA_STATUS_OK if this LUN needs to be added to the OS stack.
931 * Returns -ENXIO to notify SCSI mid-layer to not add this LUN to the OS stack.
932 */
933 static int
934 bfad_im_check_if_make_lun_visible(struct scsi_device *sdev,
935 struct fc_rport *rport)
936 {
937 struct bfad_itnim_data_s *itnim_data =
938 (struct bfad_itnim_data_s *) rport->dd_data;
939 struct bfa_s *bfa = itnim_data->itnim->bfa_itnim->bfa;
940 struct bfa_rport_s *bfa_rport = itnim_data->itnim->bfa_itnim->rport;
941 struct bfa_lun_mask_s *lun_list = bfa_get_lun_mask_list(bfa);
942 int i = 0, ret = -ENXIO;
943
944 for (i = 0; i < MAX_LUN_MASK_CFG; i++) {
945 if (lun_list[i].state == BFA_IOIM_LUN_MASK_ACTIVE &&
946 scsilun_to_int(&lun_list[i].lun) == sdev->lun &&
947 lun_list[i].rp_tag == bfa_rport->rport_tag &&
948 lun_list[i].lp_tag == (u8)bfa_rport->rport_info.lp_tag) {
949 ret = BFA_STATUS_OK;
950 break;
951 }
952 }
953 return ret;
954 }
955
956 /*
957 * Scsi_Host template entry slave_alloc
958 */
959 static int
960 bfad_im_slave_alloc(struct scsi_device *sdev)
961 {
962 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
963 struct bfad_itnim_data_s *itnim_data;
964 struct bfa_s *bfa;
965
966 if (!rport || fc_remote_port_chkready(rport))
967 return -ENXIO;
968
969 itnim_data = (struct bfad_itnim_data_s *) rport->dd_data;
970 bfa = itnim_data->itnim->bfa_itnim->bfa;
971
972 if (bfa_get_lun_mask_status(bfa) == BFA_LUNMASK_ENABLED) {
973 /*
974 * We should not mask LUN 0 - since this will translate
975 * to no LUN / TARGET for SCSI ml resulting no scan.
976 */
977 if (sdev->lun == 0) {
978 sdev->sdev_bflags |= BLIST_NOREPORTLUN |
979 BLIST_SPARSELUN;
980 goto done;
981 }
982
983 /*
984 * Query LUN Mask configuration - to expose this LUN
985 * to the SCSI mid-layer or to mask it.
986 */
987 if (bfad_im_check_if_make_lun_visible(sdev, rport) !=
988 BFA_STATUS_OK)
989 return -ENXIO;
990 }
991 done:
992 sdev->hostdata = rport->dd_data;
993
994 return 0;
995 }
996
997 u32
998 bfad_im_supported_speeds(struct bfa_s *bfa)
999 {
1000 struct bfa_ioc_attr_s *ioc_attr;
1001 u32 supported_speed = 0;
1002
1003 ioc_attr = kzalloc(sizeof(struct bfa_ioc_attr_s), GFP_KERNEL);
1004 if (!ioc_attr)
1005 return 0;
1006
1007 bfa_ioc_get_attr(&bfa->ioc, ioc_attr);
1008 if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_16GBPS)
1009 supported_speed |= FC_PORTSPEED_16GBIT | FC_PORTSPEED_8GBIT |
1010 FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT;
1011 else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) {
1012 if (ioc_attr->adapter_attr.is_mezz) {
1013 supported_speed |= FC_PORTSPEED_8GBIT |
1014 FC_PORTSPEED_4GBIT |
1015 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT;
1016 } else {
1017 supported_speed |= FC_PORTSPEED_8GBIT |
1018 FC_PORTSPEED_4GBIT |
1019 FC_PORTSPEED_2GBIT;
1020 }
1021 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_4GBPS) {
1022 supported_speed |= FC_PORTSPEED_4GBIT | FC_PORTSPEED_2GBIT |
1023 FC_PORTSPEED_1GBIT;
1024 } else if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_10GBPS) {
1025 supported_speed |= FC_PORTSPEED_10GBIT;
1026 }
1027 kfree(ioc_attr);
1028 return supported_speed;
1029 }
1030
1031 void
1032 bfad_fc_host_init(struct bfad_im_port_s *im_port)
1033 {
1034 struct Scsi_Host *host = im_port->shost;
1035 struct bfad_s *bfad = im_port->bfad;
1036 struct bfad_port_s *port = im_port->port;
1037 char symname[BFA_SYMNAME_MAXLEN];
1038 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
1039
1040 fc_host_node_name(host) =
1041 cpu_to_be64((bfa_fcs_lport_get_nwwn(port->fcs_port)));
1042 fc_host_port_name(host) =
1043 cpu_to_be64((bfa_fcs_lport_get_pwwn(port->fcs_port)));
1044 fc_host_max_npiv_vports(host) = bfa_lps_get_max_vport(&bfad->bfa);
1045
1046 fc_host_supported_classes(host) = FC_COS_CLASS3;
1047
1048 memset(fc_host_supported_fc4s(host), 0,
1049 sizeof(fc_host_supported_fc4s(host)));
1050 if (supported_fc4s & BFA_LPORT_ROLE_FCP_IM)
1051 /* For FCP type 0x08 */
1052 fc_host_supported_fc4s(host)[2] = 1;
1053 /* For fibre channel services type 0x20 */
1054 fc_host_supported_fc4s(host)[7] = 1;
1055
1056 strlcpy(symname, bfad->bfa_fcs.fabric.bport.port_cfg.sym_name.symname,
1057 BFA_SYMNAME_MAXLEN);
1058 sprintf(fc_host_symbolic_name(host), "%s", symname);
1059
1060 fc_host_supported_speeds(host) = bfad_im_supported_speeds(&bfad->bfa);
1061 fc_host_maxframe_size(host) = fcport->cfg.maxfrsize;
1062 }
1063
1064 static void
1065 bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim)
1066 {
1067 struct fc_rport_identifiers rport_ids;
1068 struct fc_rport *fc_rport;
1069 struct bfad_itnim_data_s *itnim_data;
1070
1071 rport_ids.node_name =
1072 cpu_to_be64(bfa_fcs_itnim_get_nwwn(&itnim->fcs_itnim));
1073 rport_ids.port_name =
1074 cpu_to_be64(bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim));
1075 rport_ids.port_id =
1076 bfa_hton3b(bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim));
1077 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
1078
1079 itnim->fc_rport = fc_rport =
1080 fc_remote_port_add(im_port->shost, 0, &rport_ids);
1081
1082 if (!fc_rport)
1083 return;
1084
1085 fc_rport->maxframe_size =
1086 bfa_fcs_itnim_get_maxfrsize(&itnim->fcs_itnim);
1087 fc_rport->supported_classes = bfa_fcs_itnim_get_cos(&itnim->fcs_itnim);
1088
1089 itnim_data = fc_rport->dd_data;
1090 itnim_data->itnim = itnim;
1091
1092 rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
1093
1094 if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
1095 fc_remote_port_rolechg(fc_rport, rport_ids.roles);
1096
1097 if ((fc_rport->scsi_target_id != -1)
1098 && (fc_rport->scsi_target_id < MAX_FCP_TARGET))
1099 itnim->scsi_tgt_id = fc_rport->scsi_target_id;
1100
1101 itnim->channel = fc_rport->channel;
1102
1103 return;
1104 }
1105
1106 /*
1107 * Work queue handler using FC transport service
1108 * Context: kernel
1109 */
1110 static void
1111 bfad_im_itnim_work_handler(struct work_struct *work)
1112 {
1113 struct bfad_itnim_s *itnim = container_of(work, struct bfad_itnim_s,
1114 itnim_work);
1115 struct bfad_im_s *im = itnim->im;
1116 struct bfad_s *bfad = im->bfad;
1117 struct bfad_im_port_s *im_port;
1118 unsigned long flags;
1119 struct fc_rport *fc_rport;
1120 wwn_t wwpn;
1121 u32 fcid;
1122 char wwpn_str[32], fcid_str[16];
1123
1124 spin_lock_irqsave(&bfad->bfad_lock, flags);
1125 im_port = itnim->im_port;
1126 bfa_trc(bfad, itnim->state);
1127 switch (itnim->state) {
1128 case ITNIM_STATE_ONLINE:
1129 if (!itnim->fc_rport) {
1130 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1131 bfad_im_fc_rport_add(im_port, itnim);
1132 spin_lock_irqsave(&bfad->bfad_lock, flags);
1133 wwpn = bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim);
1134 fcid = bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim);
1135 wwn2str(wwpn_str, wwpn);
1136 fcid2str(fcid_str, fcid);
1137 list_add_tail(&itnim->list_entry,
1138 &im_port->itnim_mapped_list);
1139 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
1140 "ITNIM ONLINE Target: %d:0:%d "
1141 "FCID: %s WWPN: %s\n",
1142 im_port->shost->host_no,
1143 itnim->scsi_tgt_id,
1144 fcid_str, wwpn_str);
1145 } else {
1146 printk(KERN_WARNING
1147 "%s: itnim %llx is already in online state\n",
1148 __func__,
1149 bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim));
1150 }
1151
1152 break;
1153 case ITNIM_STATE_OFFLINE_PENDING:
1154 itnim->state = ITNIM_STATE_OFFLINE;
1155 if (itnim->fc_rport) {
1156 fc_rport = itnim->fc_rport;
1157 ((struct bfad_itnim_data_s *)
1158 fc_rport->dd_data)->itnim = NULL;
1159 itnim->fc_rport = NULL;
1160 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1161 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1162 fc_rport->dev_loss_tmo =
1163 bfa_fcpim_path_tov_get(&bfad->bfa) + 1;
1164 fc_remote_port_delete(fc_rport);
1165 spin_lock_irqsave(&bfad->bfad_lock, flags);
1166 }
1167 wwpn = bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim);
1168 fcid = bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim);
1169 wwn2str(wwpn_str, wwpn);
1170 fcid2str(fcid_str, fcid);
1171 list_del(&itnim->list_entry);
1172 BFA_LOG(KERN_INFO, bfad, bfa_log_level,
1173 "ITNIM OFFLINE Target: %d:0:%d "
1174 "FCID: %s WWPN: %s\n",
1175 im_port->shost->host_no,
1176 itnim->scsi_tgt_id,
1177 fcid_str, wwpn_str);
1178 }
1179 break;
1180 case ITNIM_STATE_FREE:
1181 if (itnim->fc_rport) {
1182 fc_rport = itnim->fc_rport;
1183 ((struct bfad_itnim_data_s *)
1184 fc_rport->dd_data)->itnim = NULL;
1185 itnim->fc_rport = NULL;
1186 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1187 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1188 fc_rport->dev_loss_tmo =
1189 bfa_fcpim_path_tov_get(&bfad->bfa) + 1;
1190 fc_remote_port_delete(fc_rport);
1191 spin_lock_irqsave(&bfad->bfad_lock, flags);
1192 }
1193 list_del(&itnim->list_entry);
1194 }
1195
1196 kfree(itnim);
1197 break;
1198 default:
1199 WARN_ON(1);
1200 break;
1201 }
1202
1203 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1204 }
1205
1206 /*
1207 * Scsi_Host template entry, queue a SCSI command to the BFAD.
1208 */
1209 static int
1210 bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1211 {
1212 struct bfad_im_port_s *im_port =
1213 (struct bfad_im_port_s *) cmnd->device->host->hostdata[0];
1214 struct bfad_s *bfad = im_port->bfad;
1215 struct bfad_itnim_data_s *itnim_data = cmnd->device->hostdata;
1216 struct bfad_itnim_s *itnim;
1217 struct bfa_ioim_s *hal_io;
1218 unsigned long flags;
1219 int rc;
1220 int sg_cnt = 0;
1221 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
1222
1223 rc = fc_remote_port_chkready(rport);
1224 if (rc) {
1225 cmnd->result = rc;
1226 done(cmnd);
1227 return 0;
1228 }
1229
1230 if (bfad->bfad_flags & BFAD_EEH_BUSY) {
1231 if (bfad->bfad_flags & BFAD_EEH_PCI_CHANNEL_IO_PERM_FAILURE)
1232 cmnd->result = DID_NO_CONNECT << 16;
1233 else
1234 cmnd->result = DID_REQUEUE << 16;
1235 done(cmnd);
1236 return 0;
1237 }
1238
1239 sg_cnt = scsi_dma_map(cmnd);
1240 if (sg_cnt < 0)
1241 return SCSI_MLQUEUE_HOST_BUSY;
1242
1243 cmnd->scsi_done = done;
1244
1245 spin_lock_irqsave(&bfad->bfad_lock, flags);
1246 if (!(bfad->bfad_flags & BFAD_HAL_START_DONE)) {
1247 printk(KERN_WARNING
1248 "bfad%d, queuecommand %p %x failed, BFA stopped\n",
1249 bfad->inst_no, cmnd, cmnd->cmnd[0]);
1250 cmnd->result = ScsiResult(DID_NO_CONNECT, 0);
1251 goto out_fail_cmd;
1252 }
1253
1254
1255 itnim = itnim_data->itnim;
1256 if (!itnim) {
1257 cmnd->result = ScsiResult(DID_IMM_RETRY, 0);
1258 goto out_fail_cmd;
1259 }
1260
1261 hal_io = bfa_ioim_alloc(&bfad->bfa, (struct bfad_ioim_s *) cmnd,
1262 itnim->bfa_itnim, sg_cnt);
1263 if (!hal_io) {
1264 printk(KERN_WARNING "hal_io failure\n");
1265 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1266 scsi_dma_unmap(cmnd);
1267 return SCSI_MLQUEUE_HOST_BUSY;
1268 }
1269
1270 cmnd->host_scribble = (char *)hal_io;
1271 bfa_ioim_start(hal_io);
1272 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1273
1274 return 0;
1275
1276 out_fail_cmd:
1277 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1278 scsi_dma_unmap(cmnd);
1279 if (done)
1280 done(cmnd);
1281
1282 return 0;
1283 }
1284
1285 static DEF_SCSI_QCMD(bfad_im_queuecommand)
1286
1287 void
1288 bfad_rport_online_wait(struct bfad_s *bfad)
1289 {
1290 int i;
1291 int rport_delay = 10;
1292
1293 for (i = 0; !(bfad->bfad_flags & BFAD_PORT_ONLINE)
1294 && i < bfa_linkup_delay; i++) {
1295 set_current_state(TASK_UNINTERRUPTIBLE);
1296 schedule_timeout(HZ);
1297 }
1298
1299 if (bfad->bfad_flags & BFAD_PORT_ONLINE) {
1300 rport_delay = rport_delay < bfa_linkup_delay ?
1301 rport_delay : bfa_linkup_delay;
1302 for (i = 0; !(bfad->bfad_flags & BFAD_RPORT_ONLINE)
1303 && i < rport_delay; i++) {
1304 set_current_state(TASK_UNINTERRUPTIBLE);
1305 schedule_timeout(HZ);
1306 }
1307
1308 if (rport_delay > 0 && (bfad->bfad_flags & BFAD_RPORT_ONLINE)) {
1309 set_current_state(TASK_UNINTERRUPTIBLE);
1310 schedule_timeout(rport_delay * HZ);
1311 }
1312 }
1313 }
1314
1315 int
1316 bfad_get_linkup_delay(struct bfad_s *bfad)
1317 {
1318 u8 nwwns = 0;
1319 wwn_t wwns[BFA_PREBOOT_BOOTLUN_MAX];
1320 int linkup_delay;
1321
1322 /*
1323 * Querying for the boot target port wwns
1324 * -- read from boot information in flash.
1325 * If nwwns > 0 => boot over SAN and set linkup_delay = 30
1326 * else => local boot machine set linkup_delay = 0
1327 */
1328
1329 bfa_iocfc_get_bootwwns(&bfad->bfa, &nwwns, wwns);
1330
1331 if (nwwns > 0)
1332 /* If Boot over SAN set linkup_delay = 30sec */
1333 linkup_delay = 30;
1334 else
1335 /* If local boot; no linkup_delay */
1336 linkup_delay = 0;
1337
1338 return linkup_delay;
1339 }
1340
1341
1342
1343
1344
1345 /* LDV_COMMENT_BEGIN_MAIN */
1346 #ifdef LDV_MAIN1_sequence_infinite_withcheck_stateful
1347
1348 /*###########################################################################*/
1349
1350 /*############## Driver Environment Generator 0.2 output ####################*/
1351
1352 /*###########################################################################*/
1353
1354
1355
1356 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test if all kernel resources are correctly released by driver before driver will be unloaded. */
1357 void ldv_check_final_state(void);
1358
1359 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result. */
1360 void ldv_check_return_value(int res);
1361
1362 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result of probe() function. */
1363 void ldv_check_return_value_probe(int res);
1364
1365 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Initializes the model. */
1366 void ldv_initialize(void);
1367
1368 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Reinitializes the model between distinct model function calls. */
1369 void ldv_handler_precall(void);
1370
1371 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Returns arbitrary interger value. */
1372 int nondet_int(void);
1373
1374 /* LDV_COMMENT_VAR_DECLARE_LDV Special variable for LDV verifier. */
1375 int LDV_IN_INTERRUPT;
1376
1377 /* LDV_COMMENT_FUNCTION_MAIN Main function for LDV verifier. */
1378 void ldv_main1_sequence_infinite_withcheck_stateful(void) {
1379
1380
1381
1382 /* LDV_COMMENT_BEGIN_VARIABLE_DECLARATION_PART */
1383 /*============================= VARIABLE DECLARATION PART =============================*/
1384 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1385 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1386 /* LDV_COMMENT_END_PREP */
1387 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_info" */
1388 struct Scsi_Host * var_group1;
1389 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1390 /* LDV_COMMENT_END_PREP */
1391 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_abort_handler" */
1392 struct scsi_cmnd * var_group2;
1393 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1394 /* LDV_COMMENT_END_PREP */
1395 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1396 /* LDV_COMMENT_END_PREP */
1397 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1398 /* LDV_COMMENT_END_PREP */
1399 /* LDV_COMMENT_VAR_DECLARE Variable declaration for function "bfad_im_slave_alloc" */
1400 struct scsi_device * var_group3;
1401 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1402 /* LDV_COMMENT_END_PREP */
1403 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1404 /* LDV_COMMENT_END_PREP */
1405
1406 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1407 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1408 /* LDV_COMMENT_END_PREP */
1409 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1410 /* LDV_COMMENT_END_PREP */
1411 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1412 /* LDV_COMMENT_END_PREP */
1413 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1414 /* LDV_COMMENT_END_PREP */
1415 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1416 /* LDV_COMMENT_END_PREP */
1417 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1418 /* LDV_COMMENT_END_PREP */
1419 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1420 /* LDV_COMMENT_END_PREP */
1421
1422
1423
1424
1425 /* LDV_COMMENT_END_VARIABLE_DECLARATION_PART */
1426 /* LDV_COMMENT_BEGIN_VARIABLE_INITIALIZING_PART */
1427 /*============================= VARIABLE INITIALIZING PART =============================*/
1428 LDV_IN_INTERRUPT=1;
1429
1430
1431
1432
1433 /* LDV_COMMENT_END_VARIABLE_INITIALIZING_PART */
1434 /* LDV_COMMENT_BEGIN_FUNCTION_CALL_SECTION */
1435 /*============================= FUNCTION CALL SECTION =============================*/
1436 /* LDV_COMMENT_FUNCTION_CALL Initialize LDV model. */
1437 ldv_initialize();
1438
1439
1440
1441
1442
1443 while( nondet_int()
1444 ) {
1445
1446 switch(nondet_int()) {
1447
1448 case 0: {
1449
1450 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1451
1452
1453 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1454 /* LDV_COMMENT_END_PREP */
1455 /* LDV_COMMENT_FUNCTION_CALL Function from field "info" from driver structure with callbacks "bfad_im_scsi_host_template" */
1456 ldv_handler_precall();
1457 bfad_im_info( var_group1);
1458
1459
1460
1461
1462 }
1463
1464 break;
1465 case 1: {
1466
1467 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1468
1469
1470 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1471 /* LDV_COMMENT_END_PREP */
1472 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_abort_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1473 ldv_handler_precall();
1474 bfad_im_abort_handler( var_group2);
1475
1476
1477
1478
1479 }
1480
1481 break;
1482 case 2: {
1483
1484 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1485
1486
1487 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1488 /* LDV_COMMENT_END_PREP */
1489 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_device_reset_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1490 ldv_handler_precall();
1491 bfad_im_reset_lun_handler( var_group2);
1492
1493
1494
1495
1496 }
1497
1498 break;
1499 case 3: {
1500
1501 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1502
1503
1504 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1505 /* LDV_COMMENT_END_PREP */
1506 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_bus_reset_handler" from driver structure with callbacks "bfad_im_scsi_host_template" */
1507 ldv_handler_precall();
1508 bfad_im_reset_bus_handler( var_group2);
1509
1510
1511
1512
1513 }
1514
1515 break;
1516 case 4: {
1517
1518 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1519
1520
1521 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1522 /* LDV_COMMENT_END_PREP */
1523 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_alloc" from driver structure with callbacks "bfad_im_scsi_host_template" */
1524 ldv_handler_precall();
1525 bfad_im_slave_alloc( var_group3);
1526
1527
1528
1529
1530 }
1531
1532 break;
1533 case 5: {
1534
1535 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1536
1537
1538 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1539 /* LDV_COMMENT_END_PREP */
1540 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_configure" from driver structure with callbacks "bfad_im_scsi_host_template" */
1541 ldv_handler_precall();
1542 bfad_im_slave_configure( var_group3);
1543
1544
1545
1546
1547 }
1548
1549 break;
1550 case 6: {
1551
1552 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_scsi_host_template **/
1553
1554
1555 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1556 /* LDV_COMMENT_END_PREP */
1557 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_destroy" from driver structure with callbacks "bfad_im_scsi_host_template" */
1558 ldv_handler_precall();
1559 bfad_im_slave_destroy( var_group3);
1560
1561
1562
1563
1564 }
1565
1566 break;
1567 case 7: {
1568
1569 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1570
1571
1572 /* content: static const char * bfad_im_info(struct Scsi_Host *shost)*/
1573 /* LDV_COMMENT_END_PREP */
1574 /* LDV_COMMENT_FUNCTION_CALL Function from field "info" from driver structure with callbacks "bfad_im_vport_template" */
1575 ldv_handler_precall();
1576 bfad_im_info( var_group1);
1577
1578
1579
1580
1581 }
1582
1583 break;
1584 case 8: {
1585
1586 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1587
1588
1589 /* content: static int bfad_im_abort_handler(struct scsi_cmnd *cmnd)*/
1590 /* LDV_COMMENT_END_PREP */
1591 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_abort_handler" from driver structure with callbacks "bfad_im_vport_template" */
1592 ldv_handler_precall();
1593 bfad_im_abort_handler( var_group2);
1594
1595
1596
1597
1598 }
1599
1600 break;
1601 case 9: {
1602
1603 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1604
1605
1606 /* content: static int bfad_im_reset_lun_handler(struct scsi_cmnd *cmnd)*/
1607 /* LDV_COMMENT_END_PREP */
1608 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_device_reset_handler" from driver structure with callbacks "bfad_im_vport_template" */
1609 ldv_handler_precall();
1610 bfad_im_reset_lun_handler( var_group2);
1611
1612
1613
1614
1615 }
1616
1617 break;
1618 case 10: {
1619
1620 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1621
1622
1623 /* content: static int bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)*/
1624 /* LDV_COMMENT_END_PREP */
1625 /* LDV_COMMENT_FUNCTION_CALL Function from field "eh_bus_reset_handler" from driver structure with callbacks "bfad_im_vport_template" */
1626 ldv_handler_precall();
1627 bfad_im_reset_bus_handler( var_group2);
1628
1629
1630
1631
1632 }
1633
1634 break;
1635 case 11: {
1636
1637 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1638
1639
1640 /* content: static int bfad_im_slave_alloc(struct scsi_device *sdev)*/
1641 /* LDV_COMMENT_END_PREP */
1642 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_alloc" from driver structure with callbacks "bfad_im_vport_template" */
1643 ldv_handler_precall();
1644 bfad_im_slave_alloc( var_group3);
1645
1646
1647
1648
1649 }
1650
1651 break;
1652 case 12: {
1653
1654 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1655
1656
1657 /* content: static int bfad_im_slave_configure(struct scsi_device *sdev)*/
1658 /* LDV_COMMENT_END_PREP */
1659 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_configure" from driver structure with callbacks "bfad_im_vport_template" */
1660 ldv_handler_precall();
1661 bfad_im_slave_configure( var_group3);
1662
1663
1664
1665
1666 }
1667
1668 break;
1669 case 13: {
1670
1671 /** STRUCT: struct type: scsi_host_template, struct name: bfad_im_vport_template **/
1672
1673
1674 /* content: static void bfad_im_slave_destroy(struct scsi_device *sdev)*/
1675 /* LDV_COMMENT_END_PREP */
1676 /* LDV_COMMENT_FUNCTION_CALL Function from field "slave_destroy" from driver structure with callbacks "bfad_im_vport_template" */
1677 ldv_handler_precall();
1678 bfad_im_slave_destroy( var_group3);
1679
1680
1681
1682
1683 }
1684
1685 break;
1686 default: break;
1687
1688 }
1689
1690 }
1691
1692 ldv_module_exit:
1693
1694 /* LDV_COMMENT_FUNCTION_CALL Checks that all resources and locks are correctly released before the driver will be unloaded. */
1695 ldv_final: ldv_check_final_state();
1696
1697 /* LDV_COMMENT_END_FUNCTION_CALL_SECTION */
1698 return;
1699
1700 }
1701 #endif
1702
1703 /* LDV_COMMENT_END_MAIN */
1704
1705 #line 18 "/work/ldvuser/ref_launch/work/current--X--drivers--X--defaultlinux-4.0-rc1.tar.xz--X--153_7a--X--cpachecker/linux-4.0-rc1.tar.xz/csd_deg_dscv/11450/dscv_tempdir/dscv/ri/153_7a/drivers/scsi/bfa/bfad_im.o.c.prepared" 1
2 #include <linux/kernel.h>
3 #include <linux/idr.h>
4 #include <verifier/rcv.h>
5 #include <verifier/set.h>
6 #include <kernel-model/ERR.inc>
7
8 enum
9 {
10 LDV_NOT_INITIALIZED,
11 LDV_INITIALIZED,
12 LDV_STATIC_INITIALIZED,
13 LDV_CHANGED,
14 LDV_DESTROYED
15 };
16
17
18 static int ldv_state_bfad_im_port_index;
19
20 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_idr_init') Init IDR. */
21 void ldv_idr_init_bfad_im_port_index(void)
22 {
23 /* LDV_COMMENT_ASSERT If IDR not initialized it can be initialized */
24 ldv_assert(ldv_state_bfad_im_port_index == LDV_NOT_INITIALIZED);
25
26 /* LDV_COMMENT_CHANGE_STATE Initialize state_bfad_im_port_index */
27 ldv_state_bfad_im_port_index = LDV_INITIALIZED;
28 }
29
30 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_idr_alloc') Alloc new object in IDR. */
31 void ldv_idr_alloc_bfad_im_port_index(void)
32 {
33 /* LDV_COMMENT_ASSERT If IDR initialized there can be allocated an object */
34 ldv_assert(ldv_state_bfad_im_port_index == LDV_INITIALIZED
35 || ldv_state_bfad_im_port_index == LDV_STATIC_INITIALIZED
36 || ldv_state_bfad_im_port_index == LDV_CHANGED);
37
38 /* LDV_COMMENT_CHANGE_STATE Alloc in state_bfad_im_port_index */
39 ldv_state_bfad_im_port_index = LDV_CHANGED;
40 }
41
42 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_idr_find') Find object in IDR. */
43 void ldv_idr_find_bfad_im_port_index(void)
44 {
45 /* LDV_COMMENT_ASSERT If IDR initialized we can look for object here */
46 ldv_assert(ldv_state_bfad_im_port_index == LDV_INITIALIZED
47 || ldv_state_bfad_im_port_index == LDV_STATIC_INITIALIZED
48 || ldv_state_bfad_im_port_index == LDV_CHANGED);
49
50 /* LDV_COMMENT_CHANGE_STATE Find in state_bfad_im_port_index */
51 ldv_state_bfad_im_port_index = LDV_CHANGED;
52 }
53
54 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_idr_remove') Remove object from IDR. */
55 void ldv_idr_remove_bfad_im_port_index(void)
56 {
57 /* LDV_COMMENT_ASSERT If IDR initialized we can remove object from there */
58 ldv_assert(ldv_state_bfad_im_port_index == LDV_INITIALIZED
59 || ldv_state_bfad_im_port_index == LDV_STATIC_INITIALIZED
60 || ldv_state_bfad_im_port_index == LDV_CHANGED);
61
62 /* LDV_COMMENT_CHANGE_STATE Remove from state_bfad_im_port_index */
63 ldv_state_bfad_im_port_index = LDV_CHANGED;
64 }
65
66 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_idr_destroy') Destroy IDR. */
67 void ldv_idr_destroy_bfad_im_port_index(void)
68 {
69 /* LDV_COMMENT_ASSERT If IDR initialized it can be destroyed */
70 ldv_assert(ldv_state_bfad_im_port_index == LDV_INITIALIZED
71 || ldv_state_bfad_im_port_index == LDV_STATIC_INITIALIZED
72 || ldv_state_bfad_im_port_index == LDV_CHANGED);
73
74 /* LDV_COMMENT_CHANGE_STATE Destroy state_bfad_im_port_index */
75 ldv_state_bfad_im_port_index = LDV_DESTROYED;
76 }
77
78
79 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_initialize') Initialize all module reference counters at the beginning */
80 void ldv_initialize(void)
81 {
82
83 /* LDV_COMMENT_CHANGE_STATE Make state 'bfad_im_port_index' not initialized. */
84 ldv_state_bfad_im_port_index = LDV_NOT_INITIALIZED;
85
86
87
88 /* LDV_COMMENT_CHANGE_STATE Make state 'bfad_im_port_index' initialized. */
89 ldv_state_bfad_im_port_index = LDV_STATIC_INITIALIZED;
90
91 }
92
93 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_check_final_state') Check that all module reference counters have their end values at the end */
94 void ldv_check_final_state(void)
95 {
96
97 /* LDV_COMMENT_ASSERT Check if state 'bfad_im_port_index' is destroyed or not changed */
98 ldv_assert(ldv_state_bfad_im_port_index == LDV_NOT_INITIALIZED
99 || ldv_state_bfad_im_port_index == LDV_STATIC_INITIALIZED
100 || ldv_state_bfad_im_port_index == LDV_DESTROYED);
101
102 } 1 #ifndef _LDV_RCV_H_
2 #define _LDV_RCV_H_
3
4 /* If expr evaluates to zero, ldv_assert() causes a program to reach the error
5 label like the standard assert(). */
6 #define ldv_assert(expr) ((expr) ? 0 : ldv_error())
7
8 /* The error label wrapper. It is used because of some static verifiers (like
9 BLAST) don't accept multiple error labels through a program. */
10 static inline void ldv_error(void)
11 {
12 LDV_ERROR: goto LDV_ERROR;
13 }
14
15 /* If expr evaluates to zero, ldv_assume() causes an infinite loop that is
16 avoided by verifiers. */
17 #define ldv_assume(expr) ((expr) ? 0 : ldv_stop())
18
19 /* Infinite loop, that causes verifiers to skip such paths. */
20 static inline void ldv_stop(void) {
21 LDV_STOP: goto LDV_STOP;
22 }
23
24 /* Special nondeterministic functions. */
25 int ldv_undef_int(void);
26 void *ldv_undef_ptr(void);
27 unsigned long ldv_undef_ulong(void);
28 long ldv_undef_long(void);
29 /* Return nondeterministic negative integer number. */
30 static inline int ldv_undef_int_negative(void)
31 {
32 int ret = ldv_undef_int();
33
34 ldv_assume(ret < 0);
35
36 return ret;
37 }
38 /* Return nondeterministic nonpositive integer number. */
39 static inline int ldv_undef_int_nonpositive(void)
40 {
41 int ret = ldv_undef_int();
42
43 ldv_assume(ret <= 0);
44
45 return ret;
46 }
47
48 /* Add explicit model for __builin_expect GCC function. Without the model a
49 return value will be treated as nondetermined by verifiers. */
50 long __builtin_expect(long exp, long c)
51 {
52 return exp;
53 }
54
55 /* This function causes the program to exit abnormally. GCC implements this
56 function by using a target-dependent mechanism (such as intentionally executing
57 an illegal instruction) or by calling abort. The mechanism used may vary from
58 release to release so you should not rely on any particular implementation.
59 http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
60 void __builtin_trap(void)
61 {
62 ldv_assert(0);
63 }
64
65 /* The constant is for simulating an error of ldv_undef_ptr() function. */
66 #define LDV_PTR_MAX 2012
67
68 #endif /* _LDV_RCV_H_ */ 1 #ifndef _LINUX_LIST_H
2 #define _LINUX_LIST_H
3
4 #include <linux/types.h>
5 #include <linux/stddef.h>
6 #include <linux/poison.h>
7 #include <linux/const.h>
8 #include <linux/kernel.h>
9
10 /*
11 * Simple doubly linked list implementation.
12 *
13 * Some of the internal functions ("__xxx") are useful when
14 * manipulating whole lists rather than single entries, as
15 * sometimes we already know the next/prev entries and we can
16 * generate better code by using them directly rather than
17 * using the generic single-entry routines.
18 */
19
20 #define LIST_HEAD_INIT(name) { &(name), &(name) }
21
22 #define LIST_HEAD(name) \
23 struct list_head name = LIST_HEAD_INIT(name)
24
25 static inline void INIT_LIST_HEAD(struct list_head *list)
26 {
27 list->next = list;
28 list->prev = list;
29 }
30
31 /*
32 * Insert a new entry between two known consecutive entries.
33 *
34 * This is only for internal list manipulation where we know
35 * the prev/next entries already!
36 */
37 #ifndef CONFIG_DEBUG_LIST
38 static inline void __list_add(struct list_head *new,
39 struct list_head *prev,
40 struct list_head *next)
41 {
42 next->prev = new;
43 new->next = next;
44 new->prev = prev;
45 prev->next = new;
46 }
47 #else
48 extern void __list_add(struct list_head *new,
49 struct list_head *prev,
50 struct list_head *next);
51 #endif
52
53 /**
54 * list_add - add a new entry
55 * @new: new entry to be added
56 * @head: list head to add it after
57 *
58 * Insert a new entry after the specified head.
59 * This is good for implementing stacks.
60 */
61 static inline void list_add(struct list_head *new, struct list_head *head)
62 {
63 __list_add(new, head, head->next);
64 }
65
66
67 /**
68 * list_add_tail - add a new entry
69 * @new: new entry to be added
70 * @head: list head to add it before
71 *
72 * Insert a new entry before the specified head.
73 * This is useful for implementing queues.
74 */
75 static inline void list_add_tail(struct list_head *new, struct list_head *head)
76 {
77 __list_add(new, head->prev, head);
78 }
79
80 /*
81 * Delete a list entry by making the prev/next entries
82 * point to each other.
83 *
84 * This is only for internal list manipulation where we know
85 * the prev/next entries already!
86 */
87 static inline void __list_del(struct list_head * prev, struct list_head * next)
88 {
89 next->prev = prev;
90 prev->next = next;
91 }
92
93 /**
94 * list_del - deletes entry from list.
95 * @entry: the element to delete from the list.
96 * Note: list_empty() on entry does not return true after this, the entry is
97 * in an undefined state.
98 */
99 #ifndef CONFIG_DEBUG_LIST
100 static inline void __list_del_entry(struct list_head *entry)
101 {
102 __list_del(entry->prev, entry->next);
103 }
104
105 static inline void list_del(struct list_head *entry)
106 {
107 __list_del(entry->prev, entry->next);
108 entry->next = LIST_POISON1;
109 entry->prev = LIST_POISON2;
110 }
111 #else
112 extern void __list_del_entry(struct list_head *entry);
113 extern void list_del(struct list_head *entry);
114 #endif
115
116 /**
117 * list_replace - replace old entry by new one
118 * @old : the element to be replaced
119 * @new : the new element to insert
120 *
121 * If @old was empty, it will be overwritten.
122 */
123 static inline void list_replace(struct list_head *old,
124 struct list_head *new)
125 {
126 new->next = old->next;
127 new->next->prev = new;
128 new->prev = old->prev;
129 new->prev->next = new;
130 }
131
132 static inline void list_replace_init(struct list_head *old,
133 struct list_head *new)
134 {
135 list_replace(old, new);
136 INIT_LIST_HEAD(old);
137 }
138
139 /**
140 * list_del_init - deletes entry from list and reinitialize it.
141 * @entry: the element to delete from the list.
142 */
143 static inline void list_del_init(struct list_head *entry)
144 {
145 __list_del_entry(entry);
146 INIT_LIST_HEAD(entry);
147 }
148
149 /**
150 * list_move - delete from one list and add as another's head
151 * @list: the entry to move
152 * @head: the head that will precede our entry
153 */
154 static inline void list_move(struct list_head *list, struct list_head *head)
155 {
156 __list_del_entry(list);
157 list_add(list, head);
158 }
159
160 /**
161 * list_move_tail - delete from one list and add as another's tail
162 * @list: the entry to move
163 * @head: the head that will follow our entry
164 */
165 static inline void list_move_tail(struct list_head *list,
166 struct list_head *head)
167 {
168 __list_del_entry(list);
169 list_add_tail(list, head);
170 }
171
172 /**
173 * list_is_last - tests whether @list is the last entry in list @head
174 * @list: the entry to test
175 * @head: the head of the list
176 */
177 static inline int list_is_last(const struct list_head *list,
178 const struct list_head *head)
179 {
180 return list->next == head;
181 }
182
183 /**
184 * list_empty - tests whether a list is empty
185 * @head: the list to test.
186 */
187 static inline int list_empty(const struct list_head *head)
188 {
189 return head->next == head;
190 }
191
192 /**
193 * list_empty_careful - tests whether a list is empty and not being modified
194 * @head: the list to test
195 *
196 * Description:
197 * tests whether a list is empty _and_ checks that no other CPU might be
198 * in the process of modifying either member (next or prev)
199 *
200 * NOTE: using list_empty_careful() without synchronization
201 * can only be safe if the only activity that can happen
202 * to the list entry is list_del_init(). Eg. it cannot be used
203 * if another CPU could re-list_add() it.
204 */
205 static inline int list_empty_careful(const struct list_head *head)
206 {
207 struct list_head *next = head->next;
208 return (next == head) && (next == head->prev);
209 }
210
211 /**
212 * list_rotate_left - rotate the list to the left
213 * @head: the head of the list
214 */
215 static inline void list_rotate_left(struct list_head *head)
216 {
217 struct list_head *first;
218
219 if (!list_empty(head)) {
220 first = head->next;
221 list_move_tail(first, head);
222 }
223 }
224
225 /**
226 * list_is_singular - tests whether a list has just one entry.
227 * @head: the list to test.
228 */
229 static inline int list_is_singular(const struct list_head *head)
230 {
231 return !list_empty(head) && (head->next == head->prev);
232 }
233
234 static inline void __list_cut_position(struct list_head *list,
235 struct list_head *head, struct list_head *entry)
236 {
237 struct list_head *new_first = entry->next;
238 list->next = head->next;
239 list->next->prev = list;
240 list->prev = entry;
241 entry->next = list;
242 head->next = new_first;
243 new_first->prev = head;
244 }
245
246 /**
247 * list_cut_position - cut a list into two
248 * @list: a new list to add all removed entries
249 * @head: a list with entries
250 * @entry: an entry within head, could be the head itself
251 * and if so we won't cut the list
252 *
253 * This helper moves the initial part of @head, up to and
254 * including @entry, from @head to @list. You should
255 * pass on @entry an element you know is on @head. @list
256 * should be an empty list or a list you do not care about
257 * losing its data.
258 *
259 */
260 static inline void list_cut_position(struct list_head *list,
261 struct list_head *head, struct list_head *entry)
262 {
263 if (list_empty(head))
264 return;
265 if (list_is_singular(head) &&
266 (head->next != entry && head != entry))
267 return;
268 if (entry == head)
269 INIT_LIST_HEAD(list);
270 else
271 __list_cut_position(list, head, entry);
272 }
273
274 static inline void __list_splice(const struct list_head *list,
275 struct list_head *prev,
276 struct list_head *next)
277 {
278 struct list_head *first = list->next;
279 struct list_head *last = list->prev;
280
281 first->prev = prev;
282 prev->next = first;
283
284 last->next = next;
285 next->prev = last;
286 }
287
288 /**
289 * list_splice - join two lists, this is designed for stacks
290 * @list: the new list to add.
291 * @head: the place to add it in the first list.
292 */
293 static inline void list_splice(const struct list_head *list,
294 struct list_head *head)
295 {
296 if (!list_empty(list))
297 __list_splice(list, head, head->next);
298 }
299
300 /**
301 * list_splice_tail - join two lists, each list being a queue
302 * @list: the new list to add.
303 * @head: the place to add it in the first list.
304 */
305 static inline void list_splice_tail(struct list_head *list,
306 struct list_head *head)
307 {
308 if (!list_empty(list))
309 __list_splice(list, head->prev, head);
310 }
311
312 /**
313 * list_splice_init - join two lists and reinitialise the emptied list.
314 * @list: the new list to add.
315 * @head: the place to add it in the first list.
316 *
317 * The list at @list is reinitialised
318 */
319 static inline void list_splice_init(struct list_head *list,
320 struct list_head *head)
321 {
322 if (!list_empty(list)) {
323 __list_splice(list, head, head->next);
324 INIT_LIST_HEAD(list);
325 }
326 }
327
328 /**
329 * list_splice_tail_init - join two lists and reinitialise the emptied list
330 * @list: the new list to add.
331 * @head: the place to add it in the first list.
332 *
333 * Each of the lists is a queue.
334 * The list at @list is reinitialised
335 */
336 static inline void list_splice_tail_init(struct list_head *list,
337 struct list_head *head)
338 {
339 if (!list_empty(list)) {
340 __list_splice(list, head->prev, head);
341 INIT_LIST_HEAD(list);
342 }
343 }
344
345 /**
346 * list_entry - get the struct for this entry
347 * @ptr: the &struct list_head pointer.
348 * @type: the type of the struct this is embedded in.
349 * @member: the name of the list_head within the struct.
350 */
351 #define list_entry(ptr, type, member) \
352 container_of(ptr, type, member)
353
354 /**
355 * list_first_entry - get the first element from a list
356 * @ptr: the list head to take the element from.
357 * @type: the type of the struct this is embedded in.
358 * @member: the name of the list_head within the struct.
359 *
360 * Note, that list is expected to be not empty.
361 */
362 #define list_first_entry(ptr, type, member) \
363 list_entry((ptr)->next, type, member)
364
365 /**
366 * list_last_entry - get the last element from a list
367 * @ptr: the list head to take the element from.
368 * @type: the type of the struct this is embedded in.
369 * @member: the name of the list_head within the struct.
370 *
371 * Note, that list is expected to be not empty.
372 */
373 #define list_last_entry(ptr, type, member) \
374 list_entry((ptr)->prev, type, member)
375
376 /**
377 * list_first_entry_or_null - get the first element from a list
378 * @ptr: the list head to take the element from.
379 * @type: the type of the struct this is embedded in.
380 * @member: the name of the list_head within the struct.
381 *
382 * Note that if the list is empty, it returns NULL.
383 */
384 #define list_first_entry_or_null(ptr, type, member) \
385 (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL)
386
387 /**
388 * list_next_entry - get the next element in list
389 * @pos: the type * to cursor
390 * @member: the name of the list_head within the struct.
391 */
392 #define list_next_entry(pos, member) \
393 list_entry((pos)->member.next, typeof(*(pos)), member)
394
395 /**
396 * list_prev_entry - get the prev element in list
397 * @pos: the type * to cursor
398 * @member: the name of the list_head within the struct.
399 */
400 #define list_prev_entry(pos, member) \
401 list_entry((pos)->member.prev, typeof(*(pos)), member)
402
403 /**
404 * list_for_each - iterate over a list
405 * @pos: the &struct list_head to use as a loop cursor.
406 * @head: the head for your list.
407 */
408 #define list_for_each(pos, head) \
409 for (pos = (head)->next; pos != (head); pos = pos->next)
410
411 /**
412 * list_for_each_prev - iterate over a list backwards
413 * @pos: the &struct list_head to use as a loop cursor.
414 * @head: the head for your list.
415 */
416 #define list_for_each_prev(pos, head) \
417 for (pos = (head)->prev; pos != (head); pos = pos->prev)
418
419 /**
420 * list_for_each_safe - iterate over a list safe against removal of list entry
421 * @pos: the &struct list_head to use as a loop cursor.
422 * @n: another &struct list_head to use as temporary storage
423 * @head: the head for your list.
424 */
425 #define list_for_each_safe(pos, n, head) \
426 for (pos = (head)->next, n = pos->next; pos != (head); \
427 pos = n, n = pos->next)
428
429 /**
430 * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
431 * @pos: the &struct list_head to use as a loop cursor.
432 * @n: another &struct list_head to use as temporary storage
433 * @head: the head for your list.
434 */
435 #define list_for_each_prev_safe(pos, n, head) \
436 for (pos = (head)->prev, n = pos->prev; \
437 pos != (head); \
438 pos = n, n = pos->prev)
439
440 /**
441 * list_for_each_entry - iterate over list of given type
442 * @pos: the type * to use as a loop cursor.
443 * @head: the head for your list.
444 * @member: the name of the list_head within the struct.
445 */
446 #define list_for_each_entry(pos, head, member) \
447 for (pos = list_first_entry(head, typeof(*pos), member); \
448 &pos->member != (head); \
449 pos = list_next_entry(pos, member))
450
451 /**
452 * list_for_each_entry_reverse - iterate backwards over list of given type.
453 * @pos: the type * to use as a loop cursor.
454 * @head: the head for your list.
455 * @member: the name of the list_head within the struct.
456 */
457 #define list_for_each_entry_reverse(pos, head, member) \
458 for (pos = list_last_entry(head, typeof(*pos), member); \
459 &pos->member != (head); \
460 pos = list_prev_entry(pos, member))
461
462 /**
463 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
464 * @pos: the type * to use as a start point
465 * @head: the head of the list
466 * @member: the name of the list_head within the struct.
467 *
468 * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
469 */
470 #define list_prepare_entry(pos, head, member) \
471 ((pos) ? : list_entry(head, typeof(*pos), member))
472
473 /**
474 * list_for_each_entry_continue - continue iteration over list of given type
475 * @pos: the type * to use as a loop cursor.
476 * @head: the head for your list.
477 * @member: the name of the list_head within the struct.
478 *
479 * Continue to iterate over list of given type, continuing after
480 * the current position.
481 */
482 #define list_for_each_entry_continue(pos, head, member) \
483 for (pos = list_next_entry(pos, member); \
484 &pos->member != (head); \
485 pos = list_next_entry(pos, member))
486
487 /**
488 * list_for_each_entry_continue_reverse - iterate backwards from the given point
489 * @pos: the type * to use as a loop cursor.
490 * @head: the head for your list.
491 * @member: the name of the list_head within the struct.
492 *
493 * Start to iterate over list of given type backwards, continuing after
494 * the current position.
495 */
496 #define list_for_each_entry_continue_reverse(pos, head, member) \
497 for (pos = list_prev_entry(pos, member); \
498 &pos->member != (head); \
499 pos = list_prev_entry(pos, member))
500
501 /**
502 * list_for_each_entry_from - iterate over list of given type from the current point
503 * @pos: the type * to use as a loop cursor.
504 * @head: the head for your list.
505 * @member: the name of the list_head within the struct.
506 *
507 * Iterate over list of given type, continuing from current position.
508 */
509 #define list_for_each_entry_from(pos, head, member) \
510 for (; &pos->member != (head); \
511 pos = list_next_entry(pos, member))
512
513 /**
514 * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
515 * @pos: the type * to use as a loop cursor.
516 * @n: another type * to use as temporary storage
517 * @head: the head for your list.
518 * @member: the name of the list_head within the struct.
519 */
520 #define list_for_each_entry_safe(pos, n, head, member) \
521 for (pos = list_first_entry(head, typeof(*pos), member), \
522 n = list_next_entry(pos, member); \
523 &pos->member != (head); \
524 pos = n, n = list_next_entry(n, member))
525
526 /**
527 * list_for_each_entry_safe_continue - continue list iteration safe against removal
528 * @pos: the type * to use as a loop cursor.
529 * @n: another type * to use as temporary storage
530 * @head: the head for your list.
531 * @member: the name of the list_head within the struct.
532 *
533 * Iterate over list of given type, continuing after current point,
534 * safe against removal of list entry.
535 */
536 #define list_for_each_entry_safe_continue(pos, n, head, member) \
537 for (pos = list_next_entry(pos, member), \
538 n = list_next_entry(pos, member); \
539 &pos->member != (head); \
540 pos = n, n = list_next_entry(n, member))
541
542 /**
543 * list_for_each_entry_safe_from - iterate over list from current point safe against removal
544 * @pos: the type * to use as a loop cursor.
545 * @n: another type * to use as temporary storage
546 * @head: the head for your list.
547 * @member: the name of the list_head within the struct.
548 *
549 * Iterate over list of given type from current point, safe against
550 * removal of list entry.
551 */
552 #define list_for_each_entry_safe_from(pos, n, head, member) \
553 for (n = list_next_entry(pos, member); \
554 &pos->member != (head); \
555 pos = n, n = list_next_entry(n, member))
556
557 /**
558 * list_for_each_entry_safe_reverse - iterate backwards over list safe against removal
559 * @pos: the type * to use as a loop cursor.
560 * @n: another type * to use as temporary storage
561 * @head: the head for your list.
562 * @member: the name of the list_head within the struct.
563 *
564 * Iterate backwards over list of given type, safe against removal
565 * of list entry.
566 */
567 #define list_for_each_entry_safe_reverse(pos, n, head, member) \
568 for (pos = list_last_entry(head, typeof(*pos), member), \
569 n = list_prev_entry(pos, member); \
570 &pos->member != (head); \
571 pos = n, n = list_prev_entry(n, member))
572
573 /**
574 * list_safe_reset_next - reset a stale list_for_each_entry_safe loop
575 * @pos: the loop cursor used in the list_for_each_entry_safe loop
576 * @n: temporary storage used in list_for_each_entry_safe
577 * @member: the name of the list_head within the struct.
578 *
579 * list_safe_reset_next is not safe to use in general if the list may be
580 * modified concurrently (eg. the lock is dropped in the loop body). An
581 * exception to this is if the cursor element (pos) is pinned in the list,
582 * and list_safe_reset_next is called after re-taking the lock and before
583 * completing the current iteration of the loop body.
584 */
585 #define list_safe_reset_next(pos, n, member) \
586 n = list_next_entry(pos, member)
587
588 /*
589 * Double linked lists with a single pointer list head.
590 * Mostly useful for hash tables where the two pointer list head is
591 * too wasteful.
592 * You lose the ability to access the tail in O(1).
593 */
594
595 #define HLIST_HEAD_INIT { .first = NULL }
596 #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
597 #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
598 static inline void INIT_HLIST_NODE(struct hlist_node *h)
599 {
600 h->next = NULL;
601 h->pprev = NULL;
602 }
603
604 static inline int hlist_unhashed(const struct hlist_node *h)
605 {
606 return !h->pprev;
607 }
608
609 static inline int hlist_empty(const struct hlist_head *h)
610 {
611 return !h->first;
612 }
613
614 static inline void __hlist_del(struct hlist_node *n)
615 {
616 struct hlist_node *next = n->next;
617 struct hlist_node **pprev = n->pprev;
618 *pprev = next;
619 if (next)
620 next->pprev = pprev;
621 }
622
623 static inline void hlist_del(struct hlist_node *n)
624 {
625 __hlist_del(n);
626 n->next = LIST_POISON1;
627 n->pprev = LIST_POISON2;
628 }
629
630 static inline void hlist_del_init(struct hlist_node *n)
631 {
632 if (!hlist_unhashed(n)) {
633 __hlist_del(n);
634 INIT_HLIST_NODE(n);
635 }
636 }
637
638 static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
639 {
640 struct hlist_node *first = h->first;
641 n->next = first;
642 if (first)
643 first->pprev = &n->next;
644 h->first = n;
645 n->pprev = &h->first;
646 }
647
648 /* next must be != NULL */
649 static inline void hlist_add_before(struct hlist_node *n,
650 struct hlist_node *next)
651 {
652 n->pprev = next->pprev;
653 n->next = next;
654 next->pprev = &n->next;
655 *(n->pprev) = n;
656 }
657
658 static inline void hlist_add_behind(struct hlist_node *n,
659 struct hlist_node *prev)
660 {
661 n->next = prev->next;
662 prev->next = n;
663 n->pprev = &prev->next;
664
665 if (n->next)
666 n->next->pprev = &n->next;
667 }
668
669 /* after that we'll appear to be on some hlist and hlist_del will work */
670 static inline void hlist_add_fake(struct hlist_node *n)
671 {
672 n->pprev = &n->next;
673 }
674
675 /*
676 * Move a list from one list head to another. Fixup the pprev
677 * reference of the first entry if it exists.
678 */
679 static inline void hlist_move_list(struct hlist_head *old,
680 struct hlist_head *new)
681 {
682 new->first = old->first;
683 if (new->first)
684 new->first->pprev = &new->first;
685 old->first = NULL;
686 }
687
688 #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
689
690 #define hlist_for_each(pos, head) \
691 for (pos = (head)->first; pos ; pos = pos->next)
692
693 #define hlist_for_each_safe(pos, n, head) \
694 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
695 pos = n)
696
697 #define hlist_entry_safe(ptr, type, member) \
698 ({ typeof(ptr) ____ptr = (ptr); \
699 ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
700 })
701
702 /**
703 * hlist_for_each_entry - iterate over list of given type
704 * @pos: the type * to use as a loop cursor.
705 * @head: the head for your list.
706 * @member: the name of the hlist_node within the struct.
707 */
708 #define hlist_for_each_entry(pos, head, member) \
709 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
710 pos; \
711 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
712
713 /**
714 * hlist_for_each_entry_continue - iterate over a hlist continuing after current point
715 * @pos: the type * to use as a loop cursor.
716 * @member: the name of the hlist_node within the struct.
717 */
718 #define hlist_for_each_entry_continue(pos, member) \
719 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
720 pos; \
721 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
722
723 /**
724 * hlist_for_each_entry_from - iterate over a hlist continuing from current point
725 * @pos: the type * to use as a loop cursor.
726 * @member: the name of the hlist_node within the struct.
727 */
728 #define hlist_for_each_entry_from(pos, member) \
729 for (; pos; \
730 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
731
732 /**
733 * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
734 * @pos: the type * to use as a loop cursor.
735 * @n: another &struct hlist_node to use as temporary storage
736 * @head: the head for your list.
737 * @member: the name of the hlist_node within the struct.
738 */
739 #define hlist_for_each_entry_safe(pos, n, head, member) \
740 for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
741 pos && ({ n = pos->member.next; 1; }); \
742 pos = hlist_entry_safe(n, typeof(*pos), member))
743
744 #endif 1 #ifndef __LINUX_SPINLOCK_H
2 #define __LINUX_SPINLOCK_H
3
4 /*
5 * include/linux/spinlock.h - generic spinlock/rwlock declarations
6 *
7 * here's the role of the various spinlock/rwlock related include files:
8 *
9 * on SMP builds:
10 *
11 * asm/spinlock_types.h: contains the arch_spinlock_t/arch_rwlock_t and the
12 * initializers
13 *
14 * linux/spinlock_types.h:
15 * defines the generic type and initializers
16 *
17 * asm/spinlock.h: contains the arch_spin_*()/etc. lowlevel
18 * implementations, mostly inline assembly code
19 *
20 * (also included on UP-debug builds:)
21 *
22 * linux/spinlock_api_smp.h:
23 * contains the prototypes for the _spin_*() APIs.
24 *
25 * linux/spinlock.h: builds the final spin_*() APIs.
26 *
27 * on UP builds:
28 *
29 * linux/spinlock_type_up.h:
30 * contains the generic, simplified UP spinlock type.
31 * (which is an empty structure on non-debug builds)
32 *
33 * linux/spinlock_types.h:
34 * defines the generic type and initializers
35 *
36 * linux/spinlock_up.h:
37 * contains the arch_spin_*()/etc. version of UP
38 * builds. (which are NOPs on non-debug, non-preempt
39 * builds)
40 *
41 * (included on UP-non-debug builds:)
42 *
43 * linux/spinlock_api_up.h:
44 * builds the _spin_*() APIs.
45 *
46 * linux/spinlock.h: builds the final spin_*() APIs.
47 */
48
49 #include <linux/typecheck.h>
50 #include <linux/preempt.h>
51 #include <linux/linkage.h>
52 #include <linux/compiler.h>
53 #include <linux/irqflags.h>
54 #include <linux/thread_info.h>
55 #include <linux/kernel.h>
56 #include <linux/stringify.h>
57 #include <linux/bottom_half.h>
58 #include <asm/barrier.h>
59
60
61 /*
62 * Must define these before including other files, inline functions need them
63 */
64 #define LOCK_SECTION_NAME ".text..lock."KBUILD_BASENAME
65
66 #define LOCK_SECTION_START(extra) \
67 ".subsection 1\n\t" \
68 extra \
69 ".ifndef " LOCK_SECTION_NAME "\n\t" \
70 LOCK_SECTION_NAME ":\n\t" \
71 ".endif\n"
72
73 #define LOCK_SECTION_END \
74 ".previous\n\t"
75
76 #define __lockfunc __attribute__((section(".spinlock.text")))
77
78 /*
79 * Pull the arch_spinlock_t and arch_rwlock_t definitions:
80 */
81 #include <linux/spinlock_types.h>
82
83 /*
84 * Pull the arch_spin*() functions/declarations (UP-nondebug doesn't need them):
85 */
86 #ifdef CONFIG_SMP
87 # include <asm/spinlock.h>
88 #else
89 # include <linux/spinlock_up.h>
90 #endif
91
92 #ifdef CONFIG_DEBUG_SPINLOCK
93 extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
94 struct lock_class_key *key);
95 # define raw_spin_lock_init(lock) \
96 do { \
97 static struct lock_class_key __key; \
98 \
99 __raw_spin_lock_init((lock), #lock, &__key); \
100 } while (0)
101
102 #else
103 # define raw_spin_lock_init(lock) \
104 do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0)
105 #endif
106
107 #define raw_spin_is_locked(lock) arch_spin_is_locked(&(lock)->raw_lock)
108
109 #ifdef CONFIG_GENERIC_LOCKBREAK
110 #define raw_spin_is_contended(lock) ((lock)->break_lock)
111 #else
112
113 #ifdef arch_spin_is_contended
114 #define raw_spin_is_contended(lock) arch_spin_is_contended(&(lock)->raw_lock)
115 #else
116 #define raw_spin_is_contended(lock) (((void)(lock), 0))
117 #endif /*arch_spin_is_contended*/
118 #endif
119
120 /*
121 * Despite its name it doesn't necessarily has to be a full barrier.
122 * It should only guarantee that a STORE before the critical section
123 * can not be reordered with a LOAD inside this section.
124 * spin_lock() is the one-way barrier, this LOAD can not escape out
125 * of the region. So the default implementation simply ensures that
126 * a STORE can not move into the critical section, smp_wmb() should
127 * serialize it with another STORE done by spin_lock().
128 */
129 #ifndef smp_mb__before_spinlock
130 #define smp_mb__before_spinlock() smp_wmb()
131 #endif
132
133 /*
134 * Place this after a lock-acquisition primitive to guarantee that
135 * an UNLOCK+LOCK pair act as a full barrier. This guarantee applies
136 * if the UNLOCK and LOCK are executed by the same CPU or if the
137 * UNLOCK and LOCK operate on the same lock variable.
138 */
139 #ifndef smp_mb__after_unlock_lock
140 #define smp_mb__after_unlock_lock() do { } while (0)
141 #endif
142
143 /**
144 * raw_spin_unlock_wait - wait until the spinlock gets unlocked
145 * @lock: the spinlock in question.
146 */
147 #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock)
148
149 #ifdef CONFIG_DEBUG_SPINLOCK
150 extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock);
151 #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock)
152 extern int do_raw_spin_trylock(raw_spinlock_t *lock);
153 extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock);
154 #else
155 static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock)
156 {
157 __acquire(lock);
158 arch_spin_lock(&lock->raw_lock);
159 }
160
161 static inline void
162 do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) __acquires(lock)
163 {
164 __acquire(lock);
165 arch_spin_lock_flags(&lock->raw_lock, *flags);
166 }
167
168 static inline int do_raw_spin_trylock(raw_spinlock_t *lock)
169 {
170 return arch_spin_trylock(&(lock)->raw_lock);
171 }
172
173 static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
174 {
175 arch_spin_unlock(&lock->raw_lock);
176 __release(lock);
177 }
178 #endif
179
180 /*
181 * Define the various spin_lock methods. Note we define these
182 * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The
183 * various methods are defined as nops in the case they are not
184 * required.
185 */
186 #define raw_spin_trylock(lock) __cond_lock(lock, _raw_spin_trylock(lock))
187
188 #define raw_spin_lock(lock) _raw_spin_lock(lock)
189
190 #ifdef CONFIG_DEBUG_LOCK_ALLOC
191 # define raw_spin_lock_nested(lock, subclass) \
192 _raw_spin_lock_nested(lock, subclass)
193 # define raw_spin_lock_bh_nested(lock, subclass) \
194 _raw_spin_lock_bh_nested(lock, subclass)
195
196 # define raw_spin_lock_nest_lock(lock, nest_lock) \
197 do { \
198 typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\
199 _raw_spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \
200 } while (0)
201 #else
202 /*
203 * Always evaluate the 'subclass' argument to avoid that the compiler
204 * warns about set-but-not-used variables when building with
205 * CONFIG_DEBUG_LOCK_ALLOC=n and with W=1.
206 */
207 # define raw_spin_lock_nested(lock, subclass) \
208 _raw_spin_lock(((void)(subclass), (lock)))
209 # define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock)
210 # define raw_spin_lock_bh_nested(lock, subclass) _raw_spin_lock_bh(lock)
211 #endif
212
213 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
214
215 #define raw_spin_lock_irqsave(lock, flags) \
216 do { \
217 typecheck(unsigned long, flags); \
218 flags = _raw_spin_lock_irqsave(lock); \
219 } while (0)
220
221 #ifdef CONFIG_DEBUG_LOCK_ALLOC
222 #define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
223 do { \
224 typecheck(unsigned long, flags); \
225 flags = _raw_spin_lock_irqsave_nested(lock, subclass); \
226 } while (0)
227 #else
228 #define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
229 do { \
230 typecheck(unsigned long, flags); \
231 flags = _raw_spin_lock_irqsave(lock); \
232 } while (0)
233 #endif
234
235 #else
236
237 #define raw_spin_lock_irqsave(lock, flags) \
238 do { \
239 typecheck(unsigned long, flags); \
240 _raw_spin_lock_irqsave(lock, flags); \
241 } while (0)
242
243 #define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
244 raw_spin_lock_irqsave(lock, flags)
245
246 #endif
247
248 #define raw_spin_lock_irq(lock) _raw_spin_lock_irq(lock)
249 #define raw_spin_lock_bh(lock) _raw_spin_lock_bh(lock)
250 #define raw_spin_unlock(lock) _raw_spin_unlock(lock)
251 #define raw_spin_unlock_irq(lock) _raw_spin_unlock_irq(lock)
252
253 #define raw_spin_unlock_irqrestore(lock, flags) \
254 do { \
255 typecheck(unsigned long, flags); \
256 _raw_spin_unlock_irqrestore(lock, flags); \
257 } while (0)
258 #define raw_spin_unlock_bh(lock) _raw_spin_unlock_bh(lock)
259
260 #define raw_spin_trylock_bh(lock) \
261 __cond_lock(lock, _raw_spin_trylock_bh(lock))
262
263 #define raw_spin_trylock_irq(lock) \
264 ({ \
265 local_irq_disable(); \
266 raw_spin_trylock(lock) ? \
267 1 : ({ local_irq_enable(); 0; }); \
268 })
269
270 #define raw_spin_trylock_irqsave(lock, flags) \
271 ({ \
272 local_irq_save(flags); \
273 raw_spin_trylock(lock) ? \
274 1 : ({ local_irq_restore(flags); 0; }); \
275 })
276
277 /**
278 * raw_spin_can_lock - would raw_spin_trylock() succeed?
279 * @lock: the spinlock in question.
280 */
281 #define raw_spin_can_lock(lock) (!raw_spin_is_locked(lock))
282
283 /* Include rwlock functions */
284 #include <linux/rwlock.h>
285
286 /*
287 * Pull the _spin_*()/_read_*()/_write_*() functions/declarations:
288 */
289 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
290 # include <linux/spinlock_api_smp.h>
291 #else
292 # include <linux/spinlock_api_up.h>
293 #endif
294
295 /*
296 * Map the spin_lock functions to the raw variants for PREEMPT_RT=n
297 */
298
299 static inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
300 {
301 return &lock->rlock;
302 }
303
304 #define spin_lock_init(_lock) \
305 do { \
306 spinlock_check(_lock); \
307 raw_spin_lock_init(&(_lock)->rlock); \
308 } while (0)
309
310 static inline void spin_lock(spinlock_t *lock)
311 {
312 raw_spin_lock(&lock->rlock);
313 }
314
315 static inline void spin_lock_bh(spinlock_t *lock)
316 {
317 raw_spin_lock_bh(&lock->rlock);
318 }
319
320 static inline int spin_trylock(spinlock_t *lock)
321 {
322 return raw_spin_trylock(&lock->rlock);
323 }
324
325 #define spin_lock_nested(lock, subclass) \
326 do { \
327 raw_spin_lock_nested(spinlock_check(lock), subclass); \
328 } while (0)
329
330 #define spin_lock_bh_nested(lock, subclass) \
331 do { \
332 raw_spin_lock_bh_nested(spinlock_check(lock), subclass);\
333 } while (0)
334
335 #define spin_lock_nest_lock(lock, nest_lock) \
336 do { \
337 raw_spin_lock_nest_lock(spinlock_check(lock), nest_lock); \
338 } while (0)
339
340 static inline void spin_lock_irq(spinlock_t *lock)
341 {
342 raw_spin_lock_irq(&lock->rlock);
343 }
344
345 #define spin_lock_irqsave(lock, flags) \
346 do { \
347 raw_spin_lock_irqsave(spinlock_check(lock), flags); \
348 } while (0)
349
350 #define spin_lock_irqsave_nested(lock, flags, subclass) \
351 do { \
352 raw_spin_lock_irqsave_nested(spinlock_check(lock), flags, subclass); \
353 } while (0)
354
355 static inline void spin_unlock(spinlock_t *lock)
356 {
357 raw_spin_unlock(&lock->rlock);
358 }
359
360 static inline void spin_unlock_bh(spinlock_t *lock)
361 {
362 raw_spin_unlock_bh(&lock->rlock);
363 }
364
365 static inline void spin_unlock_irq(spinlock_t *lock)
366 {
367 raw_spin_unlock_irq(&lock->rlock);
368 }
369
370 static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
371 {
372 raw_spin_unlock_irqrestore(&lock->rlock, flags);
373 }
374
375 static inline int spin_trylock_bh(spinlock_t *lock)
376 {
377 return raw_spin_trylock_bh(&lock->rlock);
378 }
379
380 static inline int spin_trylock_irq(spinlock_t *lock)
381 {
382 return raw_spin_trylock_irq(&lock->rlock);
383 }
384
385 #define spin_trylock_irqsave(lock, flags) \
386 ({ \
387 raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
388 })
389
390 static inline void spin_unlock_wait(spinlock_t *lock)
391 {
392 raw_spin_unlock_wait(&lock->rlock);
393 }
394
395 static inline int spin_is_locked(spinlock_t *lock)
396 {
397 return raw_spin_is_locked(&lock->rlock);
398 }
399
400 static inline int spin_is_contended(spinlock_t *lock)
401 {
402 return raw_spin_is_contended(&lock->rlock);
403 }
404
405 static inline int spin_can_lock(spinlock_t *lock)
406 {
407 return raw_spin_can_lock(&lock->rlock);
408 }
409
410 #define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock)
411
412 /*
413 * Pull the atomic_t declaration:
414 * (asm-mips/atomic.h needs above definitions)
415 */
416 #include <linux/atomic.h>
417 /**
418 * atomic_dec_and_lock - lock on reaching reference count zero
419 * @atomic: the atomic counter
420 * @lock: the spinlock in question
421 *
422 * Decrements @atomic by 1. If the result is 0, returns true and locks
423 * @lock. Returns false for all other cases.
424 */
425 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
426 #define atomic_dec_and_lock(atomic, lock) \
427 __cond_lock(lock, _atomic_dec_and_lock(atomic, lock))
428
429 #endif /* __LINUX_SPINLOCK_H */ |
Here is an explanation of a rule violation arisen while checking your driver against a corresponding kernel.
Note that it may be false positive, i.e. there isn't a real error indeed. Please analyze a given error trace and related source code to understand whether there is an error in your driver.
Error trace column contains a path on which the given rule is violated. You can expand/collapse some entity classes by clicking on corresponding checkboxes in a main menu or in an advanced Others menu. Also you can expand/collapse each particular entity by clicking on +/-. In hovering on some entities you can see some tips. Also the error trace is bound with related source code. Line numbers may be shown as links on the left. You can click on them to open corresponding lines in source code.
Source code column contains a content of files related with the error trace. There is source code of your driver (note that there are some LDV modifications at the end), kernel headers and rule model. Tabs show a currently opened file and other available files. In hovering on them you can see full file names. On clicking a corresponding file content will be shown.
Kernel | Module | Rule | Verifier | Verdict | Status | Timestamp | Bug report |
linux-4.0-rc1.tar.xz | drivers/scsi/bfa/bfa.ko | 153_7a | CPAchecker | Bug | Fixed | 2015-05-13 17:59:04 | L0201 |
[Home]