bfa driver update to v3.2.23.0
Subsystems (2)
cover bfa driver update to v3.2.23.0
From: Vijaya Mohan Guvva <[email protected]>
Hi James,
The following patch-set includes, firmware patch simplification feature, bug fixes, changes to use new firmware images v3.2.3.0 and changes to update the driver version to 3.2.23.0.
I have compiled and tested the patches against 3.12 kernel. Please review and provide your comments.
Thanks,
Vijaya Mohan Guvva
Vijaya Mohan Guvva (8):
bfa: Firmware patch simplification
bfa: Register port with SCSI even on port init failure
bfa: LUN discovery issue in direct attach mode
bfa: Fix for bcu or hcm faa query hang
bfa: Observed auto D-port mode instead of manual
bfa: change FC_ELS_TOV to 20sec
bfa: Fix crash when symb name set for offline vport
bfa: Driver version upgrade to 3.2.23.0
drivers/scsi/bfa/bfa_core.c | 8 +- drivers/scsi/bfa/bfa_defs.h | 1 + drivers/scsi/bfa/bfa_fc.h | 2 +- drivers/scsi/bfa/bfa_fcs.h | 1 + drivers/scsi/bfa/bfa_fcs_lport.c | 29 +- drivers/scsi/bfa/bfa_ioc.c | 727 ++++++++++++++++++++++++++++++++++++--- drivers/scsi/bfa/bfa_ioc.h | 7 +- drivers/scsi/bfa/bfa_ioc_cb.c | 23 ++ drivers/scsi/bfa/bfa_svc.c | 2 +- drivers/scsi/bfa/bfad.c | 91 +++-- drivers/scsi/bfa/bfad_attr.c | 7 +- drivers/scsi/bfa/bfad_bsg.c | 15 + drivers/scsi/bfa/bfad_bsg.h | 1 + drivers/scsi/bfa/bfad_drv.h | 6 +- drivers/scsi/bfa/bfi.h | 42 ++- 15 files changed, 850 insertions(+), 112 deletions(-)
Signature · 1 line
1.8.2.1
PATCH 1/8 bfa: Firmware patch simplification
From: Vijaya Mohan Guvva <[email protected]>
This patch includes change to enable firmware patch simplication feature. This feature is targeted to address the requirement to have independent patch release for firmware. Prior to 3.2.3, releasing a patch fix for firmware requires changes to bfa, to use new firmware images. But with these changes, if the new firmware is flashed on to the HBA with brocade adapter management utilites, driver uses the new firmware after checking the patch release byte in the firmware version.
--- drivers/scsi/bfa/bfa_defs.h | 1 + drivers/scsi/bfa/bfa_ioc.c | 727 +++++++++++++++++++++++++++++++++++++++--- drivers/scsi/bfa/bfa_ioc.h | 7 +- drivers/scsi/bfa/bfa_ioc_cb.c | 23 ++ drivers/scsi/bfa/bfad_bsg.c | 15 + drivers/scsi/bfa/bfad_bsg.h | 1 + drivers/scsi/bfa/bfi.h | 39 ++- 7 files changed, 767 insertions(+), 46 deletions(-)
drivers/scsi/bfa/bfa_defs.h +1 -0
@@ -132,6 +132,7 @@ enum bfa_status {BFA_STATUS_ETIMER =5 ,/* Timer expired - Retry, if persists, * contact support */ BFA_STATUS_EPROTOCOL =6 ,/* Protocol error */ +BFA_STATUS_BADFLASH =9 ,/* Flash is bad */ BFA_STATUS_SFP_UNSUPP =10 ,/* Unsupported SFP - Replace SFP */ BFA_STATUS_UNKNOWN_VFID =11 ,/* VF_ID not found */ BFA_STATUS_DATACORRUPTED = 12, /* Diag returned data corrupted */
drivers/scsi/bfa/bfa_ioc.c +683 -44
855 lines not on this page · raw message
drivers/scsi/bfa/bfa_ioc.h +6 -1
@@ -515,6 +515,8 @@ void bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod, bfa_boolean_t mincfg);void bfa_flash_memclaim (struct bfa_flash_s *flash,u8 *dm_kva,u64 dm_pa,bfa_boolean_t mincfg); +bfa_status_t bfa_flash_raw_read (void __iomem *pci_bar_kva, +u32 offset,char *buf,u32 len);/* * DIAG module specific
@@ -888,7 +890,7 @@ void bfa_ioc_enable(struct bfa_ioc_s *ioc);void bfa_ioc_disable (struct bfa_ioc_s *ioc);bfa_boolean_t bfa_ioc_intx_claim (struct bfa_ioc_s *ioc); -void bfa_ioc_boot (struct bfa_ioc_s *ioc,u32 boot_type, +bfa_status_t bfa_ioc_boot (struct bfa_ioc_s *ioc,u32 boot_type,u32 boot_env);void bfa_ioc_isr (struct bfa_ioc_s *ioc,struct bfi_mbmsg_s *msg);void bfa_ioc_error_isr (struct bfa_ioc_s *ioc);
@@ -919,6 +921,7 @@ bfa_status_t bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata, int *trclen);bfa_status_t bfa_ioc_debug_fwcore (struct bfa_ioc_s *ioc,void *buf,u32 *offset,int *buflen); +bfa_status_t bfa_ioc_fwsig_invalidate (struct bfa_ioc_s *ioc);bfa_boolean_t bfa_ioc_sem_get (void __iomem *sem_reg);void bfa_ioc_fwver_get (struct bfa_ioc_s *ioc,struct bfi_ioc_image_hdr_s *fwhdr);
@@ -956,6 +959,8 @@ bfa_status_t bfa_ablk_optrom_en(struct bfa_ablk_s *ablk,bfa_status_t bfa_ablk_optrom_dis (struct bfa_ablk_s *ablk,bfa_ablk_cbfn_t cbfn,void *cbarg); +bfa_status_t bfa_ioc_flash_img_get_chnk (struct bfa_ioc_s *ioc,u32 off, +u32 *fwimg);/* * bfa mfg wwn API functions */
drivers/scsi/bfa/bfa_ioc_cb.c +23 -0
@@ -81,6 +81,29 @@ bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc)static bfa_boolean_t bfa_ioc_cb_firmware_lock (struct bfa_ioc_s *ioc) { +enum bfi_ioc_state alt_fwstate, cur_fwstate; +struct bfi_ioc_image_hdr_s fwhdr; + + cur_fwstate =bfa_ioc_cb_get_cur_ioc_fwstate (ioc); +bfa_trc (ioc, cur_fwstate); + alt_fwstate =bfa_ioc_cb_get_alt_ioc_fwstate (ioc); +bfa_trc (ioc, alt_fwstate); + +/* +* Uninit implies this is the only driver as of now. +*/ +if (cur_fwstate ==BFI_IOC_UNINIT ) +return BFA_TRUE ; +/* +* Check if another driver with a different firmware is active +*/ +bfa_ioc_fwver_get (ioc, &fwhdr); +if (!bfa_ioc_fwver_cmp (ioc, &fwhdr) && + alt_fwstate !=BFI_IOC_DISABLED ) { +bfa_trc (ioc, alt_fwstate); +return BFA_FALSE ; + } +return BFA_TRUE ; }
drivers/scsi/bfa/bfad_bsg.c +15 -0
@@ -229,6 +229,18 @@ bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd) }int +bfad_iocmd_ioc_fw_sig_inv (struct bfad_s *bfad,void *cmd) +{ +struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; +unsigned long flags; + +spin_lock_irqsave (&bfad->bfad_lock, flags); + iocmd->status =bfa_ioc_fwsig_invalidate (&bfad->bfa.ioc); +spin_unlock_irqrestore (&bfad->bfad_lock, flags); +return 0 ; +} + +int bfad_iocmd_iocfc_set_intr (struct bfad_s *bfad,void *cmd) {struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd;
@@ -2893,6 +2905,9 @@ bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd,case IOCMD_IOC_PCIFN_CFG : rc =bfad_iocmd_ioc_get_pcifn_cfg (bfad, iocmd);break ; +case IOCMD_IOC_FW_SIG_INV : + rc =bfad_iocmd_ioc_fw_sig_inv (bfad, iocmd); +break ;case IOCMD_PCIFN_CREATE : rc =bfad_iocmd_pcifn_create (bfad, iocmd);break ;
drivers/scsi/bfa/bfad_bsg.h +1 -0
@@ -34,6 +34,7 @@ enum {IOCMD_IOC_RESET_FWSTATS ,IOCMD_IOC_SET_ADAPTER_NAME ,IOCMD_IOC_SET_PORT_NAME , +IOCMD_IOC_FW_SIG_INV ,IOCMD_IOCFC_GET_ATTR ,IOCMD_IOCFC_SET_INTR , IOCMD_PORT_ENABLE,
drivers/scsi/bfa/bfi.h +38 -1
@@ -46,6 +46,7 @@*/ #define BFI_FLASH_CHUNK_SZ 256/* Flash chunk size */ #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) +#define BFI_FLASH_IMAGE_SZ 0x100000/* * Msg header common to all msgs
@@ -324,7 +325,29 @@ struct bfi_ioc_getattr_reply_s {#define BFI_IOC_TRC_ENTS 256#define BFI_IOC_FW_SIGNATURE (0xbfadbfad) +#define BFA_IOC_FW_INV_SIGN (0xdeaddead)#define BFI_IOC_MD5SUM_SZ 4 + +struct bfi_ioc_fwver_s { +#ifdef __BIGENDIAN +uint8_t patch; +uint8_t maint; +uint8_t minor; +uint8_t major; +uint8_t rsvd[2 ]; +uint8_t build; +uint8_t phase; +#else +uint8_t major; +uint8_t minor; +uint8_t maint; +uint8_t patch; +uint8_t phase; +uint8_t build; +uint8_t rsvd[2 ]; +#endif +}; +struct bfi_ioc_image_hdr_s {u32 signature;/* constant signature */ u8 asic_gen;/* asic generation */
@@ -333,10 +356,18 @@ struct bfi_ioc_image_hdr_s {u8 port1_mode;/* device mode for port 1 */ u32 exec;/* exec vector */ u32 bootenv;/* fimware boot env */ -u32 rsvd_b[4 ]; +u32 rsvd_b[2 ]; +struct bfi_ioc_fwver_s fwver;u32 md5sum[BFI_IOC_MD5SUM_SZ ]; }; +enum bfi_ioc_img_ver_cmp_e { +BFI_IOC_IMG_VER_INCOMP , +BFI_IOC_IMG_VER_OLD , +BFI_IOC_IMG_VER_SAME , +BFI_IOC_IMG_VER_BETTER +}; +#define BFI_FWBOOT_DEVMODE_OFF 4#define BFI_FWBOOT_TYPE_OFF 8#define BFI_FWBOOT_ENV_OFF 12
@@ -346,6 +377,12 @@ struct bfi_ioc_image_hdr_s { ((u32)(__p0_mode)) << 8 | \ ((u32)(__p1_mode))) +enum bfi_fwboot_type { +BFI_FWBOOT_TYPE_NORMAL =0 , +BFI_FWBOOT_TYPE_FLASH =1 , +BFI_FWBOOT_TYPE_MEMTEST =2 , +}; +#define BFI_FWBOOT_TYPE_NORMAL 0#define BFI_FWBOOT_TYPE_MEMTEST 2#define BFI_FWBOOT_ENV_OS 0
Signature · 1 line
1.8.2.1
PATCH 2/8 bfa: Register port with SCSI even on port init failure
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
This patch addresses the issue of port not being registered with SCSI layer on bfa or firmware initialization failure and subsequently failure in collecting driver traces for debugging port init failures. Also it has minor changes related to bfad state machine clean up.
--- drivers/scsi/bfa/bfad.c | 85 ++++++++++++++++++++++----------------------- drivers/scsi/bfa/bfad_drv.h | 4 +-- 2 files changed, 43 insertions(+), 46 deletions(-)
drivers/scsi/bfa/bfad.c +41 -44
@@ -204,6 +204,7 @@ static void bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event) { unsigned long flags; +bfa_status_t ret;bfa_trc (bfad, event);
@@ -217,7 +218,7 @@ bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event)if (bfad_setup_intr (bfad)) {printk (KERN_WARNING "bfad%d: bfad_setup_intr failed\n" , bfad->inst_no); -bfa_sm_send_event (bfad,BFAD_E_INTR_INIT_FAILED ); +bfa_sm_send_event (bfad,BFAD_E_INIT_FAILED );break ; }
@@ -242,8 +243,26 @@ bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event)printk (KERN_WARNING "bfa %s: bfa init failed\n" , bfad->pci_name); +spin_lock_irqsave (&bfad->bfad_lock, flags); +bfa_fcs_init (&bfad->bfa_fcs); +spin_unlock_irqrestore (&bfad->bfad_lock, flags); + + ret =bfad_cfg_pport (bfad,BFA_LPORT_ROLE_FCP_IM ); +if (ret !=BFA_STATUS_OK ) { +init_completion (&bfad->comp); + +spin_lock_irqsave (&bfad->bfad_lock, flags); + bfad->pport.flags |=BFAD_PORT_DELETE ; +bfa_fcs_exit (&bfad->bfa_fcs); +spin_unlock_irqrestore (&bfad->bfad_lock, flags); + +wait_for_completion (&bfad->comp); + +bfa_sm_send_event (bfad,BFAD_E_INIT_FAILED ); +break ; + } bfad->bfad_flags |=BFAD_HAL_INIT_FAIL ; -bfa_sm_send_event (bfad,BFAD_E_INIT_FAILED ); +bfa_sm_send_event (bfad,BFAD_E_HAL_INIT_FAILED ); }break ;
@@ -273,12 +292,14 @@ bfad_sm_initializing(struct bfad_s *bfad, enum bfad_sm_event event)spin_unlock_irqrestore (&bfad->bfad_lock, flags); retval =bfad_start_ops (bfad); -if (retval !=BFA_STATUS_OK ) +if (retval !=BFA_STATUS_OK ) { +bfa_sm_set_state (bfad, bfad_sm_failed);break ; + }bfa_sm_set_state (bfad, bfad_sm_operational);break ; -case BFAD_E_INTR_INIT_FAILED : +case BFAD_E_INIT_FAILED :bfa_sm_set_state (bfad, bfad_sm_uninit);kthread_stop (bfad->bfad_tsk);spin_lock_irqsave (&bfad->bfad_lock, flags);
@@ -286,7 +307,7 @@ bfad_sm_initializing(struct bfad_s *bfad, enum bfad_sm_event event)spin_unlock_irqrestore (&bfad->bfad_lock, flags);break ; -case BFAD_E_INIT_FAILED : +case BFAD_E_HAL_INIT_FAILED :bfa_sm_set_state (bfad, bfad_sm_failed);break ;default :
@@ -310,13 +331,8 @@ bfad_sm_failed(struct bfad_s *bfad, enum bfad_sm_event event)break ;case BFAD_E_STOP : -if (bfad->bfad_flags &BFAD_CFG_PPORT_DONE ) -bfad_uncfg_pport (bfad); -if (bfad->bfad_flags &BFAD_FC4_PROBE_DONE ) { -bfad_im_probe_undo (bfad); - bfad->bfad_flags &= ~BFAD_FC4_PROBE_DONE ; - } -bfad_stop (bfad); +bfa_sm_set_state (bfad, bfad_sm_fcs_exit); +bfa_sm_send_event (bfad,BFAD_E_FCS_EXIT_COMP );break ;case BFAD_E_EXIT_COMP :
@@ -854,7 +870,7 @@ bfad_drv_init(struct bfad_s *bfad)printk (KERN_WARNING "Not enough memory to attach all Brocade HBA ports, %s" ,"System may need more memory.\n" ); - goto out_hal_mem_alloc_failure; +return BFA_STATUS_FAILED ; } bfad->bfa.trcmod = bfad->trcmod;
@@ -871,31 +887,11 @@ bfad_drv_init(struct bfad_s *bfad) bfad->bfa_fcs.trcmod = bfad->trcmod;bfa_fcs_attach (&bfad->bfa_fcs, &bfad->bfa, bfad,BFA_FALSE ); bfad->bfa_fcs.fdmi_enabled = fdmi_enable; -bfa_fcs_init (&bfad->bfa_fcs);spin_unlock_irqrestore (&bfad->bfad_lock, flags); bfad->bfad_flags |=BFAD_DRV_INIT_DONE ; -/* configure base port */ - rc =bfad_cfg_pport (bfad,BFA_LPORT_ROLE_FCP_IM ); -if (rc !=BFA_STATUS_OK ) - goto out_cfg_pport_fail; -return BFA_STATUS_OK ; - -out_cfg_pport_fail: -/* fcs exit - on cfg pport failure */ -spin_lock_irqsave (&bfad->bfad_lock, flags); -init_completion (&bfad->comp); - bfad->pport.flags |=BFAD_PORT_DELETE ; -bfa_fcs_exit (&bfad->bfa_fcs); -spin_unlock_irqrestore (&bfad->bfad_lock, flags); -wait_for_completion (&bfad->comp); -/* bfa detach - free hal memory */ -bfa_detach (&bfad->bfa); -bfad_hal_mem_release (bfad); -out_hal_mem_alloc_failure: -return BFA_STATUS_FAILED ; }void
@@ -1039,13 +1035,19 @@ bfad_start_ops(struct bfad_s *bfad) {/* FCS driver info init */ spin_lock_irqsave (&bfad->bfad_lock, flags);bfa_fcs_driver_info_init (&bfad->bfa_fcs, &driver_info); + +if (bfad->bfad_flags &BFAD_CFG_PPORT_DONE ) +bfa_fcs_update_cfg (&bfad->bfa_fcs); +else +bfa_fcs_init (&bfad->bfa_fcs); +spin_unlock_irqrestore (&bfad->bfad_lock, flags); -/* -* FCS update cfg - reset the pwwn/nwwn of fabric base logical port -* with values learned during bfa_init firmware GETATTR REQ. -*/ -bfa_fcs_update_cfg (&bfad->bfa_fcs); +if (!(bfad->bfad_flags &BFAD_CFG_PPORT_DONE )) { + retval =bfad_cfg_pport (bfad,BFA_LPORT_ROLE_FCP_IM ); +if (retval !=BFA_STATUS_OK ) +return BFA_STATUS_FAILED ; + }/* Setup fc host fixed attribute if the lk supports */ bfad_fc_host_init (bfad->pport.im_port);
@@ -1056,10 +1058,6 @@ bfad_start_ops(struct bfad_s *bfad) {printk (KERN_WARNING "bfad_im_probe failed\n" );if (bfa_sm_cmp_state (bfad, bfad_sm_initializing))bfa_sm_set_state (bfad, bfad_sm_failed); -bfad_im_probe_undo (bfad); - bfad->bfad_flags &= ~BFAD_FC4_PROBE_DONE ; -bfad_uncfg_pport (bfad); -bfad_stop (bfad);return BFA_STATUS_FAILED ; }else bfad->bfad_flags |=BFAD_FC4_PROBE_DONE ;
@@ -1429,7 +1427,6 @@ bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)return 0 ; out_bfad_sm_failure: -bfa_detach (&bfad->bfa);bfad_hal_mem_release (bfad); out_drv_init_failure:/* Remove the debugfs node for this bfad */
@@ -1564,7 +1561,7 @@ restart_bfa(struct bfad_s *bfad)if (bfad_setup_intr (bfad)) {dev_printk (KERN_WARNING , &pdev->dev,"%s: bfad_setup_intr failed\n" , bfad->pci_name); -bfa_sm_send_event (bfad,BFAD_E_INTR_INIT_FAILED ); +bfa_sm_send_event (bfad,BFAD_E_INIT_FAILED );return -1 ; }
drivers/scsi/bfa/bfad_drv.h +2 -2
@@ -240,8 +240,8 @@ enum bfad_sm_event {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_HAL_INIT_FAILED =5 , +BFAD_E_INIT_FAILED =6 ,BFAD_E_FCS_EXIT_COMP =7 ,BFAD_E_EXIT_COMP =8 ,BFAD_E_STOP =9
Signature · 1 line
1.8.2.1
PATCH 3/8 bfa: LUN discovery issue in direct attach mode
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
In direct attach mode, if port features like QoS/Trunk/FEC/CR are enabled, driver can receive PLOGI from the target before firmware notifies lport online to the driver. In case the lport is not yet online and a PLOGI is received, send a reject to the peer port, instead of dropping it on the floor.
--- drivers/scsi/bfa/bfa_fcs_lport.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/scsi/bfa/bfa_fcs_lport.c +14 -1
@@ -773,7 +773,20 @@ bfa_fcs_lport_uf_recv(struct bfa_fcs_lport_s *lport,bfa_trc (lport->fcs, fchs->type);if (!bfa_fcs_lport_is_online (lport)) { -bfa_stats (lport, uf_recv_drops); +/* +* In direct attach topology, it is possible to get a PLOGI +* before the lport is online due to port feature +* (QoS/Trunk/FEC/CR), so send a rjt +*/ +if ((fchs->type ==FC_TYPE_ELS ) && + (els_cmd->els_code ==FC_ELS_PLOGI )) { +bfa_fcs_lport_send_ls_rjt (lport, fchs, +FC_LS_RJT_RSN_UNABLE_TO_PERF_CMD , +FC_LS_RJT_EXP_NO_ADDL_INFO ); +bfa_stats (lport, plogi_rcvd); + }else +bfa_stats (lport, uf_recv_drops); +return ; }
Signature · 1 line
1.8.2.1
PATCH 4/8 bfa: Fix for bcu or hcm faa query hang
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
This patch set fixes the issue of brocade management utility hang (bcu/HCM) when faa attributes are queried from multiple application threads. Hang was due to race between the threads and completion handler corruption.
--- drivers/scsi/bfa/bfa_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/bfa/bfa_core.c +4 -4
@@ -1367,10 +1367,6 @@ bfa_faa_query(struct bfa_s *bfa, struct bfa_faa_attr_s *attr,struct bfa_iocfc_s *iocfc = &bfa->iocfc;bfa_status_t status; - iocfc->faa_args.faa_attr = attr; - iocfc->faa_args.faa_cb.faa_cbfn = cbfn; - iocfc->faa_args.faa_cb.faa_cbarg = cbarg; - status =bfa_faa_validate_request (bfa);if (status !=BFA_STATUS_OK )return status;
@@ -1378,6 +1374,10 @@ bfa_faa_query(struct bfa_s *bfa, struct bfa_faa_attr_s *attr,if (iocfc->faa_args.busy ==BFA_TRUE )return BFA_STATUS_DEVBUSY ; + iocfc->faa_args.faa_attr = attr; + iocfc->faa_args.faa_cb.faa_cbfn = cbfn; + iocfc->faa_args.faa_cb.faa_cbarg = cbarg; + iocfc->faa_args.busy =BFA_TRUE ;memset (&faa_attr_req,0 ,sizeof (struct bfi_faa_query_s )); bfi_h2i_set(faa_attr_req.mh, BFI_MC_IOCFC,
Signature · 1 line
1.8.2.1
PATCH 5/8 bfa: Observed auto D-port mode instead of manual
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
Observed Auto mode in the HBA side while doing manual D-Port test on the switch side. Mode is not passed to BFA from firmware when the test is triggered by switch side. BFA just blindly using Auto mode.
--- drivers/scsi/bfa/bfa_svc.c | 2 +- drivers/scsi/bfa/bfi.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/bfa/bfa_svc.c +1 -1
@@ -6758,7 +6758,7 @@ bfa_dport_scn(struct bfa_dport_s *dport, struct bfi_diag_dport_scn_s *msg) dport->rp_pwwn = msg->info.teststart.pwwn; dport->rp_nwwn = msg->info.teststart.nwwn; dport->lpcnt =cpu_to_be32 (msg->info.teststart.numfrm); -bfa_dport_result_start (dport,BFA_DPORT_OPMODE_AUTO ); +bfa_dport_result_start (dport, msg->info.teststart.mode);break ;case BFI_DPORT_SCN_SUBTESTSTART :
drivers/scsi/bfa/bfi.h +2 -1
@@ -1144,7 +1144,8 @@ struct bfi_diag_dport_scn_teststart_s {wwn_t pwwn;/* switch port wwn. 8 bytes */ wwn_t nwwn;/* switch node wwn. 8 bytes */ u8 type;/* bfa_diag_dport_test_type_e */ -u8 rsvd[3 ]; +u8 mode;/* bfa_diag_dport_test_opmode */ +u8 rsvd[2 ];u32 numfrm;/* from switch uint in 1M */ };
Signature · 1 line
1.8.2.1
PATCH 6/8 bfa: change FC_ELS_TOV to 20sec
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
As per the FCP specs, the timeout for issuing ABTS is 20 sec; not 21 sec. Hence setting the TOV to 20 sec.
--- drivers/scsi/bfa/bfa_fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfa_fc.h +1 -1
@@ -1026,7 +1026,7 @@ struct fc_alpabm_s {#define FC_ED_TOV 2#define FC_REC_TOV (FC_ED_TOV + 1)#define FC_RA_TOV 10 -#define FC_ELS_TOV ((2 * FC_RA_TOV) + 1) +#define FC_ELS_TOV (2 * FC_RA_TOV)#define FC_FCCT_TOV (3 * FC_RA_TOV)/*
Signature · 1 line
1.8.2.1
PATCH 7/8 bfa: Fix crash when symb name set for offline vport
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
This patch fixes a crash when tried setting symbolic name for an offline vport through sysfs. Crash is due to uninitialized pointer lport->ns, which gets initialized only on linkup (port online).
--- drivers/scsi/bfa/bfa_fcs.h | 1 + drivers/scsi/bfa/bfa_fcs_lport.c | 14 +++++++++++--- drivers/scsi/bfa/bfad_attr.c | 7 ++----- 3 files changed, 14 insertions(+), 8 deletions(-)
drivers/scsi/bfa/bfa_fcs.h +1 -0
@@ -296,6 +296,7 @@ wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn,struct bfa_fcs_lport_s *bfa_fcs_lookup_port (struct bfa_fcs_s *fcs,u16 vf_id,wwn_t lpwwn); +void bfa_fcs_lport_set_symname (struct bfa_fcs_lport_s *port,char *symname);void bfa_fcs_lport_get_info (struct bfa_fcs_lport_s *port,struct bfa_lport_info_s *port_info); void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port,
drivers/scsi/bfa/bfa_fcs_lport.c +11 -3
@@ -1110,6 +1110,17 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport,bfa_sm_send_event (lport,BFA_FCS_PORT_SM_CREATE ); } +void +bfa_fcs_lport_set_symname (struct bfa_fcs_lport_s *port, +char *symname) +{ +strcpy (port->port_cfg.sym_name.symname, symname); + +if (bfa_sm_cmp_state (port, bfa_fcs_lport_sm_online)) +bfa_fcs_lport_ns_util_send_rspn_id ( +BFA_FCS_GET_NS_FROM_PORT (port),NULL ); +} +/* * fcs_lport_api */
@@ -5153,9 +5164,6 @@ bfa_fcs_lport_ns_util_send_rspn_id(void *cbarg, struct bfa_fcxp_s *fcxp_alloced)u8 *psymbl = &symbl[0 ];int len; -if (!bfa_sm_cmp_state (port, bfa_fcs_lport_sm_online)) -return ; -/* Avoid sending RSPN in the following states. */ if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_offline) || bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_sending) ||
drivers/scsi/bfa/bfad_attr.c +2 -5
@@ -593,11 +593,8 @@ bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)return ;spin_lock_irqsave (&bfad->bfad_lock, flags); -if (strlen (sym_name) >0 ) { -strcpy (fcs_vport->lport.port_cfg.sym_name.symname, sym_name); -bfa_fcs_lport_ns_util_send_rspn_id ( -BFA_FCS_GET_NS_FROM_PORT ((&fcs_vport->lport)),NULL ); - } +if (strlen (sym_name) >0 ) +bfa_fcs_lport_set_symname (&fcs_vport->lport, sym_name);spin_unlock_irqrestore (&bfad->bfad_lock, flags); }
Signature · 1 line
1.8.2.1
James Bottomley
maintainerRe: [PATCH 7/8] bfa: Fix crash when symb name set for offline vport
Quoted 5 lines · On Tue, 2013-11-19 at 23:05 -0800, [email protected] wrote:
From: Vijaya Mohan Guvva <[email protected]>
This patch fixes a crash when tried setting symbolic name for an offline vport through sysfs. Crash is due to uninitialized pointer
lport->ns, which gets initialized only on linkup (port online).
This looks like a separable patch that should go through the fixes tree to stable, is that right?
James
RE: [PATCH 7/8] bfa: Fix crash when symb name set for offline vport
Quoted 12 lines · On Tue, 2013-11-19 at 23:05 -0800, [email protected] wrote:
Quoted 5 lines
From: Vijaya Mohan Guvva <[email protected]>
This patch fixes a crash when tried setting symbolic name for an offline vport through sysfs. Crash is due to uninitialized pointer
lport->ns, which gets initialized only on linkup (port online).This looks like a separable patch that should go through the fixes tree to stable, is that right?
James
Hi James,
Yes, this is a bug fix and should go through the fixes tree to stable tree. So, should I separate this patch from the original patch and submit it separately?
Thanks,
Vijay
James Bottomley
maintainerRe: [PATCH 7/8] bfa: Fix crash when symb name set for offline vport
Quoted 10 lines · Vijaya Mohan Guvva
Quoted 10 lines · On Tue, 2013-11-19 at 23:05 -0800, [email protected] wrote:
Quoted 5 lines
From: Vijaya Mohan Guvva <[email protected]>
This patch fixes a crash when tried setting symbolic name for an offline vport through sysfs. Crash is due to uninitialized pointer
lport->ns, which gets initialized only on linkup (port online).This looks like a separable patch that should go through the fixes tree to stable, is that right?
Quoted 6 lines
Quoted 2 lines
James
Hi James,
Yes, this is a bug fix and should go through the fixes tree to stable tree. So, should I separate this patch from the original patch and submit it separately?
No, that's OK this time around, I can cut this out of the set. Next time, having separate bug fixes and updates allows this to happen without me having to ask.
James
PATCH 8/8 bfa: Driver version upgrade to 3.2.23.0
In reply to [email protected]From: Vijaya Mohan Guvva <[email protected]>
Patch includes changes to upgrade bfa driver version to 3.2.23.0 and use firmware version 3.2.3.0
--- drivers/scsi/bfa/bfad.c | 6 +++--- drivers/scsi/bfa/bfad_drv.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/bfa/bfad.c +3 -3
@@ -63,9 +63,9 @@ int max_rport_logins = BFA_FCS_MAX_RPORT_LOGINS;u32 bfi_image_cb_size, bfi_image_ct_size, bfi_image_ct2_size;u32 *bfi_image_cb, *bfi_image_ct, *bfi_image_ct2; -#define BFAD_FW_FILE_CB "cbfw-3.2.1.1.bin" -#define BFAD_FW_FILE_CT "ctfw-3.2.1.1.bin" -#define BFAD_FW_FILE_CT2 "ct2fw-3.2.1.1.bin" +#define BFAD_FW_FILE_CB "cbfw-3.2.3.0.bin" +#define BFAD_FW_FILE_CT "ctfw-3.2.3.0.bin" +#define BFAD_FW_FILE_CT2 "ct2fw-3.2.3.0.bin"static u32 *bfad_load_fwimg (struct pci_dev *pdev);static void bfad_free_fwimg (void );
drivers/scsi/bfa/bfad_drv.h +1 -1
@@ -57,7 +57,7 @@#ifdef BFA_DRIVER_VERSION #define BFAD_DRIVER_VERSION BFA_DRIVER_VERSION#else -#define BFAD_DRIVER_VERSION "3.2.21.1" +#define BFAD_DRIVER_VERSION "3.2.23.0"#endif #define BFAD_PROTO_NAME FCPI_NAME
Signature · 1 line
1.8.2.1