Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 1 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 2 | * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 3 | * All rights reserved |
| 4 | * www.brocade.com |
| 5 | * |
| 6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License (GPL) Version 2 as |
| 10 | * published by the Free Software Foundation |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | */ |
| 17 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 18 | /* |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 19 | * Contains base driver definitions. |
| 20 | */ |
| 21 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 22 | /* |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 23 | * bfa_drv.h Linux driver data structures. |
| 24 | */ |
| 25 | |
| 26 | #ifndef __BFAD_DRV_H__ |
| 27 | #define __BFAD_DRV_H__ |
| 28 | |
Maggie Zhang | f16a175 | 2010-12-09 19:12:32 -0800 | [diff] [blame] | 29 | #include <linux/types.h> |
| 30 | #include <linux/version.h> |
| 31 | #include <linux/pci.h> |
| 32 | #include <linux/dma-mapping.h> |
| 33 | #include <linux/idr.h> |
| 34 | #include <linux/interrupt.h> |
| 35 | #include <linux/cdev.h> |
| 36 | #include <linux/fs.h> |
| 37 | #include <linux/delay.h> |
| 38 | #include <linux/vmalloc.h> |
| 39 | #include <linux/workqueue.h> |
| 40 | #include <linux/bitops.h> |
| 41 | #include <scsi/scsi.h> |
| 42 | #include <scsi/scsi_host.h> |
| 43 | #include <scsi/scsi_tcq.h> |
| 44 | #include <scsi/scsi_transport_fc.h> |
| 45 | #include <scsi/scsi_transport.h> |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame^] | 46 | #include <scsi/scsi_bsg_fc.h> |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 47 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 48 | #include "bfa_modules.h" |
| 49 | #include "bfa_fcs.h" |
| 50 | #include "bfa_defs_fcs.h" |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 51 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 52 | #include "bfa_plog.h" |
| 53 | #include "bfa_cs.h" |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 54 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 55 | #define BFAD_DRIVER_NAME "bfa" |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 56 | #ifdef BFA_DRIVER_VERSION |
| 57 | #define BFAD_DRIVER_VERSION BFA_DRIVER_VERSION |
| 58 | #else |
Krishna Gudipati | 395eb20 | 2010-12-13 16:23:51 -0800 | [diff] [blame] | 59 | #define BFAD_DRIVER_VERSION "2.3.2.3" |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 60 | #endif |
| 61 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 62 | #define BFAD_PROTO_NAME FCPI_NAME |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 63 | #define BFAD_IRQ_FLAGS IRQF_SHARED |
| 64 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 65 | #ifndef FC_PORTSPEED_8GBIT |
| 66 | #define FC_PORTSPEED_8GBIT 0x10 |
| 67 | #endif |
| 68 | |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 69 | /* |
| 70 | * BFAD flags |
| 71 | */ |
| 72 | #define BFAD_MSIX_ON 0x00000001 |
| 73 | #define BFAD_HAL_INIT_DONE 0x00000002 |
| 74 | #define BFAD_DRV_INIT_DONE 0x00000004 |
| 75 | #define BFAD_CFG_PPORT_DONE 0x00000008 |
| 76 | #define BFAD_HAL_START_DONE 0x00000010 |
| 77 | #define BFAD_PORT_ONLINE 0x00000020 |
| 78 | #define BFAD_RPORT_ONLINE 0x00000040 |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 79 | #define BFAD_FCS_INIT_DONE 0x00000080 |
| 80 | #define BFAD_HAL_INIT_FAIL 0x00000100 |
| 81 | #define BFAD_FC4_PROBE_DONE 0x00000200 |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 82 | #define BFAD_PORT_DELETE 0x00000001 |
| 83 | |
| 84 | /* |
| 85 | * BFAD related definition |
| 86 | */ |
| 87 | #define SCSI_SCAN_DELAY HZ |
| 88 | #define BFAD_STOP_TIMEOUT 30 |
| 89 | #define BFAD_SUSPEND_TIMEOUT BFAD_STOP_TIMEOUT |
| 90 | |
| 91 | /* |
| 92 | * BFAD configuration parameter default values |
| 93 | */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 94 | #define BFAD_LUN_QUEUE_DEPTH 32 |
| 95 | #define BFAD_IO_MAX_SGE SG_ALL |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 96 | |
| 97 | #define bfad_isr_t irq_handler_t |
| 98 | |
| 99 | #define MAX_MSIX_ENTRY 22 |
| 100 | |
| 101 | struct bfad_msix_s { |
| 102 | struct bfad_s *bfad; |
| 103 | struct msix_entry msix; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 104 | char name[32]; |
| 105 | }; |
| 106 | |
| 107 | /* |
| 108 | * Only append to the enums defined here to avoid any versioning |
| 109 | * needed between trace utility and driver version |
| 110 | */ |
| 111 | enum { |
| 112 | BFA_TRC_LDRV_BFAD = 1, |
| 113 | BFA_TRC_LDRV_IM = 2, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame^] | 114 | BFA_TRC_LDRV_BSG = 3, |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 115 | }; |
| 116 | |
| 117 | enum bfad_port_pvb_type { |
| 118 | BFAD_PORT_PHYS_BASE = 0, |
| 119 | BFAD_PORT_PHYS_VPORT = 1, |
| 120 | BFAD_PORT_VF_BASE = 2, |
| 121 | BFAD_PORT_VF_VPORT = 3, |
| 122 | }; |
| 123 | |
| 124 | /* |
| 125 | * PORT data structure |
| 126 | */ |
| 127 | struct bfad_port_s { |
| 128 | struct list_head list_entry; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 129 | struct bfad_s *bfad; |
| 130 | struct bfa_fcs_lport_s *fcs_port; |
| 131 | u32 roles; |
| 132 | s32 flags; |
| 133 | u32 supported_fc4s; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 134 | enum bfad_port_pvb_type pvb_type; |
| 135 | struct bfad_im_port_s *im_port; /* IM specific data */ |
Jing Huang | ab2a9ba | 2010-07-08 20:02:55 -0700 | [diff] [blame] | 136 | /* port debugfs specific data */ |
| 137 | struct dentry *port_debugfs_root; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 138 | }; |
| 139 | |
| 140 | /* |
| 141 | * VPORT data structure |
| 142 | */ |
| 143 | struct bfad_vport_s { |
| 144 | struct bfad_port_s drv_port; |
| 145 | struct bfa_fcs_vport_s fcs_vport; |
| 146 | struct completion *comp_del; |
Jing Huang | d988354 | 2010-07-08 19:46:26 -0700 | [diff] [blame] | 147 | struct list_head list_entry; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 148 | }; |
| 149 | |
| 150 | /* |
| 151 | * VF data structure |
| 152 | */ |
| 153 | struct bfad_vf_s { |
| 154 | bfa_fcs_vf_t fcs_vf; |
| 155 | struct bfad_port_s base_port; /* base port for vf */ |
| 156 | struct bfad_s *bfad; |
| 157 | }; |
| 158 | |
| 159 | struct bfad_cfg_param_s { |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 160 | u32 rport_del_timeout; |
| 161 | u32 ioc_queue_depth; |
| 162 | u32 lun_queue_depth; |
| 163 | u32 io_max_sge; |
| 164 | u32 binding_method; |
| 165 | }; |
| 166 | |
| 167 | union bfad_tmp_buf { |
| 168 | /* From struct bfa_adapter_attr_s */ |
| 169 | char manufacturer[BFA_ADAPTER_MFG_NAME_LEN]; |
| 170 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; |
| 171 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; |
| 172 | char fw_ver[BFA_VERSION_LEN]; |
| 173 | char optrom_ver[BFA_VERSION_LEN]; |
| 174 | |
| 175 | /* From struct bfa_ioc_pci_attr_s */ |
| 176 | u8 chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */ |
| 177 | |
| 178 | wwn_t wwn[BFA_FCS_MAX_LPORTS]; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 179 | }; |
| 180 | |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 181 | /* |
| 182 | * BFAD (PCI function) data structure |
| 183 | */ |
| 184 | struct bfad_s { |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 185 | bfa_sm_t sm; /* state machine */ |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 186 | struct list_head list_entry; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 187 | struct bfa_s bfa; |
| 188 | struct bfa_fcs_s bfa_fcs; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 189 | struct pci_dev *pcidev; |
| 190 | const char *pci_name; |
| 191 | struct bfa_pcidev_s hal_pcidev; |
| 192 | struct bfa_ioc_pci_attr_s pci_attr; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 193 | void __iomem *pci_bar0_kva; |
Krishna Gudipati | 1118920 | 2011-06-13 15:50:35 -0700 | [diff] [blame] | 194 | void __iomem *pci_bar2_kva; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 195 | struct completion comp; |
| 196 | struct completion suspend; |
| 197 | struct completion disable_comp; |
| 198 | bfa_boolean_t disable_active; |
| 199 | struct bfad_port_s pport; /* physical port of the BFAD */ |
| 200 | struct bfa_meminfo_s meminfo; |
| 201 | struct bfa_iocfc_cfg_s ioc_cfg; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 202 | u32 inst_no; /* BFAD instance number */ |
| 203 | u32 bfad_flags; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 204 | spinlock_t bfad_lock; |
Krishna Gudipati | e671432 | 2010-03-03 17:44:02 -0800 | [diff] [blame] | 205 | struct task_struct *bfad_tsk; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 206 | struct bfad_cfg_param_s cfg_data; |
| 207 | struct bfad_msix_s msix_tab[MAX_MSIX_ENTRY]; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 208 | int nvec; |
| 209 | char adapter_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 210 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 211 | struct timer_list hal_tmo; |
| 212 | unsigned long hs_start; |
| 213 | struct bfad_im_s *im; /* IM specific data */ |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 214 | struct bfa_trc_mod_s *trcmod; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 215 | struct bfa_plog_s plog_buf; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 216 | int ref_count; |
| 217 | union bfad_tmp_buf tmp_buf; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 218 | struct fc_host_statistics link_stats; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 219 | struct list_head pbc_vport_list; |
Jing Huang | ab2a9ba | 2010-07-08 20:02:55 -0700 | [diff] [blame] | 220 | /* debugfs specific data */ |
| 221 | char *regdata; |
| 222 | u32 reglen; |
| 223 | struct dentry *bfad_dentry_files[5]; |
Jing Huang | d988354 | 2010-07-08 19:46:26 -0700 | [diff] [blame] | 224 | }; |
| 225 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 226 | /* BFAD state machine events */ |
| 227 | enum bfad_sm_event { |
| 228 | BFAD_E_CREATE = 1, |
| 229 | BFAD_E_KTHREAD_CREATE_FAILED = 2, |
| 230 | BFAD_E_INIT = 3, |
| 231 | BFAD_E_INIT_SUCCESS = 4, |
| 232 | BFAD_E_INIT_FAILED = 5, |
| 233 | BFAD_E_INTR_INIT_FAILED = 6, |
| 234 | BFAD_E_FCS_EXIT_COMP = 7, |
| 235 | BFAD_E_EXIT_COMP = 8, |
| 236 | BFAD_E_STOP = 9 |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 237 | }; |
| 238 | |
| 239 | /* |
| 240 | * RPORT data structure |
| 241 | */ |
| 242 | struct bfad_rport_s { |
| 243 | struct bfa_fcs_rport_s fcs_rport; |
| 244 | }; |
| 245 | |
| 246 | struct bfad_buf_info { |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 247 | void *virt; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 248 | dma_addr_t phys; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 249 | u32 size; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | struct bfad_fcxp { |
| 253 | struct bfad_port_s *port; |
| 254 | struct bfa_rport_s *bfa_rport; |
| 255 | bfa_status_t req_status; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 256 | u16 tag; |
| 257 | u16 rsp_len; |
| 258 | u16 rsp_maxlen; |
| 259 | u8 use_ireqbuf; |
| 260 | u8 use_irspbuf; |
| 261 | u32 num_req_sgles; |
| 262 | u32 num_rsp_sgles; |
| 263 | struct fchs_s fchs; |
| 264 | void *reqbuf_info; |
| 265 | void *rspbuf_info; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 266 | struct bfa_sge_s *req_sge; |
| 267 | struct bfa_sge_s *rsp_sge; |
| 268 | fcxp_send_cb_t send_cbfn; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 269 | void *send_cbarg; |
| 270 | void *bfa_fcxp; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 271 | struct completion comp; |
| 272 | }; |
| 273 | |
| 274 | struct bfad_hal_comp { |
| 275 | bfa_status_t status; |
| 276 | struct completion comp; |
| 277 | }; |
| 278 | |
| 279 | /* |
| 280 | * Macro to obtain the immediate lower power |
| 281 | * of two for the integer. |
| 282 | */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 283 | #define nextLowerInt(x) \ |
| 284 | do { \ |
Maggie | 52f94b6 | 2010-11-29 18:21:32 -0800 | [diff] [blame] | 285 | int __i; \ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 286 | (*x)--; \ |
Maggie | 52f94b6 | 2010-11-29 18:21:32 -0800 | [diff] [blame] | 287 | for (__i = 1; __i < (sizeof(int)*8); __i <<= 1) \ |
| 288 | (*x) = (*x) | (*x) >> __i; \ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 289 | (*x)++; \ |
| 290 | (*x) = (*x) >> 1; \ |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 291 | } while (0) |
| 292 | |
| 293 | |
Maggie Zhang | f16a175 | 2010-12-09 19:12:32 -0800 | [diff] [blame] | 294 | #define BFA_LOG(level, bfad, mask, fmt, arg...) \ |
| 295 | do { \ |
| 296 | if (((mask) == 4) || (level[1] <= '4')) \ |
| 297 | dev_printk(level, &((bfad)->pcidev)->dev, fmt, ##arg); \ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 298 | } while (0) |
| 299 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 300 | bfa_status_t bfad_vport_create(struct bfad_s *bfad, u16 vf_id, |
| 301 | struct bfa_lport_cfg_s *port_cfg, |
| 302 | struct device *dev); |
| 303 | bfa_status_t bfad_vf_create(struct bfad_s *bfad, u16 vf_id, |
| 304 | struct bfa_lport_cfg_s *port_cfg); |
| 305 | bfa_status_t bfad_cfg_pport(struct bfad_s *bfad, enum bfa_lport_role role); |
| 306 | bfa_status_t bfad_drv_init(struct bfad_s *bfad); |
Krishna Gudipati | e671432 | 2010-03-03 17:44:02 -0800 | [diff] [blame] | 307 | bfa_status_t bfad_start_ops(struct bfad_s *bfad); |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 308 | void bfad_drv_start(struct bfad_s *bfad); |
| 309 | void bfad_uncfg_pport(struct bfad_s *bfad); |
| 310 | void bfad_stop(struct bfad_s *bfad); |
| 311 | void bfad_fcs_stop(struct bfad_s *bfad); |
| 312 | void bfad_remove_intr(struct bfad_s *bfad); |
| 313 | void bfad_hal_mem_release(struct bfad_s *bfad); |
| 314 | void bfad_hcb_comp(void *arg, bfa_status_t status); |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 315 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 316 | int bfad_setup_intr(struct bfad_s *bfad); |
| 317 | void bfad_remove_intr(struct bfad_s *bfad); |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 318 | void bfad_update_hal_cfg(struct bfa_iocfc_cfg_s *bfa_cfg); |
| 319 | bfa_status_t bfad_hal_mem_alloc(struct bfad_s *bfad); |
| 320 | void bfad_bfa_tmo(unsigned long data); |
| 321 | void bfad_init_timer(struct bfad_s *bfad); |
| 322 | int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); |
| 323 | void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 324 | void bfad_drv_uninit(struct bfad_s *bfad); |
Jing Huang | ab2a9ba | 2010-07-08 20:02:55 -0700 | [diff] [blame] | 325 | int bfad_worker(void *ptr); |
| 326 | void bfad_debugfs_init(struct bfad_port_s *port); |
| 327 | void bfad_debugfs_exit(struct bfad_port_s *port); |
Krishna Gudipati | e671432 | 2010-03-03 17:44:02 -0800 | [diff] [blame] | 328 | |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 329 | void bfad_pci_remove(struct pci_dev *pdev); |
| 330 | int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); |
Maggie Zhang | f16a175 | 2010-12-09 19:12:32 -0800 | [diff] [blame] | 331 | void bfad_rport_online_wait(struct bfad_s *bfad); |
| 332 | int bfad_get_linkup_delay(struct bfad_s *bfad); |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 333 | int bfad_install_msix_handler(struct bfad_s *bfad); |
| 334 | |
| 335 | extern struct idr bfad_im_port_index; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 336 | extern struct pci_device_id bfad_id_table[]; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 337 | extern struct list_head bfad_list; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 338 | extern char *os_name; |
| 339 | extern char *os_patch; |
| 340 | extern char *host_name; |
| 341 | extern int num_rports; |
| 342 | extern int num_ios; |
| 343 | extern int num_tms; |
| 344 | extern int num_fcxps; |
| 345 | extern int num_ufbufs; |
| 346 | extern int reqq_size; |
| 347 | extern int rspq_size; |
| 348 | extern int num_sgpgs; |
| 349 | extern int rport_del_timeout; |
| 350 | extern int bfa_lun_queue_depth; |
| 351 | extern int bfa_io_max_sge; |
Jing Huang | 8816624 | 2010-12-09 17:11:53 -0800 | [diff] [blame] | 352 | extern int bfa_log_level; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 353 | extern int ioc_auto_recover; |
| 354 | extern int bfa_linkup_delay; |
| 355 | extern int msix_disable_cb; |
| 356 | extern int msix_disable_ct; |
| 357 | extern int fdmi_enable; |
Krishna Gudipati | be540a9 | 2011-06-13 15:53:04 -0700 | [diff] [blame] | 358 | extern int fc_credit_recovery; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 359 | extern int supported_fc4s; |
| 360 | extern int pcie_max_read_reqsz; |
Jing Huang | ab2a9ba | 2010-07-08 20:02:55 -0700 | [diff] [blame] | 361 | extern int bfa_debugfs_enable; |
Jing Huang | 42b426e | 2010-03-19 11:07:09 -0700 | [diff] [blame] | 362 | extern struct mutex bfad_mutex; |
Jing Huang | 7725ccf | 2009-09-23 17:46:15 -0700 | [diff] [blame] | 363 | |
| 364 | #endif /* __BFAD_DRV_H__ */ |