[SCSI] bfa: remove unused defintions and misc cleanups
This patch removes unused functions, data strucutres, and definitions. It also includes misc comment and formatting cleanups. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
2f2f40a458
commit
8f4bfadd20
@ -334,8 +334,6 @@ void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
|
||||
void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns);
|
||||
wwn_t bfa_iocfc_get_pwwn(struct bfa_s *bfa);
|
||||
wwn_t bfa_iocfc_get_nwwn(struct bfa_s *bfa);
|
||||
void bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa,
|
||||
struct bfa_boot_pbc_s *pbcfg);
|
||||
int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa,
|
||||
struct bfi_pbc_vport_s *pbc_vport);
|
||||
|
||||
|
@ -998,18 +998,6 @@ bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns)
|
||||
memcpy(wwns, cfgrsp->bootwwns.wwn, sizeof(cfgrsp->bootwwns.wwn));
|
||||
}
|
||||
|
||||
void
|
||||
bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa, struct bfa_boot_pbc_s *pbcfg)
|
||||
{
|
||||
struct bfa_iocfc_s *iocfc = &bfa->iocfc;
|
||||
struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp;
|
||||
|
||||
pbcfg->enable = cfgrsp->pbc_cfg.boot_enabled;
|
||||
pbcfg->nbluns = cfgrsp->pbc_cfg.nbluns;
|
||||
pbcfg->speed = cfgrsp->pbc_cfg.port_speed;
|
||||
memcpy(pbcfg->pblun, cfgrsp->pbc_cfg.blun, sizeof(pbcfg->pblun));
|
||||
}
|
||||
|
||||
int
|
||||
bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2180,7 +2180,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
|
||||
else
|
||||
m->cmnd.iodir = FCP_IODIR_NONE;
|
||||
|
||||
m->cmnd.cdb = *(scsi_cdb_t *) cmnd->cmnd;
|
||||
m->cmnd.cdb = *(struct scsi_cdb_s *) cmnd->cmnd;
|
||||
fcp_dl = scsi_bufflen(cmnd);
|
||||
m->cmnd.fcp_dl = cpu_to_be32(fcp_dl);
|
||||
|
||||
|
@ -957,7 +957,7 @@ bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf_s *iocpf)
|
||||
bfa_ioc_hw_sem_get(iocpf->ioc);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* IOC hb ack request is being removed.
|
||||
*/
|
||||
static void
|
||||
@ -1020,8 +1020,7 @@ bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf_s *iocpf)
|
||||
bfa_ioc_hw_sem_get(iocpf->ioc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
/*
|
||||
* Hardware initialization failed.
|
||||
*/
|
||||
static void
|
||||
@ -1103,12 +1102,12 @@ bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
|
||||
static void
|
||||
bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf)
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* Mark IOC as failed in hardware and stop firmware.
|
||||
*/
|
||||
bfa_ioc_lpu_stop(iocpf->ioc);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Flush any queued up mailbox requests.
|
||||
*/
|
||||
bfa_ioc_mbox_hbfail(iocpf->ioc);
|
||||
@ -1366,12 +1365,6 @@ bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env)
|
||||
{
|
||||
struct bfi_ioc_image_hdr_s fwhdr, *drv_fwhdr;
|
||||
|
||||
/*
|
||||
* If bios/efi boot (flash based) -- return true
|
||||
*/
|
||||
if (bfa_ioc_is_bios_optrom(ioc))
|
||||
return BFA_TRUE;
|
||||
|
||||
bfa_ioc_fwver_get(ioc, &fwhdr);
|
||||
drv_fwhdr = (struct bfi_ioc_image_hdr_s *)
|
||||
bfa_cb_image_get_chunk(BFA_IOC_FWIMG_TYPE(ioc), 0);
|
||||
@ -1422,22 +1415,6 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force)
|
||||
boot_type = BFI_BOOT_TYPE_NORMAL;
|
||||
boot_env = BFI_BOOT_LOADER_OS;
|
||||
|
||||
/*
|
||||
* Flash based firmware boot BIOS env.
|
||||
*/
|
||||
if (bfa_ioc_is_bios_optrom(ioc)) {
|
||||
boot_type = BFI_BOOT_TYPE_FLASH;
|
||||
boot_env = BFI_BOOT_LOADER_BIOS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flash based firmware boot UEFI env.
|
||||
*/
|
||||
if (bfa_ioc_is_uefi(ioc)) {
|
||||
boot_type = BFI_BOOT_TYPE_FLASH;
|
||||
boot_env = BFI_BOOT_LOADER_UEFI;
|
||||
}
|
||||
|
||||
/*
|
||||
* check if firmware is valid
|
||||
*/
|
||||
@ -1466,8 +1443,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force)
|
||||
* convergence, IOC will be in operational state when 2nd driver
|
||||
* is loaded.
|
||||
*/
|
||||
if (ioc_fwstate == BFI_IOC_DISABLED ||
|
||||
(!bfa_ioc_is_bios_optrom(ioc) && ioc_fwstate == BFI_IOC_OP)) {
|
||||
if (ioc_fwstate == BFI_IOC_DISABLED || ioc_fwstate == BFI_IOC_OP) {
|
||||
|
||||
/*
|
||||
* When using MSI-X any pending firmware ready event should
|
||||
@ -1842,7 +1818,7 @@ bfa_ioc_fail_notify(struct bfa_ioc_s *ioc)
|
||||
struct bfa_ioc_hbfail_notify_s *notify;
|
||||
struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Notify driver and common modules registered for notification.
|
||||
*/
|
||||
ioc->cbfn->hbfail_cbfn(ioc->bfa);
|
||||
@ -2279,7 +2255,7 @@ bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc)
|
||||
return BFA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Reset IOC fwstate registers.
|
||||
*/
|
||||
void
|
||||
|
@ -296,15 +296,6 @@ struct bfa_ioc_hwif_s {
|
||||
#define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS)
|
||||
#define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS)
|
||||
|
||||
#ifdef BFA_IOC_IS_UEFI
|
||||
#define bfa_ioc_is_bios_optrom(__ioc) (0)
|
||||
#define bfa_ioc_is_uefi(__ioc) BFA_IOC_IS_UEFI
|
||||
#else
|
||||
#define bfa_ioc_is_bios_optrom(__ioc) \
|
||||
(bfa_cb_image_get_size(BFA_IOC_FWIMG_TYPE(__ioc)) < BFA_IOC_FWIMG_MINSZ)
|
||||
#define bfa_ioc_is_uefi(__ioc) (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IOC mailbox interface
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@ bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc)
|
||||
ioc->ioc_hwif = &hwif_cb;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Return true if firmware of current driver matches the running firmware.
|
||||
*/
|
||||
static bfa_boolean_t
|
||||
@ -70,8 +70,7 @@ bfa_ioc_cb_firmware_lock(struct bfa_ioc_s *ioc)
|
||||
struct bfi_ioc_image_hdr_s fwhdr;
|
||||
uint32_t fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
|
||||
if ((fwstate == BFI_IOC_UNINIT) || bfa_ioc_is_uefi(ioc) ||
|
||||
bfa_ioc_is_bios_optrom(ioc))
|
||||
if (fwstate == BFI_IOC_UNINIT)
|
||||
return BFA_TRUE;
|
||||
|
||||
bfa_ioc_fwver_get(ioc, &fwhdr);
|
||||
@ -211,7 +210,7 @@ bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc)
|
||||
writel(1, ioc->ioc_regs.ioc_sem_reg);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Synchronized IOC failure processing routines
|
||||
*/
|
||||
static void
|
||||
@ -236,7 +235,7 @@ bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc)
|
||||
uint32_t fwstate, alt_fwstate;
|
||||
fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
|
||||
/**
|
||||
/*
|
||||
* At this point, this IOC is hoding the hw sem in the
|
||||
* start path (fwcheck) OR in the disable/enable path
|
||||
* OR to check if the other IOC has acknowledged failure.
|
||||
|
@ -351,7 +351,7 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc)
|
||||
writel(1, ioc->ioc_regs.ioc_sem_reg);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Synchronized IOC failure processing routines
|
||||
*/
|
||||
static void
|
||||
@ -393,7 +393,7 @@ bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc)
|
||||
if (sync_ackd == 0)
|
||||
return BFA_TRUE;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The check below is to see whether any other PCI fn
|
||||
* has reinitialized the ASIC (reset sync_ackd bits)
|
||||
* and failed again while this IOC was waiting for hw
|
||||
@ -412,7 +412,7 @@ bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc)
|
||||
return BFA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* If another PCI fn reinitialized and failed again while
|
||||
* this IOC was waiting for hw sem, the sync_ackd bit for
|
||||
* this IOC need to be set again to allow reinitialization.
|
||||
|
@ -1372,7 +1372,7 @@ bfa_lps_sm_online(struct bfa_lps_s *lps, enum bfa_lps_event event)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* login complete
|
||||
*/
|
||||
static void
|
||||
@ -1691,7 +1691,7 @@ bfa_lps_send_logout(struct bfa_lps_s *lps)
|
||||
bfa_reqq_produce(lps->bfa, lps->reqq);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* send n2n pid set request to firmware
|
||||
*/
|
||||
static void
|
||||
@ -1930,7 +1930,7 @@ bfa_lps_get_base_pid(struct bfa_s *bfa)
|
||||
return BFA_LPS_FROM_TAG(mod, 0)->lp_pid;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set PID in case of n2n (which is assigned during PLOGI)
|
||||
*/
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user