aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfad_drv.h
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2010-03-03 20:44:02 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-04 05:47:02 -0500
commite67143243a1a6b47e1bdcda189ffac46d2a8744d (patch)
tree03a14641d29ec2d93eedcc921af7200c62f2e723 /drivers/scsi/bfa/bfad_drv.h
parenta046bf0559018ba3d16c412fc4e1aa2be5f11f36 (diff)
[SCSI] bfa: Resume BFA operations after firmware mismatch is resolved.
bfad.c & bfad_drv.h: * Created a kernel thread from pci_probe that does the bfad start operations after BFA init done on a firmware mismatch. * The kernel thread on a fw mismatch waits for an event from IOC call back and is woken up from bfa_cb_init() on BFA init success. * In normal cases of no firmware mismatch this thread is terminated in pci_probe. bfa_fcs_lport.c, fabric.c, fcs_lport.h & vport.c: * Split the lport init to attach time and init time code, so that proper config attributes are set after firmware mismatch. bfa_iocfc.c: * Handle an IOC timer issue, where the IOC timer would expire before the init completion and send Init fail event to the driver, however IOC init continues and completes successfully at the later stage. The bfa and driver were not handling this kind of deferred init completion. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfad_drv.h')
-rw-r--r--drivers/scsi/bfa/bfad_drv.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
index 172c81e25c1..9fa801a5025 100644
--- a/drivers/scsi/bfa/bfad_drv.h
+++ b/drivers/scsi/bfa/bfad_drv.h
@@ -62,7 +62,9 @@
62#define BFAD_HAL_START_DONE 0x00000010 62#define BFAD_HAL_START_DONE 0x00000010
63#define BFAD_PORT_ONLINE 0x00000020 63#define BFAD_PORT_ONLINE 0x00000020
64#define BFAD_RPORT_ONLINE 0x00000040 64#define BFAD_RPORT_ONLINE 0x00000040
65 65#define BFAD_FCS_INIT_DONE 0x00000080
66#define BFAD_HAL_INIT_FAIL 0x00000100
67#define BFAD_FC4_PROBE_DONE 0x00000200
66#define BFAD_PORT_DELETE 0x00000001 68#define BFAD_PORT_DELETE 0x00000001
67 69
68/* 70/*
@@ -168,6 +170,7 @@ struct bfad_s {
168 u32 inst_no; /* BFAD instance number */ 170 u32 inst_no; /* BFAD instance number */
169 u32 bfad_flags; 171 u32 bfad_flags;
170 spinlock_t bfad_lock; 172 spinlock_t bfad_lock;
173 struct task_struct *bfad_tsk;
171 struct bfad_cfg_param_s cfg_data; 174 struct bfad_cfg_param_s cfg_data;
172 struct bfad_msix_s msix_tab[MAX_MSIX_ENTRY]; 175 struct bfad_msix_s msix_tab[MAX_MSIX_ENTRY];
173 int nvec; 176 int nvec;
@@ -258,6 +261,7 @@ bfa_status_t bfad_vf_create(struct bfad_s *bfad, u16 vf_id,
258 struct bfa_port_cfg_s *port_cfg); 261 struct bfa_port_cfg_s *port_cfg);
259bfa_status_t bfad_cfg_pport(struct bfad_s *bfad, enum bfa_port_role role); 262bfa_status_t bfad_cfg_pport(struct bfad_s *bfad, enum bfa_port_role role);
260bfa_status_t bfad_drv_init(struct bfad_s *bfad); 263bfa_status_t bfad_drv_init(struct bfad_s *bfad);
264bfa_status_t bfad_start_ops(struct bfad_s *bfad);
261void bfad_drv_start(struct bfad_s *bfad); 265void bfad_drv_start(struct bfad_s *bfad);
262void bfad_uncfg_pport(struct bfad_s *bfad); 266void bfad_uncfg_pport(struct bfad_s *bfad);
263void bfad_drv_stop(struct bfad_s *bfad); 267void bfad_drv_stop(struct bfad_s *bfad);
@@ -280,6 +284,12 @@ void bfad_drv_log_level_set(struct bfad_s *bfad);
280bfa_status_t bfad_fc4_module_init(void); 284bfa_status_t bfad_fc4_module_init(void);
281void bfad_fc4_module_exit(void); 285void bfad_fc4_module_exit(void);
282 286
287bfa_status_t bfad_os_kthread_create(struct bfad_s *bfad);
288void bfad_os_kthread_stop(struct bfad_s *bfad);
289void bfad_os_kthread_wakeup(struct bfad_s *bfad);
290int bfad_os_kthread_should_stop(void);
291int bfad_worker (void *ptr);
292
283void bfad_pci_remove(struct pci_dev *pdev); 293void bfad_pci_remove(struct pci_dev *pdev);
284int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); 294int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid);
285void bfad_os_rport_online_wait(struct bfad_s *bfad); 295void bfad_os_rport_online_wait(struct bfad_s *bfad);