- patches.suse/slab-handle-memoryless-nodes-v2a.patch: Refresh.
[linux-flexiantxendom0-3.2.10.git] / drivers / scsi / bfa / bfad_drv.h
index 15703b8..172c81e 100644 (file)
 #ifdef BFA_DRIVER_VERSION
 #define BFAD_DRIVER_VERSION    BFA_DRIVER_VERSION
 #else
-#define BFAD_DRIVER_VERSION    "2.1.2.1"
+#define BFAD_DRIVER_VERSION    "2.0.0.0"
 #endif
 
+
 #define BFAD_IRQ_FLAGS IRQF_SHARED
 
 /*
@@ -61,9 +62,6 @@
 #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
 
@@ -139,16 +137,12 @@ struct bfad_cfg_param_s {
        u32        binding_method;
 };
 
-union bfad_tmp_buf {
-       /* From struct bfa_adapter_attr_s */
-       char            manufacturer[BFA_ADAPTER_MFG_NAME_LEN];
-       char            serial_num[BFA_ADAPTER_SERIAL_NUM_LEN];
-       char            model[BFA_ADAPTER_MODEL_NAME_LEN];
-       char            fw_ver[BFA_VERSION_LEN];
-       char            optrom_ver[BFA_VERSION_LEN];
-
-       /* From struct bfa_ioc_pci_attr_s */
-       u8         chip_rev[BFA_IOC_CHIP_REV_LEN];  /*  chip revision */
+#define BFAD_AEN_MAX_APPS 8
+struct bfad_aen_file_s {
+       struct list_head  qe;
+       struct bfad_s *bfad;
+       s32 ri;
+       s32 app_id;
 };
 
 /*
@@ -174,7 +168,6 @@ struct bfad_s {
        u32        inst_no;     /* BFAD instance number */
        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[MAX_MSIX_ENTRY];
        int             nvec;
@@ -190,12 +183,18 @@ struct bfad_s {
        struct bfa_log_mod_s  *logmod;
        struct bfa_aen_s      *aen;
        struct bfa_aen_s       aen_buf;
-       void            *file_map[BFA_AEN_MAX_APP];
+       struct bfad_aen_file_s file_buf[BFAD_AEN_MAX_APPS];
+       struct list_head         file_q;
+       struct list_head         file_free_q;
        struct bfa_plog_s      plog_buf;
        int             ref_count;
        bfa_boolean_t   ipfc_enabled;
-       union bfad_tmp_buf tmp_buf;
        struct fc_host_statistics link_stats;
+
+       struct kobject *bfa_kobj;
+       struct kobject *ioc_kobj;
+       struct kobject *pport_kobj;
+       struct kobject *lport_kobj;
 };
 
 /*
@@ -246,7 +245,7 @@ struct bfad_hal_comp {
 do {                                                   \
        int j;                                          \
        (*x)--;                                         \
-       for (j = 1; j < (sizeof(int) * 8); j <<= 1)     \
+       for (j = 1; j < (sizeof(int) * 8); j <<= 1)     \
                (*x) = (*x) | (*x) >> j;                \
        (*x)++;                                         \
        (*x) = (*x) >> 1;                               \
@@ -259,7 +258,6 @@ bfa_status_t    bfad_vf_create(struct bfad_s *bfad, u16 vf_id,
                               struct bfa_port_cfg_s *port_cfg);
 bfa_status_t    bfad_cfg_pport(struct bfad_s *bfad, enum bfa_port_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_drv_stop(struct bfad_s *bfad);
@@ -282,7 +280,6 @@ void                bfad_drv_log_level_set(struct bfad_s *bfad);
 bfa_status_t   bfad_fc4_module_init(void);
 void           bfad_fc4_module_exit(void);
 
-int bfad_worker(void *ptr);
 void bfad_pci_remove(struct pci_dev *pdev);
 int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid);
 void bfad_os_rport_online_wait(struct bfad_s *bfad);