bfa: Brocade BFA FC SCSI driver submission (2nd try)
Subsystems (2)
PATCH 2/6 bfa: Brocade BFA FC SCSI driver submission (2nd try)
From: Jing Huang <[email protected]>
This patch contains code that interfaces to Brocade Fibre channel HBA firmware/hardware. It is created using 2.6.27-rc7 kernel.
--- drivers/scsi/bfa/bfa_callback_priv.h | 55 + drivers/scsi/bfa/bfa_cb_ioim_macros.h | 215 ++++ drivers/scsi/bfa/bfa_core.c | 421 ++++++++ drivers/scsi/bfa/bfa_csdebug.c | 60 + drivers/scsi/bfa/bfa_fcpim.c | 158 +++ drivers/scsi/bfa/bfa_fcpim_priv.h | 211 ++++ drivers/scsi/bfa/bfa_fcs.c | 241 +++++ drivers/scsi/bfa/bfa_fcxp.c | 690 ++++++++++++++ drivers/scsi/bfa/bfa_fcxp_priv.h | 139 ++ drivers/scsi/bfa/bfa_fwimg_priv.h | 26 drivers/scsi/bfa/bfa_intr.c | 271 +++++ drivers/scsi/bfa/bfa_intr_priv.h | 119 ++ drivers/scsi/bfa/bfa_ioc.c | 1453 ++++++++++++++++++++++++++++++ drivers/scsi/bfa/bfa_ioc.h | 193 ++++ drivers/scsi/bfa/bfa_iocfc.c | 834 +++++++++++++++++ drivers/scsi/bfa/bfa_iocfc.h | 94 + drivers/scsi/bfa/bfa_ioim.c | 1303 +++++++++++++++++++++++++++ drivers/scsi/bfa/bfa_itnim.c | 966 ++++++++++++++++++++ drivers/scsi/bfa/bfa_log.c | 341 +++++++ drivers/scsi/bfa/bfa_log_module.c | 384 ++++++++ drivers/scsi/bfa/bfa_module.c | 62 + drivers/scsi/bfa/bfa_modules_priv.h | 36 drivers/scsi/bfa/bfa_os_inc.h | 193 ++++ drivers/scsi/bfa/bfa_port.c | 1602 ++++++++++++++++++++++++++++++++++ drivers/scsi/bfa/bfa_port_priv.h | 87 + drivers/scsi/bfa/bfa_priv.h | 109 ++ drivers/scsi/bfa/bfa_rport.c | 782 ++++++++++++++++ drivers/scsi/bfa/bfa_rport_priv.h | 45 drivers/scsi/bfa/bfa_sgpg.c | 235 ++++ drivers/scsi/bfa/bfa_sgpg_priv.h | 73 + drivers/scsi/bfa/bfa_sm.c | 41 drivers/scsi/bfa/bfa_timer.c | 90 + drivers/scsi/bfa/bfa_trcmod_priv.h | 54 + drivers/scsi/bfa/bfa_tskim.c | 717 +++++++++++++++ drivers/scsi/bfa/bfa_uf.c | 349 +++++++ drivers/scsi/bfa/bfa_uf_priv.h | 47 drivers/scsi/bfa/plog.c | 183 +++ 37 files changed, 12879 insertions(+)
drivers/scsi/bfa/bfa_callback_priv.h +55 -0
@@ -0,0 +1,55 @@ +/* +* Copyright (c) 2005-2008 Brocade Communications Systems, Inc. +* All rights reserved +* www.brocade.com +* +* Linux driver for Brocade Fibre Channel Host Bus Adapter. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License (GPL) Version 2 as +* published by the Free Software Foundation +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +*/ + +#ifndef __HAL_CALLBACK_H__ +#define __HAL_CALLBACK_H__ + +#include <cs/bfa_q.h> + +typedef void (*bfa_cb_cbfn_t ) (void *cbarg,bfa_boolean_t complete); + +/** +* Generic HAL callback element. +*/ +struct bfa_cb_qe_s { +struct bfa_q_s qe; +bfa_cb_cbfn_t cbfn; +bfa_boolean_t once; +u32 rsvd; +void *cbarg; +}; + +#define bfa_cb_queue (__bfa, __hcb_qe, __cbfn, __cbarg) do { \ + (__hcb_qe)->cbfn = (__cbfn); \ + (__hcb_qe)->cbarg = (__cbarg); \ + bfa_q_enq(&(__bfa)->comp_q, (__hcb_qe)); \ +} while (0) + +#define bfa_cb_queue_once (__bfa, __hcb_qe, __cbfn, __cbarg) do { \ + (__hcb_qe)->cbfn = (__cbfn); \ + (__hcb_qe)->cbarg = (__cbarg); \ + if (!(__hcb_qe)->once) { \ + bfa_q_enq(&(__bfa)->comp_q, (__hcb_qe)); \ + (__hcb_qe)->once = BFA_TRUE; \ + } \ +} while (0) + +#define bfa_cb_queue_done (__hcb_qe) do { \ + (__hcb_qe)->once = BFA_FALSE; \ +} while (0) + +#endif /* __HAL_CALLBACK_H__ */
drivers/scsi/bfa/bfa_cb_ioim_macros.h +215 -0
215 lines not on this page · raw message
drivers/scsi/bfa/bfa_core.c +421 -0
421 lines not on this page · raw message
drivers/scsi/bfa/bfa_csdebug.c +60 -0
60 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcpim.c +158 -0
158 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcpim_priv.h +211 -0
211 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcs.c +241 -0
241 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcxp.c +690 -0
690 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcxp_priv.h +139 -0
139 lines not on this page · raw message
drivers/scsi/bfa/bfa_fwimg_priv.h +26 -0
@@ -0,0 +1,26 @@ +/* +* Copyright (c) 2005-2008 Brocade Communications Systems, Inc. +* All rights reserved +* www.brocade.com +* +* Linux driver for Brocade Fibre Channel Host Bus Adapter. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License (GPL) Version 2 as +* published by the Free Software Foundation +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +*/ + +#ifndef __HAL_FWIMG_H__ +#define __HAL_FWIMG_H__ + +extern u32 *bfi_image; +extern u32 bfi_image_size; +extern u32 *bfad_fwimg_buf; +extern char __bfa_ident[]; + +#endif /* __HAL_FWIMG_H__ */
drivers/scsi/bfa/bfa_intr.c +271 -0
271 lines not on this page · raw message
drivers/scsi/bfa/bfa_intr_priv.h +119 -0
119 lines not on this page · raw message
drivers/scsi/bfa/bfa_ioc.c +1453 -0
394 lines not on this page · raw message
drivers/scsi/bfa/bfa_iocfc.c +834 -0
834 lines not on this page · raw message
drivers/scsi/bfa/bfa_iocfc.h +94 -0
94 lines not on this page · raw message
drivers/scsi/bfa/bfa_ioc.h +193 -0
193 lines not on this page · raw message
drivers/scsi/bfa/bfa_ioim.c +1303 -0
1,303 lines not on this page · raw message
drivers/scsi/bfa/bfa_itnim.c +966 -0
966 lines not on this page · raw message
drivers/scsi/bfa/bfa_log.c +341 -0
341 lines not on this page · raw message
drivers/scsi/bfa/bfa_log_module.c +384 -0
384 lines not on this page · raw message
drivers/scsi/bfa/bfa_module.c +62 -0
62 lines not on this page · raw message
drivers/scsi/bfa/bfa_os_inc.h +193 -0
193 lines not on this page · raw message
drivers/scsi/bfa/bfa_port.c +1602 -0
1,602 lines not on this page · raw message
drivers/scsi/bfa/bfa_port_priv.h +87 -0
87 lines not on this page · raw message
drivers/scsi/bfa/bfa_priv.h +109 -0
109 lines not on this page · raw message
drivers/scsi/bfa/bfa_rport.c +782 -0
782 lines not on this page · raw message
drivers/scsi/bfa/bfa_rport_priv.h +45 -0
45 lines not on this page · raw message
drivers/scsi/bfa/bfa_sgpg.c +235 -0
235 lines not on this page · raw message
drivers/scsi/bfa/bfa_sgpg_priv.h +73 -0
73 lines not on this page · raw message
drivers/scsi/bfa/bfa_sm.c +41 -0
41 lines not on this page · raw message
drivers/scsi/bfa/bfa_timer.c +90 -0
90 lines not on this page · raw message
drivers/scsi/bfa/bfa_trcmod_priv.h +54 -0
54 lines not on this page · raw message
drivers/scsi/bfa/bfa_tskim.c +717 -0
717 lines not on this page · raw message
drivers/scsi/bfa/bfa_uf.c +349 -0
349 lines not on this page · raw message
drivers/scsi/bfa/bfa_uf_priv.h +47 -0
47 lines not on this page · raw message
drivers/scsi/bfa/plog.c +183 -0
183 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.