Skip to content

Commit

Permalink
[SCSI] bfa: remove unused and empty functions
Browse files Browse the repository at this point in the history
Removed unused and empty functions.

Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Maggie Zhang authored and James Bottomley committed Dec 21, 2010
1 parent 402c6ee commit df0f193
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 710 deletions.
10 changes: 0 additions & 10 deletions drivers/scsi/bfa/bfa.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ typedef void (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete);
* Interrupt message handlers
*/
void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m);
void bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func);

/*
* Request and response queue related defines
Expand Down Expand Up @@ -397,8 +396,6 @@ void bfa_cb_init(void *bfad, bfa_status_t status);
void bfa_cb_updateq(void *bfad, bfa_status_t status);

bfa_boolean_t bfa_intx(struct bfa_s *bfa);
void bfa_intx_disable(struct bfa_s *bfa);
void bfa_intx_enable(struct bfa_s *bfa);
void bfa_isr_enable(struct bfa_s *bfa);
void bfa_isr_disable(struct bfa_s *bfa);

Expand All @@ -410,16 +407,12 @@ typedef void (*bfa_cb_ioc_t) (void *cbarg, enum bfa_status status);
void bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr);
void bfa_get_attr(struct bfa_s *bfa, struct bfa_ioc_attr_s *ioc_attr);

void bfa_adapter_get_attr(struct bfa_s *bfa,
struct bfa_adapter_attr_s *ad_attr);
u64 bfa_adapter_get_id(struct bfa_s *bfa);

bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa,
struct bfa_iocfc_intr_attr_s *attr);

void bfa_iocfc_enable(struct bfa_s *bfa);
void bfa_iocfc_disable(struct bfa_s *bfa);
void bfa_chip_reset(struct bfa_s *bfa);
void bfa_timer_tick(struct bfa_s *bfa);
#define bfa_timer_start(_bfa, _timer, _timercb, _arg, _timeout) \
bfa_timer_begin(&(_bfa)->timer_mod, _timer, _timercb, _arg, _timeout)
Expand All @@ -431,8 +424,5 @@ bfa_status_t bfa_debug_fwtrc(struct bfa_s *bfa, void *trcdata, int *trclen);
bfa_status_t bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen);
bfa_status_t bfa_debug_fwcore(struct bfa_s *bfa, void *buf,
u32 *offset, int *buflen);
void bfa_debug_fwsave_clear(struct bfa_s *bfa);
bfa_status_t bfa_fw_stats_get(struct bfa_s *bfa, void *data);
bfa_status_t bfa_fw_stats_clear(struct bfa_s *bfa);

#endif /* __BFA_H__ */
79 changes: 1 addition & 78 deletions drivers/scsi/bfa/bfa_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ bfa_msix_all(struct bfa_s *bfa, int vec)
bfa_intx(bfa);
}

/*
* hal_intr_api
*/
bfa_boolean_t
bfa_intx(struct bfa_s *bfa)
{
Expand Down Expand Up @@ -150,18 +147,6 @@ bfa_intx(struct bfa_s *bfa)
return BFA_TRUE;
}

void
bfa_intx_enable(struct bfa_s *bfa)
{
writel(bfa->iocfc.intr_mask, bfa->iocfc.bfa_regs.intr_mask);
}

void
bfa_intx_disable(struct bfa_s *bfa)
{
writel(-1L, bfa->iocfc.bfa_regs.intr_mask);
}

void
bfa_isr_enable(struct bfa_s *bfa)
{
Expand Down Expand Up @@ -317,18 +302,12 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec)
}
}

void
bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func)
{
bfa_isrs[mc] = isr_func;
}

/*
* BFA IOC FC related functions
*/

/*
* hal_ioc_pvt BFA IOC private functions
* BFA IOC private functions
*/

static void
Expand Down Expand Up @@ -735,9 +714,6 @@ bfa_iocfc_reset_cbfn(void *bfa_arg)
bfa_isr_enable(bfa);
}

/*
* hal_ioc_public
*/

/*
* Query IOC memory requirement information.
Expand Down Expand Up @@ -856,18 +832,6 @@ bfa_iocfc_isr(void *bfaarg, struct bfi_mbmsg_s *m)
}
}

void
bfa_adapter_get_attr(struct bfa_s *bfa, struct bfa_adapter_attr_s *ad_attr)
{
bfa_ioc_get_adapter_attr(&bfa->ioc, ad_attr);
}

u64
bfa_adapter_get_id(struct bfa_s *bfa)
{
return bfa_ioc_get_adid(&bfa->ioc);
}

void
bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr)
{
Expand Down Expand Up @@ -998,9 +962,6 @@ bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport)
return cfgrsp->pbc_cfg.nvports;
}

/*
* hal_api
*/

/*
* Use this function query the memory requirement of the BFA library.
Expand Down Expand Up @@ -1337,15 +1298,6 @@ bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen)
return bfa_ioc_debug_fwsave(&bfa->ioc, trcdata, trclen);
}

/*
* Clear the saved firmware trace information of an IOC.
*/
void
bfa_debug_fwsave_clear(struct bfa_s *bfa)
{
bfa_ioc_debug_fwsave_clear(&bfa->ioc);
}

/*
* Fetch firmware trace data.
*
Expand Down Expand Up @@ -1378,32 +1330,3 @@ bfa_debug_fwcore(struct bfa_s *bfa, void *buf, u32 *offset, int *buflen)
{
return bfa_ioc_debug_fwcore(&bfa->ioc, buf, offset, buflen);
}
/*
* Reset hw semaphore & usage cnt regs and initialize.
*/
void
bfa_chip_reset(struct bfa_s *bfa)
{
bfa_ioc_ownership_reset(&bfa->ioc);
bfa_ioc_pll_init(&bfa->ioc);
}

/*
* Fetch firmware statistics data.
*
* @param[in] bfa BFA instance
* @param[out] data Firmware stats buffer
*
* @retval BFA_STATUS_OK Firmware trace is fetched.
*/
bfa_status_t
bfa_fw_stats_get(struct bfa_s *bfa, void *data)
{
return bfa_ioc_fw_stats_get(&bfa->ioc, data);
}

bfa_status_t
bfa_fw_stats_clear(struct bfa_s *bfa)
{
return bfa_ioc_fw_stats_clear(&bfa->ioc);
}
82 changes: 1 addition & 81 deletions drivers/scsi/bfa/bfa_fcpim.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ enum bfa_itnim_event {
if ((__fcpim)->profile_start) \
(__fcpim)->profile_start(__ioim); \
} while (0)
/*
* hal_ioim_sm
*/

/*
* IO state machine events
Expand Down Expand Up @@ -295,7 +292,7 @@ static void bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim,
enum bfa_tskim_event event);

/*
* hal_fcpim_mod BFA FCP Initiator Mode module
* BFA FCP Initiator Mode module
*/

/*
Expand Down Expand Up @@ -357,10 +354,6 @@ bfa_fcpim_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
static void
bfa_fcpim_detach(struct bfa_s *bfa)
{
struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa);

bfa_ioim_detach(fcpim);
bfa_tskim_detach(fcpim);
}

static void
Expand Down Expand Up @@ -1586,13 +1579,6 @@ bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim,
return BFA_STATUS_OK;
}

void
bfa_itnim_get_stats(struct bfa_itnim_s *itnim,
struct bfa_itnim_iostats_s *stats)
{
*stats = itnim->stats;
}

void
bfa_itnim_clear_stats(struct bfa_itnim_s *itnim)
{
Expand Down Expand Up @@ -2213,11 +2199,6 @@ bfa_ioim_sm_resfree(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
}



/*
* hal_ioim_private
*/

static void
__bfa_cb_ioim_good_comp(void *cbarg, bfa_boolean_t complete)
{
Expand Down Expand Up @@ -2421,25 +2402,6 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
(bfa_cb_ioim_get_size(ioim->dio) & (sizeof(u32) - 1)))
bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_lpuid(ioim->bfa));

#ifdef IOIM_ADVANCED
m->cmnd.crn = bfa_cb_ioim_get_crn(ioim->dio);
m->cmnd.priority = bfa_cb_ioim_get_priority(ioim->dio);
m->cmnd.taskattr = bfa_cb_ioim_get_taskattr(ioim->dio);

/*
* Handle large CDB (>16 bytes).
*/
m->cmnd.addl_cdb_len = (bfa_cb_ioim_get_cdblen(ioim->dio) -
FCP_CMND_CDB_LEN) / sizeof(u32);
if (m->cmnd.addl_cdb_len) {
memcpy(&m->cmnd.cdb + 1, (scsi_cdb_t *)
bfa_cb_ioim_get_cdb(ioim->dio) + 1,
m->cmnd.addl_cdb_len * sizeof(u32));
fcp_cmnd_fcpdl(&m->cmnd) =
cpu_to_be32(bfa_cb_ioim_get_size(ioim->dio));
}
#endif

/*
* queue I/O message to firmware
*/
Expand Down Expand Up @@ -2653,11 +2615,6 @@ bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, bfa_boolean_t iotov)
}



/*
* hal_ioim_friend
*/

/*
* Memory allocation and initialization.
*/
Expand Down Expand Up @@ -2722,14 +2679,6 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
}
}

/*
* Driver detach time call.
*/
void
bfa_ioim_detach(struct bfa_fcpim_mod_s *fcpim)
{
}

void
bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
{
Expand Down Expand Up @@ -2903,11 +2852,6 @@ bfa_ioim_tov(struct bfa_ioim_s *ioim)
}



/*
* hal_ioim_api
*/

/*
* Allocate IOIM resource for initiator mode I/O request.
*/
Expand Down Expand Up @@ -3234,11 +3178,6 @@ bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
}



/*
* hal_tskim_private
*/

static void
__bfa_cb_tskim_done(void *cbarg, bfa_boolean_t complete)
{
Expand Down Expand Up @@ -3452,11 +3391,6 @@ bfa_tskim_iocdisable_ios(struct bfa_tskim_s *tskim)
}



/*
* hal_tskim_friend
*/

/*
* Notification on completions from related ioim.
*/
Expand Down Expand Up @@ -3521,14 +3455,6 @@ bfa_tskim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
bfa_meminfo_kva(minfo) = (u8 *) tskim;
}

void
bfa_tskim_detach(struct bfa_fcpim_mod_s *fcpim)
{
/*
* @todo
*/
}

void
bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
{
Expand Down Expand Up @@ -3556,12 +3482,6 @@ bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
}



/*
* hal_tskim_api
*/


struct bfa_tskim_s *
bfa_tskim_alloc(struct bfa_s *bfa, struct bfad_tskim_s *dtsk)
{
Expand Down
4 changes: 0 additions & 4 deletions drivers/scsi/bfa/bfa_fcpim.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ bfa_ioim_get_iotag(struct bfa_ioim_s *ioim)
*/
void bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim,
struct bfa_meminfo_s *minfo);
void bfa_ioim_detach(struct bfa_fcpim_mod_s *fcpim);
void bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
void bfa_ioim_good_comp_isr(struct bfa_s *bfa,
struct bfi_msg_s *msg);
Expand All @@ -232,7 +231,6 @@ void bfa_ioim_tov(struct bfa_ioim_s *ioim);

void bfa_tskim_attach(struct bfa_fcpim_mod_s *fcpim,
struct bfa_meminfo_s *minfo);
void bfa_tskim_detach(struct bfa_fcpim_mod_s *fcpim);
void bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
void bfa_tskim_iodone(struct bfa_tskim_s *tskim);
void bfa_tskim_iocdisable(struct bfa_tskim_s *tskim);
Expand Down Expand Up @@ -296,8 +294,6 @@ void bfa_itnim_delete(struct bfa_itnim_s *itnim);
void bfa_itnim_online(struct bfa_itnim_s *itnim,
bfa_boolean_t seq_rec);
void bfa_itnim_offline(struct bfa_itnim_s *itnim);
void bfa_itnim_get_stats(struct bfa_itnim_s *itnim,
struct bfa_itnim_iostats_s *stats);
void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim);
bfa_status_t bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim,
struct bfa_itnim_ioprofile_s *ioprofile);
Expand Down
Loading

0 comments on commit df0f193

Please sign in to comment.