Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
bfad_drv.h File Reference
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/idr.h>
#include <linux/interrupt.h>
#include <linux/cdev.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>
#include <linux/bitops.h>
#include <linux/aer.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_bsg_fc.h>
#include <scsi/scsi_devinfo.h>
#include "bfa_modules.h"
#include "bfa_fcs.h"
#include "bfa_defs_fcs.h"
#include "bfa_plog.h"
#include "bfa_cs.h"

Go to the source code of this file.

Data Structures

struct  bfad_msix_s
 
struct  bfad_port_s
 
struct  bfad_vport_s
 
struct  bfad_vf_s
 
struct  bfad_cfg_param_s
 
union  bfad_tmp_buf
 
struct  bfad_s
 
struct  bfad_rport_s
 
struct  bfad_buf_info
 
struct  bfad_fcxp
 
struct  bfad_hal_comp
 

Macros

#define BFAD_DRIVER_NAME   "bfa"
 
#define BFAD_DRIVER_VERSION   "3.1.2.1"
 
#define BFAD_PROTO_NAME   FCPI_NAME
 
#define BFAD_IRQ_FLAGS   IRQF_SHARED
 
#define BFAD_MSIX_ON   0x00000001
 
#define BFAD_HAL_INIT_DONE   0x00000002
 
#define BFAD_DRV_INIT_DONE   0x00000004
 
#define BFAD_CFG_PPORT_DONE   0x00000008
 
#define BFAD_HAL_START_DONE   0x00000010
 
#define BFAD_PORT_ONLINE   0x00000020
 
#define BFAD_RPORT_ONLINE   0x00000040
 
#define BFAD_FCS_INIT_DONE   0x00000080
 
#define BFAD_HAL_INIT_FAIL   0x00000100
 
#define BFAD_FC4_PROBE_DONE   0x00000200
 
#define BFAD_PORT_DELETE   0x00000001
 
#define BFAD_INTX_ON   0x00000400
 
#define BFAD_EEH_BUSY   0x00000800
 
#define BFAD_EEH_PCI_CHANNEL_IO_PERM_FAILURE   0x00001000
 
#define SCSI_SCAN_DELAY   HZ
 
#define BFAD_STOP_TIMEOUT   30
 
#define BFAD_SUSPEND_TIMEOUT   BFAD_STOP_TIMEOUT
 
#define BFAD_LUN_QUEUE_DEPTH   32
 
#define BFAD_IO_MAX_SGE   SG_ALL
 
#define BFAD_MIN_SECTORS   128 /* 64k */
 
#define BFAD_MAX_SECTORS   0xFFFF /* 32 MB */
 
#define bfad_isr_t   irq_handler_t
 
#define MAX_MSIX_ENTRY   22
 
#define BFA_LOG(level, bfad, mask, fmt, arg...)
 

Enumerations

enum  { BFA_TRC_LDRV_BFAD = 1, BFA_TRC_LDRV_IM = 2, BFA_TRC_LDRV_BSG = 3 }
 
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 }
 
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_INIT_FAILED = 5, BFAD_E_INTR_INIT_FAILED = 6, BFAD_E_FCS_EXIT_COMP = 7, BFAD_E_EXIT_COMP = 8,
  BFAD_E_STOP = 9
}
 

Functions

bfa_status_t bfad_vport_create (struct bfad_s *bfad, u16 vf_id, struct bfa_lport_cfg_s *port_cfg, struct device *dev)
 
bfa_status_t bfad_vf_create (struct bfad_s *bfad, u16 vf_id, struct bfa_lport_cfg_s *port_cfg)
 
bfa_status_t bfad_cfg_pport (struct bfad_s *bfad, enum bfa_lport_role role)
 
bfa_status_t bfad_drv_init (struct bfad_s *bfad)
 
bfa_status_t bfad_start_ops (struct bfad_s *bfad)
 
void bfad_drv_start (struct bfad_s *bfad)
 
void bfad_uncfg_pport (struct bfad_s *bfad)
 
void bfad_stop (struct bfad_s *bfad)
 
void bfad_fcs_stop (struct bfad_s *bfad)
 
void bfad_remove_intr (struct bfad_s *bfad)
 
void bfad_hal_mem_release (struct bfad_s *bfad)
 
void bfad_hcb_comp (void *arg, bfa_status_t status)
 
int bfad_setup_intr (struct bfad_s *bfad)
 
void bfad_update_hal_cfg (struct bfa_iocfc_cfg_s *bfa_cfg)
 
bfa_status_t bfad_hal_mem_alloc (struct bfad_s *bfad)
 
void bfad_bfa_tmo (unsigned long data)
 
void bfad_init_timer (struct bfad_s *bfad)
 
int bfad_pci_init (struct pci_dev *pdev, struct bfad_s *bfad)
 
void bfad_pci_uninit (struct pci_dev *pdev, struct bfad_s *bfad)
 
void bfad_drv_uninit (struct bfad_s *bfad)
 
int bfad_worker (void *ptr)
 
void bfad_debugfs_init (struct bfad_port_s *port)
 
void bfad_debugfs_exit (struct bfad_port_s *port)
 
void bfad_pci_remove (struct pci_dev *pdev)
 
int bfad_pci_probe (struct pci_dev *pdev, const struct pci_device_id *pid)
 
void bfad_rport_online_wait (struct bfad_s *bfad)
 
int bfad_get_linkup_delay (struct bfad_s *bfad)
 
int bfad_install_msix_handler (struct bfad_s *bfad)
 

Variables

struct idr bfad_im_port_index
 
struct pci_device_id bfad_id_table []
 
struct list_head bfad_list
 
charos_name
 
charos_patch
 
charhost_name
 
int num_rports
 
int num_ios
 
int num_tms
 
int num_fcxps
 
int num_ufbufs
 
int reqq_size
 
int rspq_size
 
int num_sgpgs
 
int rport_del_timeout
 
int bfa_lun_queue_depth
 
int bfa_io_max_sge
 
int bfa_log_level
 
int ioc_auto_recover
 
int bfa_linkup_delay
 
int msix_disable_cb
 
int msix_disable_ct
 
int fdmi_enable
 
int supported_fc4s
 
int pcie_max_read_reqsz
 
int max_xfer_size
 
int bfa_debugfs_enable
 
struct mutex bfad_mutex
 

Macro Definition Documentation

#define BFA_LOG (   level,
  bfad,
  mask,
  fmt,
  arg... 
)
Value:
do { \
if (((mask) == 4) || (level[1] <= '4')) \
dev_printk(level, &((bfad)->pcidev)->dev, fmt, ##arg); \
} while (0)

Definition at line 290 of file bfad_drv.h.

#define BFAD_CFG_PPORT_DONE   0x00000008

Definition at line 76 of file bfad_drv.h.

#define BFAD_DRIVER_NAME   "bfa"

Definition at line 56 of file bfad_drv.h.

#define BFAD_DRIVER_VERSION   "3.1.2.1"

Definition at line 60 of file bfad_drv.h.

#define BFAD_DRV_INIT_DONE   0x00000004

Definition at line 75 of file bfad_drv.h.

#define BFAD_EEH_BUSY   0x00000800

Definition at line 85 of file bfad_drv.h.

#define BFAD_EEH_PCI_CHANNEL_IO_PERM_FAILURE   0x00001000

Definition at line 86 of file bfad_drv.h.

#define BFAD_FC4_PROBE_DONE   0x00000200

Definition at line 82 of file bfad_drv.h.

#define BFAD_FCS_INIT_DONE   0x00000080

Definition at line 80 of file bfad_drv.h.

#define BFAD_HAL_INIT_DONE   0x00000002

Definition at line 74 of file bfad_drv.h.

#define BFAD_HAL_INIT_FAIL   0x00000100

Definition at line 81 of file bfad_drv.h.

#define BFAD_HAL_START_DONE   0x00000010

Definition at line 77 of file bfad_drv.h.

#define BFAD_INTX_ON   0x00000400

Definition at line 84 of file bfad_drv.h.

#define BFAD_IO_MAX_SGE   SG_ALL

Definition at line 98 of file bfad_drv.h.

#define BFAD_IRQ_FLAGS   IRQF_SHARED

Definition at line 64 of file bfad_drv.h.

#define bfad_isr_t   irq_handler_t

Definition at line 102 of file bfad_drv.h.

#define BFAD_LUN_QUEUE_DEPTH   32

Definition at line 97 of file bfad_drv.h.

#define BFAD_MAX_SECTORS   0xFFFF /* 32 MB */

Definition at line 100 of file bfad_drv.h.

#define BFAD_MIN_SECTORS   128 /* 64k */

Definition at line 99 of file bfad_drv.h.

#define BFAD_MSIX_ON   0x00000001

Definition at line 73 of file bfad_drv.h.

#define BFAD_PORT_DELETE   0x00000001

Definition at line 83 of file bfad_drv.h.

#define BFAD_PORT_ONLINE   0x00000020

Definition at line 78 of file bfad_drv.h.

#define BFAD_PROTO_NAME   FCPI_NAME

Definition at line 63 of file bfad_drv.h.

#define BFAD_RPORT_ONLINE   0x00000040

Definition at line 79 of file bfad_drv.h.

#define BFAD_STOP_TIMEOUT   30

Definition at line 91 of file bfad_drv.h.

#define BFAD_SUSPEND_TIMEOUT   BFAD_STOP_TIMEOUT

Definition at line 92 of file bfad_drv.h.

#define MAX_MSIX_ENTRY   22

Definition at line 104 of file bfad_drv.h.

#define SCSI_SCAN_DELAY   HZ

Definition at line 90 of file bfad_drv.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
BFA_TRC_LDRV_BFAD 
BFA_TRC_LDRV_IM 
BFA_TRC_LDRV_BSG 

Definition at line 116 of file bfad_drv.h.

Enumerator:
BFAD_PORT_PHYS_BASE 
BFAD_PORT_PHYS_VPORT 
BFAD_PORT_VF_BASE 
BFAD_PORT_VF_VPORT 

Definition at line 122 of file bfad_drv.h.

Enumerator:
BFAD_E_CREATE 
BFAD_E_KTHREAD_CREATE_FAILED 
BFAD_E_INIT 
BFAD_E_INIT_SUCCESS 
BFAD_E_INIT_FAILED 
BFAD_E_INTR_INIT_FAILED 
BFAD_E_FCS_EXIT_COMP 
BFAD_E_EXIT_COMP 
BFAD_E_STOP 

Definition at line 238 of file bfad_drv.h.

Function Documentation

void bfad_bfa_tmo ( unsigned long  data)

Definition at line 682 of file bfad.c.

bfa_status_t bfad_cfg_pport ( struct bfad_s bfad,
enum bfa_lport_role  role 
)

Definition at line 968 of file bfad.c.

void bfad_debugfs_exit ( struct bfad_port_s port)
inline

Definition at line 548 of file bfad_debugfs.c.

void bfad_debugfs_init ( struct bfad_port_s port)
inline

Definition at line 491 of file bfad_debugfs.c.

bfa_status_t bfad_drv_init ( struct bfad_s bfad)

Definition at line 840 of file bfad.c.

void bfad_drv_start ( struct bfad_s bfad)

Definition at line 922 of file bfad.c.

void bfad_drv_uninit ( struct bfad_s bfad)

Definition at line 902 of file bfad.c.

void bfad_fcs_stop ( struct bfad_s bfad)

Definition at line 938 of file bfad.c.

int bfad_get_linkup_delay ( struct bfad_s bfad)

Definition at line 1305 of file bfad_im.c.

bfa_status_t bfad_hal_mem_alloc ( struct bfad_s bfad)

Definition at line 580 of file bfad.c.

void bfad_hal_mem_release ( struct bfad_s bfad)

Definition at line 518 of file bfad.c.

void bfad_hcb_comp ( void arg,
bfa_status_t  status 
)

Definition at line 390 of file bfad.c.

void bfad_init_timer ( struct bfad_s bfad)

Definition at line 707 of file bfad.c.

int bfad_install_msix_handler ( struct bfad_s bfad)

Definition at line 1216 of file bfad.c.

int bfad_pci_init ( struct pci_dev pdev,
struct bfad_s bfad 
)

Definition at line 718 of file bfad.c.

int bfad_pci_probe ( struct pci_dev pdev,
const struct pci_device_id pid 
)

Definition at line 1353 of file bfad.c.

void bfad_pci_remove ( struct pci_dev pdev)

Definition at line 1455 of file bfad.c.

void bfad_pci_uninit ( struct pci_dev pdev,
struct bfad_s bfad 
)

Definition at line 828 of file bfad.c.

void bfad_remove_intr ( struct bfad_s bfad)

Definition at line 1333 of file bfad.c.

void bfad_rport_online_wait ( struct bfad_s bfad)
int bfad_setup_intr ( struct bfad_s bfad)

Definition at line 1252 of file bfad.c.

bfa_status_t bfad_start_ops ( struct bfad_s bfad)

Definition at line 1009 of file bfad.c.

void bfad_stop ( struct bfad_s bfad)

Definition at line 953 of file bfad.c.

void bfad_uncfg_pport ( struct bfad_s bfad)

Definition at line 995 of file bfad.c.

void bfad_update_hal_cfg ( struct bfa_iocfc_cfg_s bfa_cfg)

Definition at line 546 of file bfad.c.

bfa_status_t bfad_vf_create ( struct bfad_s bfad,
u16  vf_id,
struct bfa_lport_cfg_s port_cfg 
)
bfa_status_t bfad_vport_create ( struct bfad_s bfad,
u16  vf_id,
struct bfa_lport_cfg_s port_cfg,
struct device dev 
)

Definition at line 631 of file bfad.c.

int bfad_worker ( void ptr)

Definition at line 1112 of file bfad.c.

Variable Documentation

int bfa_debugfs_enable

Definition at line 57 of file bfad.c.

int bfa_io_max_sge

Definition at line 51 of file bfad.c.

int bfa_linkup_delay

Definition at line 54 of file bfad.c.

int bfa_log_level

Definition at line 52 of file bfad.c.

int bfa_lun_queue_depth

Definition at line 50 of file bfad.c.

struct pci_device_id bfad_id_table[]

Definition at line 1685 of file bfad.c.

struct idr bfad_im_port_index
struct list_head bfad_list
struct mutex bfad_mutex
int fdmi_enable

Definition at line 55 of file bfad.c.

char* host_name

Definition at line 45 of file bfad.c.

int ioc_auto_recover

Definition at line 53 of file bfad.c.

int max_xfer_size

Definition at line 59 of file bfad.c.

int msix_disable_cb

Definition at line 58 of file bfad.c.

int msix_disable_ct

Definition at line 58 of file bfad.c.

int num_fcxps

Definition at line 47 of file bfad.c.

int num_ios

Definition at line 46 of file bfad.c.

int num_rports

Definition at line 46 of file bfad.c.

int num_sgpgs

Definition at line 48 of file bfad.c.

int num_tms

Definition at line 46 of file bfad.c.

int num_ufbufs

Definition at line 47 of file bfad.c.

char* os_name

Definition at line 149 of file hypfs_diag.c.

char* os_patch

Definition at line 45 of file bfad.c.

int pcie_max_read_reqsz

Definition at line 56 of file bfad.c.

int reqq_size

Definition at line 48 of file bfad.c.

int rport_del_timeout

Definition at line 49 of file bfad.c.

int rspq_size

Definition at line 48 of file bfad.c.

int supported_fc4s

Definition at line 44 of file bfad.c.