Commit f7f73812 authored by Maggie Zhang's avatar Maggie Zhang Committed by James Bottomley

[SCSI] bfa: clean up one line functions

Cleaned up one line functions.
Signed-off-by: default avatarMaggie Zhang <xmzhang@brocade.com>
Signed-off-by: default avatarJing Huang <huangj@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent df0f1933
......@@ -296,7 +296,6 @@ void bfa_iocfc_attach(struct bfa_s *bfa, void *bfad,
struct bfa_iocfc_cfg_s *cfg,
struct bfa_meminfo_s *meminfo,
struct bfa_pcidev_s *pcidev);
void bfa_iocfc_detach(struct bfa_s *bfa);
void bfa_iocfc_init(struct bfa_s *bfa);
void bfa_iocfc_start(struct bfa_s *bfa);
void bfa_iocfc_stop(struct bfa_s *bfa);
......@@ -385,13 +384,7 @@ void bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg,
void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
struct bfa_meminfo_s *meminfo,
struct bfa_pcidev_s *pcidev);
void bfa_init_trc(struct bfa_s *bfa, struct bfa_trc_mod_s *trcmod);
void bfa_init_plog(struct bfa_s *bfa, struct bfa_plog_s *plog);
void bfa_detach(struct bfa_s *bfa);
void bfa_init(struct bfa_s *bfa);
void bfa_start(struct bfa_s *bfa);
void bfa_stop(struct bfa_s *bfa);
void bfa_attach_fcs(struct bfa_s *bfa);
void bfa_cb_init(void *bfad, bfa_status_t status);
void bfa_cb_updateq(void *bfad, bfa_status_t status);
......@@ -405,7 +398,6 @@ void bfa_comp_free(struct bfa_s *bfa, struct list_head *comp_q);
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);
bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa,
......@@ -413,16 +405,7 @@ bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa,
void bfa_iocfc_enable(struct bfa_s *bfa);
void bfa_iocfc_disable(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)
/*
* BFA debug API functions
*/
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);
#endif /* __BFA_H__ */
......@@ -66,18 +66,6 @@ static struct bfa_ioc_cbfn_s bfa_iocfc_cbfn;
/*
* BFA Interrupt handling functions
*/
static void
bfa_msix_errint(struct bfa_s *bfa, u32 intr)
{
bfa_ioc_error_isr(&bfa->ioc);
}
static void
bfa_msix_lpu(struct bfa_s *bfa)
{
bfa_ioc_mbox_isr(&bfa->ioc);
}
static void
bfa_reqq_resume(struct bfa_s *bfa, int qid)
{
......@@ -267,7 +255,7 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec)
intr = readl(bfa->iocfc.bfa_regs.intr_status);
if (intr & (__HFN_INT_MBOX_LPU0 | __HFN_INT_MBOX_LPU1))
bfa_msix_lpu(bfa);
bfa_ioc_mbox_isr(&bfa->ioc);
intr &= (__HFN_INT_ERR_EMC | __HFN_INT_ERR_LPU0 |
__HFN_INT_ERR_LPU1 | __HFN_INT_ERR_PSS | __HFN_INT_LL_HALT);
......@@ -298,7 +286,7 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec)
}
writel(intr, bfa->iocfc.bfa_regs.intr_status);
bfa_msix_errint(bfa, intr);
bfa_ioc_error_isr(&bfa->ioc);
}
}
......@@ -467,8 +455,8 @@ bfa_iocfc_mem_claim(struct bfa_s *bfa, struct bfa_iocfc_cfg_s *cfg,
* First allocate dma memory for IOC.
*/
bfa_ioc_mem_claim(&bfa->ioc, dm_kva, dm_pa);
dm_kva += bfa_ioc_meminfo();
dm_pa += bfa_ioc_meminfo();
dm_kva += BFA_ROUNDUP(sizeof(struct bfi_ioc_attr_s), BFA_DMA_ALIGN_SZ);
dm_pa += BFA_ROUNDUP(sizeof(struct bfi_ioc_attr_s), BFA_DMA_ALIGN_SZ);
/*
* Claim DMA-able memory for the request/response queues and for shadow
......@@ -531,7 +519,7 @@ bfa_iocfc_mem_claim(struct bfa_s *bfa, struct bfa_iocfc_cfg_s *cfg,
bfa_meminfo_dma_virt(meminfo) = dm_kva;
bfa_meminfo_dma_phys(meminfo) = dm_pa;
dbgsz = bfa_ioc_debug_trcsz(bfa_auto_recover);
dbgsz = (bfa_auto_recover) ? BFA_DBG_FWTRC_LEN : 0;
if (dbgsz > 0) {
bfa_ioc_debug_memclaim(&bfa->ioc, bfa_meminfo_kva(meminfo));
bfa_meminfo_kva(meminfo) += dbgsz;
......@@ -723,11 +711,11 @@ bfa_iocfc_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len,
u32 *dm_len)
{
/* dma memory for IOC */
*dm_len += bfa_ioc_meminfo();
*dm_len += BFA_ROUNDUP(sizeof(struct bfi_ioc_attr_s), BFA_DMA_ALIGN_SZ);
bfa_iocfc_fw_cfg_sz(cfg, dm_len);
bfa_iocfc_cqs_sz(cfg, dm_len);
*km_len += bfa_ioc_debug_trcsz(bfa_auto_recover);
*km_len += (bfa_auto_recover) ? BFA_DBG_FWTRC_LEN : 0;
}
/*
......@@ -759,22 +747,13 @@ bfa_iocfc_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
bfa_iocfc_init_mem(bfa, bfad, cfg, pcidev);
bfa_iocfc_mem_claim(bfa, cfg, meminfo);
bfa_timer_init(&bfa->timer_mod);
INIT_LIST_HEAD(&bfa->timer_mod.timer_q);
INIT_LIST_HEAD(&bfa->comp_q);
for (i = 0; i < BFI_IOC_MAX_CQS; i++)
INIT_LIST_HEAD(&bfa->reqq_waitq[i]);
}
/*
* Query IOC memory requirement information.
*/
void
bfa_iocfc_detach(struct bfa_s *bfa)
{
bfa_ioc_detach(&bfa->ioc);
}
/*
* Query IOC memory requirement information.
*/
......@@ -1090,79 +1069,7 @@ bfa_detach(struct bfa_s *bfa)
for (i = 0; hal_mods[i]; i++)
hal_mods[i]->detach(bfa);
bfa_iocfc_detach(bfa);
}
void
bfa_init_trc(struct bfa_s *bfa, struct bfa_trc_mod_s *trcmod)
{
bfa->trcmod = trcmod;
}
void
bfa_init_plog(struct bfa_s *bfa, struct bfa_plog_s *plog)
{
bfa->plog = plog;
}
/*
* Initialize IOC.
*
* This function will return immediately, when the IOC initialization is
* completed, the bfa_cb_init() will be called.
*
* @param[in] bfa instance
*
* @return void
*
* Special Considerations:
*
* @note
* When this function returns, the driver should register the interrupt service
* routine(s) and enable the device interrupts. If this is not done,
* bfa_cb_init() will never get called
*/
void
bfa_init(struct bfa_s *bfa)
{
bfa_iocfc_init(bfa);
}
/*
* Use this function initiate the IOC configuration setup. This function
* will return immediately.
*
* @param[in] bfa instance
*
* @return None
*/
void
bfa_start(struct bfa_s *bfa)
{
bfa_iocfc_start(bfa);
}
/*
* Use this function quiese the IOC. This function will return immediately,
* when the IOC is actually stopped, the bfad->comp will be set.
*
* @param[in]bfa - pointer to bfa_t.
*
* @return None
*
* Special Considerations:
* bfad->comp can be set before or after bfa_stop() returns.
*
* @note
* In case of any failure, we could handle it automatically by doing a
* reset and then succeed the bfa_stop() call.
*/
void
bfa_stop(struct bfa_s *bfa)
{
bfa_iocfc_stop(bfa);
bfa_ioc_detach(&bfa->ioc);
}
void
......@@ -1198,20 +1105,6 @@ bfa_comp_free(struct bfa_s *bfa, struct list_head *comp_q)
}
}
void
bfa_attach_fcs(struct bfa_s *bfa)
{
bfa->fcs = BFA_TRUE;
}
/*
* Periodic timer heart beat from driver
*/
void
bfa_timer_tick(struct bfa_s *bfa)
{
bfa_timer_beat(&bfa->timer_mod);
}
/*
* Return the list of PCI vendor/device id lists supported by this
......@@ -1282,51 +1175,3 @@ bfa_cfg_get_min(struct bfa_iocfc_cfg_s *cfg)
cfg->drvcfg.num_rspq_elems = BFA_RSPQ_NELEMS_MIN;
cfg->drvcfg.min_cfg = BFA_TRUE;
}
void
bfa_get_attr(struct bfa_s *bfa, struct bfa_ioc_attr_s *ioc_attr)
{
bfa_ioc_get_attr(&bfa->ioc, ioc_attr);
}
/*
* Retrieve firmware trace information on IOC failure.
*/
bfa_status_t
bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen)
{
return bfa_ioc_debug_fwsave(&bfa->ioc, trcdata, trclen);
}
/*
* Fetch firmware trace data.
*
* @param[in] bfa BFA instance
* @param[out] trcdata Firmware trace buffer
* @param[in,out] trclen Firmware trace buffer len
*
* @retval BFA_STATUS_OK Firmware trace is fetched.
* @retval BFA_STATUS_INPROGRESS Firmware trace fetch is in progress.
*/
bfa_status_t
bfa_debug_fwtrc(struct bfa_s *bfa, void *trcdata, int *trclen)
{
return bfa_ioc_debug_fwtrc(&bfa->ioc, trcdata, trclen);
}
/*
* Dump firmware memory.
*
* @param[in] bfa BFA instance
* @param[out] buf buffer for dump
* @param[in,out] offset smem offset to start read
* @param[in,out] buflen length of buffer
*
* @retval BFA_STATUS_OK Firmware memory is dumped.
* @retval BFA_STATUS_INPROGRESS Firmware memory dump is in progress.
*/
bfa_status_t
bfa_debug_fwcore(struct bfa_s *bfa, void *buf, u32 *offset, int *buflen)
{
return bfa_ioc_debug_fwcore(&bfa->ioc, buf, offset, buflen);
}
......@@ -2567,7 +2567,7 @@ bfa_ioim_notify_cleanup(struct bfa_ioim_s *ioim)
}
bfa_itnim_iodone(ioim->itnim);
} else
bfa_tskim_iodone(ioim->iosp->tskim);
bfa_wc_down(&ioim->iosp->tskim->wc);
}
static bfa_boolean_t
......
This diff is collapsed.
......@@ -26,6 +26,21 @@
#define BFA_FCS_OS_STR_LEN 64
/*
* lps_pvt BFA LPS private functions
*/
enum bfa_lps_event {
BFA_LPS_SM_LOGIN = 1, /* login request from user */
BFA_LPS_SM_LOGOUT = 2, /* logout request from user */
BFA_LPS_SM_FWRSP = 3, /* f/w response to login/logout */
BFA_LPS_SM_RESUME = 4, /* space present in reqq queue */
BFA_LPS_SM_DELETE = 5, /* lps delete from user */
BFA_LPS_SM_OFFLINE = 6, /* Link is offline */
BFA_LPS_SM_RX_CVL = 7, /* Rx clear virtual link */
};
/*
* !!! Only append to the enums defined here to avoid any versioning
* !!! needed between trace utility and driver version
......@@ -41,7 +56,6 @@ enum {
struct bfa_fcs_s;
#define __fcs_min_cfg(__fcs) ((__fcs)->min_cfg)
void bfa_fcs_modexit_comp(struct bfa_fcs_s *fcs);
#define BFA_FCS_BRCD_SWITCH_OUI 0x051e
#define N2N_LOCAL_PID 0x010000
......@@ -444,9 +458,6 @@ void bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport);
struct bfa_fcs_rport_s *bfa_fcs_rport_create(struct bfa_fcs_lport_s *port,
u32 pid);
void bfa_fcs_rport_delete(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_online(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_offline(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_start(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs,
struct fc_logi_s *plogi_rsp);
void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port,
......@@ -454,10 +465,8 @@ void bfa_fcs_rport_plogi_create(struct bfa_fcs_lport_s *port,
struct fc_logi_s *plogi);
void bfa_fcs_rport_plogi(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs,
struct fc_logi_s *plogi);
void bfa_fcs_rport_logo_imp(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_prlo(struct bfa_fcs_rport_s *rport, __be16 ox_id);
void bfa_fcs_rport_itnim_ack(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_itntm_ack(struct bfa_fcs_rport_s *rport);
void bfa_fcs_rport_fcptm_offline_done(struct bfa_fcs_rport_s *rport);
int bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport);
......@@ -647,6 +656,57 @@ struct bfa_fcs_s {
struct bfa_wc_s wc; /* waiting counter */
};
/*
* fcs_fabric_sm fabric state machine functions
*/
/*
* Fabric state machine events
*/
enum bfa_fcs_fabric_event {
BFA_FCS_FABRIC_SM_CREATE = 1, /* create from driver */
BFA_FCS_FABRIC_SM_DELETE = 2, /* delete from driver */
BFA_FCS_FABRIC_SM_LINK_DOWN = 3, /* link down from port */
BFA_FCS_FABRIC_SM_LINK_UP = 4, /* link up from port */
BFA_FCS_FABRIC_SM_CONT_OP = 5, /* flogi/auth continue op */
BFA_FCS_FABRIC_SM_RETRY_OP = 6, /* flogi/auth retry op */
BFA_FCS_FABRIC_SM_NO_FABRIC = 7, /* from flogi/auth */
BFA_FCS_FABRIC_SM_PERF_EVFP = 8, /* from flogi/auth */
BFA_FCS_FABRIC_SM_ISOLATE = 9, /* from EVFP processing */
BFA_FCS_FABRIC_SM_NO_TAGGING = 10, /* no VFT tagging from EVFP */
BFA_FCS_FABRIC_SM_DELAYED = 11, /* timeout delay event */
BFA_FCS_FABRIC_SM_AUTH_FAILED = 12, /* auth failed */
BFA_FCS_FABRIC_SM_AUTH_SUCCESS = 13, /* auth successful */
BFA_FCS_FABRIC_SM_DELCOMP = 14, /* all vports deleted event */
BFA_FCS_FABRIC_SM_LOOPBACK = 15, /* Received our own FLOGI */
BFA_FCS_FABRIC_SM_START = 16, /* from driver */
};
/*
* fcs_rport_sm FCS rport state machine events
*/
enum rport_event {
RPSM_EVENT_PLOGI_SEND = 1, /* new rport; start with PLOGI */
RPSM_EVENT_PLOGI_RCVD = 2, /* Inbound PLOGI from remote port */
RPSM_EVENT_PLOGI_COMP = 3, /* PLOGI completed to rport */
RPSM_EVENT_LOGO_RCVD = 4, /* LOGO from remote device */
RPSM_EVENT_LOGO_IMP = 5, /* implicit logo for SLER */
RPSM_EVENT_FCXP_SENT = 6, /* Frame from has been sent */
RPSM_EVENT_DELETE = 7, /* RPORT delete request */
RPSM_EVENT_SCN = 8, /* state change notification */
RPSM_EVENT_ACCEPTED = 9, /* Good response from remote device */
RPSM_EVENT_FAILED = 10, /* Request to rport failed. */
RPSM_EVENT_TIMEOUT = 11, /* Rport SM timeout event */
RPSM_EVENT_HCB_ONLINE = 12, /* BFA rport online callback */
RPSM_EVENT_HCB_OFFLINE = 13, /* BFA rport offline callback */
RPSM_EVENT_FC4_OFFLINE = 14, /* FC-4 offline complete */
RPSM_EVENT_ADDRESS_CHANGE = 15, /* Rport's PID has changed */
RPSM_EVENT_ADDRESS_DISC = 16, /* Need to Discover rport's PID */
RPSM_EVENT_PRLO_RCVD = 17, /* PRLO from remote device */
RPSM_EVENT_PLOGI_RETRY = 18, /* Retry PLOGI continously */
};
/*
* bfa fcs API functions
*/
......@@ -656,16 +716,12 @@ void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa,
void bfa_fcs_init(struct bfa_fcs_s *fcs);
void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs,
struct bfa_fcs_driver_info_s *driver_info);
void bfa_fcs_set_fdmi_param(struct bfa_fcs_s *fcs, bfa_boolean_t fdmi_enable);
void bfa_fcs_exit(struct bfa_fcs_s *fcs);
void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod);
void bfa_fcs_start(struct bfa_fcs_s *fcs);
/*
* bfa fcs vf public functions
*/
bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id);
u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric);
/*
* fabric protected interface functions
......@@ -679,22 +735,23 @@ void bfa_fcs_fabric_addvport(struct bfa_fcs_fabric_s *fabric,
struct bfa_fcs_vport_s *vport);
void bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric,
struct bfa_fcs_vport_s *vport);
int bfa_fcs_fabric_is_online(struct bfa_fcs_fabric_s *fabric);
struct bfa_fcs_vport_s *bfa_fcs_fabric_vport_lookup(
struct bfa_fcs_fabric_s *fabric, wwn_t pwwn);
void bfa_fcs_fabric_modstart(struct bfa_fcs_s *fcs);
void bfa_fcs_fabric_uf_recv(struct bfa_fcs_fabric_s *fabric,
struct fchs_s *fchs, u16 len);
bfa_boolean_t bfa_fcs_fabric_is_loopback(struct bfa_fcs_fabric_s *fabric);
bfa_boolean_t bfa_fcs_fabric_is_auth_failed(struct bfa_fcs_fabric_s *fabric);
enum bfa_port_type bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric);
void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric);
void bfa_fcs_fabric_port_delete_comp(struct bfa_fcs_fabric_s *fabric);
void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric,
wwn_t fabric_name);
u16 bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric);
void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs);
void bfa_fcs_port_attach(struct bfa_fcs_s *fcs);
void bfa_fcs_fabric_sm_online(struct bfa_fcs_fabric_s *fabric,
enum bfa_fcs_fabric_event event);
void bfa_fcs_fabric_sm_loopback(struct bfa_fcs_fabric_s *fabric,
enum bfa_fcs_fabric_event event);
void bfa_fcs_fabric_sm_auth_failed(struct bfa_fcs_fabric_s *fabric,
enum bfa_fcs_fabric_event event);
/*
* BFA FCS callback interfaces
......
......@@ -103,7 +103,7 @@ bfa_fcs_itnim_sm_offline(struct bfa_fcs_itnim_s *itnim,
break;
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_INITIATOR:
......@@ -140,7 +140,7 @@ bfa_fcs_itnim_sm_prli_send(struct bfa_fcs_itnim_s *itnim,
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcxp_walloc_cancel(itnim->fcs->bfa, &itnim->fcxp_wqe);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_DELETE:
......@@ -181,7 +181,7 @@ bfa_fcs_itnim_sm_prli(struct bfa_fcs_itnim_s *itnim,
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcxp_discard(itnim->fcxp);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_INITIATOR:
......@@ -217,7 +217,7 @@ bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim,
} else {
/* invoke target offline */
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcs_rport_logo_imp(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_LOGO_IMP);
}
break;
......@@ -225,7 +225,7 @@ bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim,
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_timer_stop(&itnim->timer);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_INITIATOR:
......@@ -269,7 +269,7 @@ bfa_fcs_itnim_sm_hcb_online(struct bfa_fcs_itnim_s *itnim,
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_itnim_offline(itnim->bfa_itnim);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_DELETE:
......@@ -330,7 +330,7 @@ bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim,
switch (event) {
case BFA_FCS_ITNIM_SM_HCB_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_DELETE:
......@@ -358,7 +358,7 @@ bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim,
switch (event) {
case BFA_FCS_ITNIM_SM_OFFLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcs_rport_itnim_ack(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE);
break;
case BFA_FCS_ITNIM_SM_RSP_ERROR:
......@@ -688,7 +688,7 @@ bfa_cb_itnim_sler(void *cb_arg)
itnim->stats.sler++;
bfa_trc(itnim->fcs, itnim->rport->pwwn);
bfa_fcs_rport_logo_imp(itnim->rport);
bfa_sm_send_event(itnim->rport, RPSM_EVENT_LOGO_IMP);
}
struct bfa_fcs_itnim_s *
......
......@@ -159,7 +159,7 @@ bfa_fcs_lport_sm_online(
bfa_sm_set_state(port, bfa_fcs_lport_sm_deleting);
list_for_each_safe(qe, qen, &port->rport_q) {
rport = (struct bfa_fcs_rport_s *) qe;
bfa_fcs_rport_delete(rport);
bfa_sm_send_event(rport, RPSM_EVENT_DELETE);
}
}
break;
......@@ -197,7 +197,7 @@ bfa_fcs_lport_sm_offline(
bfa_sm_set_state(port, bfa_fcs_lport_sm_deleting);
list_for_each_safe(qe, qen, &port->rport_q) {
rport = (struct bfa_fcs_rport_s *) qe;
bfa_fcs_rport_delete(rport);
bfa_sm_send_event(rport, RPSM_EVENT_DELETE);
}
}
break;
......@@ -350,7 +350,7 @@ bfa_fcs_lport_plogi(struct bfa_fcs_lport_s *port,
* disappeared. Send implicit LOGO to old device.
*/
bfa_assert(rport->pwwn != plogi->port_name);
bfa_fcs_rport_logo_imp(rport);
bfa_sm_send_event(rport, RPSM_EVENT_LOGO_IMP);
/*
* Inbound PLOGI from a new device (with old PID).
......@@ -511,7 +511,8 @@ bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port)
__port_action[port->fabric->fab_type].offline(port);
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
if (bfa_fcs_fabric_is_online(port->fabric) == BFA_TRUE)
if (bfa_sm_cmp_state(port->fabric,
bfa_fcs_fabric_sm_online) == BFA_TRUE)
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
"Logical port lost fabric connectivity: WWN = %s Role = %s\n",
lpwwn_buf, "Initiator");
......@@ -522,7 +523,7 @@ bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port)
list_for_each_safe(qe, qen, &port->rport_q) {
rport = (struct bfa_fcs_rport_s *) qe;
bfa_fcs_rport_offline(rport);
bfa_sm_send_event(rport, RPSM_EVENT_LOGO_IMP);
}
}
......@@ -584,7 +585,7 @@ bfa_fcs_lport_deleted(struct bfa_fcs_lport_s *port)
port->vport ? port->vport->vport_drv : NULL);
bfa_fcs_vport_delete_comp(port->vport);
} else {
bfa_fcs_fabric_port_delete_comp(port->fabric);
bfa_wc_down(&port->fabric->wc);
}
}
......@@ -828,8 +829,8 @@ bfa_fcs_lport_attach(struct bfa_fcs_lport_s *lport, struct bfa_fcs_s *fcs,
lport->fcs = fcs;
lport->fabric = bfa_fcs_vf_lookup(fcs, vf_id);
lport->vport = vport;
lport->lp_tag = (vport) ? bfa_lps_get_tag(vport->lps) :
bfa_lps_get_tag(lport->fabric->lps);
lport->lp_tag = (vport) ? vport->lps->lp_tag :
lport->fabric->lps->lp_tag;
INIT_LIST_HEAD(&lport->rport_q);
lport->num_rports = 0;
......@@ -881,10 +882,11 @@ bfa_fcs_lport_get_attr(
port_attr->port_cfg = port->port_cfg;
if (port->fabric) {
port_attr->port_type = bfa_fcs_fabric_port_type(port->fabric);
port_attr->loopback = bfa_fcs_fabric_is_loopback(port->fabric);
port_attr->port_type = port->fabric->oper_type;
port_attr->loopback = bfa_sm_cmp_state(port->fabric, bfa_fcs_fabric_sm_loopback);
port_attr->authfail =
bfa_fcs_fabric_is_auth_failed(port->fabric);
bfa_sm_cmp_state(port->fabric,
bfa_fcs_fabric_sm_auth_failed);
port_attr->fabric_name = bfa_fcs_lport_get_fabric_name(port);
memcpy(port_attr->fabric_ip_addr,
bfa_fcs_lport_get_fabric_ipaddr(port),
......@@ -893,10 +895,10 @@ bfa_fcs_lport_get_attr(
if (port->vport != NULL) {
port_attr->port_type = BFA_PORT_TYPE_VPORT;
port_attr->fpma_mac =
bfa_lps_get_lp_mac(port->vport->lps);
port->vport->lps->lp_mac;
} else {
port_attr->fpma_mac =
bfa_lps_get_lp_mac(port->fabric->lps);
port->fabric->lps->lp_mac;
}
} else {
port_attr->port_type = BFA_PORT_TYPE_UNKNOWN;
......@@ -985,7 +987,7 @@ bfa_fcs_lport_n2n_online(struct bfa_fcs_lport_s *port)
bfa_trc(port->fcs, rport->pid);
bfa_trc(port->fcs, rport->pwwn);
rport->pid = N2N_REMOTE_PID;
bfa_fcs_rport_online(rport);
bfa_sm_send_event(rport, RPSM_EVENT_PLOGI_SEND);
return;
}
......@@ -998,7 +1000,7 @@ bfa_fcs_lport_n2n_online(struct bfa_fcs_lport_s *port)
bfa_assert(rport != NULL);
if (rport) {
bfa_trc(port->fcs, rport->pwwn);
bfa_fcs_rport_delete(rport);
bfa_sm_send_event(rport, RPSM_EVENT_DELETE);
}
}
bfa_fcs_rport_create(port, N2N_REMOTE_PID);
......@@ -2540,7 +2542,7 @@ bfa_fcs_lport_ms_send_gmal(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced)
len = fc_gmal_req_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
bfa_fcs_lport_get_fcid(port),
bfa_lps_get_peer_nwwn(port->fabric->lps));
port->fabric->lps->pr_nwwn);
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs,
......@@ -2740,7 +2742,7 @@ bfa_fcs_lport_ms_send_gfn(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced)
len = fc_gfn_req_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
bfa_fcs_lport_get_fcid(port),
bfa_lps_get_peer_nwwn(port->fabric->lps));
port->fabric->lps->pr_nwwn);
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs,
......@@ -4332,8 +4334,8 @@ bfa_fcs_lport_scn_send_scr(void *scn_cbarg, struct bfa_fcxp_s *fcxp_alloced)
/* Handle VU registrations for Base port only */
if ((!port->vport) && bfa_ioc_get_fcmode(&port->fcs->bfa->ioc)) {
len = fc_scr_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
bfa_lps_is_brcd_fabric(port->fabric->lps),
port->pid, 0);
port->fabric->lps->brcd_switch,
port->pid, 0);
} else {
len = fc_scr_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
BFA_FALSE,
......@@ -4833,7 +4835,7 @@ bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
port_info->max_vports_supp =
bfa_lps_get_max_vport(port->fcs->bfa);
port_info->num_vports_inuse =
bfa_fcs_fabric_vport_count(port->fabric);
port->fabric->num_vports;
port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP;
port_info->num_rports_inuse = port->num_rports;
} else {
......@@ -4977,7 +4979,8 @@ bfa_fcs_vport_sm_created(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_START:
if (bfa_fcs_fabric_is_online(__vport_fabric(vport))
if (bfa_sm_cmp_state(__vport_fabric(vport),
bfa_fcs_fabric_sm_online)
&& bfa_fcs_fabric_npiv_capable(__vport_fabric(vport))) {
bfa_sm_set_state(vport, bfa_fcs_vport_sm_fdisc);
bfa_fcs_vport_do_fdisc(vport);
......@@ -5060,13 +5063,13 @@ bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_DELETE:
bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup);
bfa_lps_discard(vport->lps);
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
bfa_fcs_lport_delete(&vport->lport);
break;
case BFA_FCS_VPORT_SM_OFFLINE:
bfa_sm_set_state(vport, bfa_fcs_vport_sm_offline);
bfa_lps_discard(vport->lps);
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
break;
case BFA_FCS_VPORT_SM_RSP_OK:
......@@ -5146,7 +5149,7 @@ bfa_fcs_vport_sm_online(struct bfa_fcs_vport_s *vport,
case BFA_FCS_VPORT_SM_OFFLINE:
bfa_sm_set_state(vport, bfa_fcs_vport_sm_offline);
bfa_lps_discard(vport->lps);
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
bfa_fcs_lport_offline(&vport->lport);
break;
......@@ -5246,7 +5249,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_OFFLINE:
bfa_lps_discard(vport->lps);
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
/*
* !!! fall through !!!
*/
......@@ -5285,14 +5288,14 @@ bfa_fcs_vport_do_fdisc(struct bfa_fcs_vport_s *vport)
static void
bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport)
{
u8 lsrjt_rsn = bfa_lps_get_lsrjt_rsn(vport->lps);
u8 lsrjt_expl = bfa_lps_get_lsrjt_expl(vport->lps);
u8 lsrjt_rsn = vport->lps->lsrjt_rsn;
u8 lsrjt_expl = vport->lps->lsrjt_expl;
bfa_trc(__vport_fcs(vport), lsrjt_rsn);
bfa_trc(__vport_fcs(vport), lsrjt_expl);
/* For certain reason codes, we don't want to retry. */
switch (bfa_lps_get_lsrjt_expl(vport->lps)) {
switch (vport->lps->lsrjt_expl) {
case FC_LS_RJT_EXP_INV_PORT_NAME: /* by brocade */
case FC_LS_RJT_EXP_INVALID_NPORT_ID: /* by Cisco */
if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES)
......@@ -5456,7 +5459,7 @@ bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, struct bfa_fcs_s *fcs,
if (bfa_fcs_vport_lookup(fcs, vf_id, vport_cfg->pwwn) != NULL)
return BFA_STATUS_VPORT_EXISTS;
if (bfa_fcs_fabric_vport_count(&fcs->fabric) ==
if (fcs->fabric.num_vports ==
bfa_lps_get_max_vport(fcs->bfa))
return BFA_STATUS_VPORT_MAX;
......@@ -5637,7 +5640,7 @@ bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status)
/*
* Initialiaze the V-Port fields
*/
__vport_fcid(vport) = bfa_lps_get_pid(vport->lps);
__vport_fcid(vport) = vport->lps->lp_pid;
vport->vport_stats.fdisc_accepts++;
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_OK);
break;
......@@ -5650,7 +5653,7 @@ bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status)
break;
case BFA_STATUS_EPROTOCOL:
switch (bfa_lps_get_extstatus(vport->lps)) {
switch (vport->lps->ext_status) {
case BFA_EPROTO_BAD_ACCEPT:
vport->vport_stats.fdisc_acc_bad++;
break;
......
......@@ -75,30 +75,6 @@ static void bfa_fcs_rport_send_ls_rjt(struct bfa_fcs_rport_s *rport,
static void bfa_fcs_rport_process_adisc(struct bfa_fcs_rport_s *rport,
struct fchs_s *rx_fchs, u16 len);
static void bfa_fcs_rport_send_prlo_acc(struct bfa_fcs_rport_s *rport);
/*
* fcs_rport_sm FCS rport state machine events
*/
enum rport_event {
RPSM_EVENT_PLOGI_SEND = 1, /* new rport; start with PLOGI */
RPSM_EVENT_PLOGI_RCVD = 2, /* Inbound PLOGI from remote port */
RPSM_EVENT_PLOGI_COMP = 3, /* PLOGI completed to rport */
RPSM_EVENT_LOGO_RCVD = 4, /* LOGO from remote device */
RPSM_EVENT_LOGO_IMP = 5, /* implicit logo for SLER */
RPSM_EVENT_FCXP_SENT = 6, /* Frame from has been sent */
RPSM_EVENT_DELETE = 7, /* RPORT delete request */
RPSM_EVENT_SCN = 8, /* state change notification */
RPSM_EVENT_ACCEPTED = 9, /* Good response from remote device */
RPSM_EVENT_FAILED = 10, /* Request to rport failed. */
RPSM_EVENT_TIMEOUT = 11, /* Rport SM timeout event */
RPSM_EVENT_HCB_ONLINE = 12, /* BFA rport online callback */
RPSM_EVENT_HCB_OFFLINE = 13, /* BFA rport offline callback */
RPSM_EVENT_FC4_OFFLINE = 14, /* FC-4 offline complete */
RPSM_EVENT_ADDRESS_CHANGE = 15, /* Rport's PID has changed */
RPSM_EVENT_ADDRESS_DISC = 16, /* Need to Discover rport's PID */
RPSM_EVENT_PRLO_RCVD = 17, /* PRLO from remote device */
RPSM_EVENT_PLOGI_RETRY = 18, /* Retry PLOGI continously */
};
static void bfa_fcs_rport_sm_uninit(struct bfa_fcs_rport_s *rport,
enum rport_event event);
......@@ -498,24 +474,24 @@ bfa_fcs_rport_sm_hal_online(struct bfa_fcs_rport_s *rport,
case RPSM_EVENT_LOGO_RCVD:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_logorcv);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
case RPSM_EVENT_LOGO_IMP:
case RPSM_EVENT_ADDRESS_CHANGE:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_offline);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
case RPSM_EVENT_PLOGI_RCVD:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_plogiacc_sending);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
bfa_fcs_rport_send_plogiacc(rport, NULL);
break;
case RPSM_EVENT_DELETE:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_logosend);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
case RPSM_EVENT_SCN:
......@@ -824,7 +800,7 @@ bfa_fcs_rport_sm_fc4_logorcv(struct bfa_fcs_rport_s *rport,
switch (event) {
case RPSM_EVENT_FC4_OFFLINE:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_logorcv);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
case RPSM_EVENT_DELETE:
......@@ -856,7 +832,7 @@ bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport,
switch (event) {
case RPSM_EVENT_FC4_OFFLINE:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_logosend);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
default:
......@@ -878,7 +854,7 @@ bfa_fcs_rport_sm_fc4_offline(struct bfa_fcs_rport_s *rport,
switch (event) {
case RPSM_EVENT_FC4_OFFLINE:
bfa_sm_set_state(rport, bfa_fcs_rport_sm_hcb_offline);
bfa_rport_offline(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_OFFLINE);
break;
case RPSM_EVENT_SCN:
......@@ -1459,7 +1435,7 @@ bfa_fcs_rport_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg,
twin->stats.plogi_rcvd += rport->stats.plogi_rcvd;
twin->stats.plogi_accs++;
bfa_fcs_rport_delete(rport);
bfa_sm_send_event(rport, RPSM_EVENT_DELETE);
bfa_fcs_rport_update(twin, plogi_rsp);
twin->pid = rsp_fchs->s_id;
......@@ -1998,7 +1974,7 @@ bfa_fcs_rport_alloc(struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 rpid)
rport->itnim = bfa_fcs_itnim_create(rport);
if (!rport->itnim) {
bfa_trc(fcs, rpid);
bfa_rport_delete(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_DELETE);
kfree(rport_drv);
return NULL;
}
......@@ -2032,7 +2008,7 @@ bfa_fcs_rport_free(struct bfa_fcs_rport_s *rport)
bfa_fcs_rpf_rport_offline(rport);
}
bfa_rport_delete(rport->bfa_rport);
bfa_sm_send_event(rport->bfa_rport, BFA_RPORT_SM_DELETE);
bfa_fcs_lport_del_rport(port, rport);
kfree(rport->rp_drv);
}
......@@ -2307,39 +2283,7 @@ bfa_fcs_rport_plogi(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs,
bfa_sm_send_event(rport, RPSM_EVENT_PLOGI_RCVD);
}
/*
* Called by bport/vport to delete a remote port instance.
*
* Rport delete is called under the following conditions:
* - vport is deleted
* - vf is deleted
* - explicit request from OS to delete rport
*/
void
bfa_fcs_rport_delete(struct bfa_fcs_rport_s *rport)
{
bfa_sm_send_event(rport, RPSM_EVENT_DELETE);
}
/*
* Called by bport/vport to when a target goes offline.
*
*/
void
bfa_fcs_rport_offline(struct bfa_fcs_rport_s *rport)
{
bfa_sm_send_event(rport, RPSM_EVENT_LOGO_IMP);
}
/*
* Called by bport in n2n when a target (attached port) becomes online.
*
*/
void
bfa_fcs_rport_online(struct bfa_fcs_rport_s *rport)
{
bfa_sm_send_event(rport, RPSM_EVENT_PLOGI_SEND);
}
/*
* Called by bport/vport to notify SCN for the remote port
*/
......@@ -2350,15 +2294,6 @@ bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport)
bfa_sm_send_event(rport, RPSM_EVENT_SCN);
}
/*
* Called by fcpim to notify that the ITN cleanup is done.
*/
void
bfa_fcs_rport_itnim_ack(struct bfa_fcs_rport_s *rport)
{
bfa_sm_send_event(rport, RPSM_EVENT_FC4_OFFLINE);
}
/*
* brief
......@@ -2453,15 +2388,6 @@ bfa_cb_rport_qos_scn_prio(void *cbarg,
bfa_trc(rport->fcs, rport->pwwn);
}
/*
* Called to process any unsolicted frames from this remote port
*/
void
bfa_fcs_rport_logo_imp(struct bfa_fcs_rport_s *rport)
{
bfa_sm_send_event(rport, RPSM_EVENT_LOGO_IMP);
}
/*
* Called to process any unsolicted frames from this remote port
*/
......@@ -2578,6 +2504,7 @@ bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport)
return bfa_sm_to_state(rport_sm_table, rport->sm);
}
/*
* brief
* Called by the Driver to set rport delete/ageout timeout
......@@ -2703,7 +2630,7 @@ bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event)
case RPFSM_EVENT_RPORT_ONLINE:
/* Send RPSC2 to a Brocade fabric only. */
if ((!BFA_FCS_PID_IS_WKA(rport->pid)) &&
((bfa_lps_is_brcd_fabric(rport->port->fabric->lps)) ||
((rport->port->fabric->lps->brcd_switch) ||
(bfa_fcs_fabric_get_switch_oui(fabric) ==
BFA_FCS_BRCD_SWITCH_OUI))) {
bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending);
......
This diff is collapsed.
......@@ -22,6 +22,11 @@
#include "bfa_cs.h"
#include "bfi.h"
#define BFA_DBG_FWTRC_ENTS (BFI_IOC_TRC_ENTS)
#define BFA_DBG_FWTRC_LEN \
(BFA_DBG_FWTRC_ENTS * sizeof(struct bfa_trc_s) + \
(sizeof(struct bfa_trc_mod_s) - \
BFA_TRC_MAX * sizeof(struct bfa_trc_s)))
/*
* BFA timer declarations
*/
......@@ -47,7 +52,6 @@ struct bfa_timer_mod_s {
#define BFA_TIMER_FREQ 200 /* specified in millisecs */
void bfa_timer_beat(struct bfa_timer_mod_s *mod);
void bfa_timer_init(struct bfa_timer_mod_s *mod);
void bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer,
bfa_timer_cbfn_t timercb, void *arg,
unsigned int timeout);
......@@ -325,7 +329,6 @@ void bfa_ioc_auto_recover(bfa_boolean_t auto_recover);
void bfa_ioc_detach(struct bfa_ioc_s *ioc);
void bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev,
enum bfi_mclass mc);
u32 bfa_ioc_meminfo(void);
void bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa);
void bfa_ioc_enable(struct bfa_ioc_s *ioc);
void bfa_ioc_disable(struct bfa_ioc_s *ioc);
......@@ -353,7 +356,6 @@ enum bfa_ioc_state bfa_ioc_get_state(struct bfa_ioc_s *ioc);
void bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr);
void bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc,
struct bfa_adapter_attr_s *ad_attr);
int bfa_ioc_debug_trcsz(bfa_boolean_t auto_recover);
void bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave);
bfa_status_t bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata,
int *trclen);
......@@ -361,15 +363,9 @@ 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);
u32 bfa_ioc_smem_pgnum(struct bfa_ioc_s *ioc, u32 fmaddr);
u32 bfa_ioc_smem_pgoff(struct bfa_ioc_s *ioc, u32 fmaddr);
void bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc);
bfa_boolean_t bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc);
void bfa_ioc_hbfail_register(struct bfa_ioc_s *ioc,
struct bfa_ioc_hbfail_notify_s *notify);
bfa_boolean_t bfa_ioc_sem_get(void __iomem *sem_reg);
void bfa_ioc_sem_release(void __iomem *sem_reg);
void bfa_ioc_hw_sem_release(struct bfa_ioc_s *ioc);
void bfa_ioc_fwver_get(struct bfa_ioc_s *ioc,
struct bfi_ioc_image_hdr_s *fwhdr);
bfa_boolean_t bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc,
......@@ -380,13 +376,8 @@ bfa_status_t bfa_ioc_fw_stats_clear(struct bfa_ioc_s *ioc);
/*
* bfa mfg wwn API functions
*/
wwn_t bfa_ioc_get_pwwn(struct bfa_ioc_s *ioc);
wwn_t bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc);
mac_t bfa_ioc_get_mac(struct bfa_ioc_s *ioc);
wwn_t bfa_ioc_get_mfg_pwwn(struct bfa_ioc_s *ioc);
wwn_t bfa_ioc_get_mfg_nwwn(struct bfa_ioc_s *ioc);
mac_t bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc);
u64 bfa_ioc_get_adid(struct bfa_ioc_s *ioc);
/*
* F/W Image Size & Chunk
......
......@@ -181,7 +181,7 @@ bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc)
* will lock it instead of clearing it.
*/
readl(ioc->ioc_regs.ioc_sem_reg);
bfa_ioc_hw_sem_release(ioc);
writel(1, ioc->ioc_regs.ioc_sem_reg);
}
......
......@@ -83,7 +83,7 @@ bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc)
*/
if (usecnt == 0) {
writel(1, ioc->ioc_regs.ioc_usage_reg);
bfa_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
writel(1, ioc->ioc_regs.ioc_usage_sem_reg);
bfa_trc(ioc, usecnt);
return BFA_TRUE;
}
......@@ -101,7 +101,7 @@ bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc)
*/
bfa_ioc_fwver_get(ioc, &fwhdr);
if (!bfa_ioc_fwver_cmp(ioc, &fwhdr)) {
bfa_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
writel(1, ioc->ioc_regs.ioc_usage_sem_reg);
bfa_trc(ioc, usecnt);
return BFA_FALSE;
}
......@@ -111,7 +111,7 @@ bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc)
*/
usecnt++;
writel(usecnt, ioc->ioc_regs.ioc_usage_reg);
bfa_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
writel(1, ioc->ioc_regs.ioc_usage_sem_reg);
bfa_trc(ioc, usecnt);
return BFA_TRUE;
}
......@@ -145,7 +145,7 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc)
writel(usecnt, ioc->ioc_regs.ioc_usage_reg);
bfa_trc(ioc, usecnt);
bfa_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
writel(1, ioc->ioc_regs.ioc_usage_sem_reg);
}
/*
......@@ -313,7 +313,7 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc)
if (ioc->cna) {
bfa_ioc_sem_get(ioc->ioc_regs.ioc_usage_sem_reg);
writel(0, ioc->ioc_regs.ioc_usage_reg);
bfa_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
writel(1, ioc->ioc_regs.ioc_usage_sem_reg);
}
/*
......@@ -322,7 +322,7 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc)
* will lock it instead of clearing it.
*/
readl(ioc->ioc_regs.ioc_sem_reg);
bfa_ioc_hw_sem_release(ioc);
writel(1, ioc->ioc_regs.ioc_sem_reg);
}
......
......@@ -151,6 +151,5 @@ void bfa_plog_fchdr(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
void bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
enum bfa_plog_eid event, u16 misc,
struct fchs_s *fchdr, u32 pld_w0);
bfa_boolean_t bfa_plog_get_setting(struct bfa_plog_s *plog);
#endif /* __BFA_PORTLOG_H__ */
......@@ -447,7 +447,7 @@ bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc,
bfa_ioc_mbox_regisr(port->ioc, BFI_MC_PORT, bfa_port_isr, port);
bfa_ioc_hbfail_init(&port->hbfail, bfa_port_hbfail, port);
bfa_ioc_hbfail_register(port->ioc, &port->hbfail);
list_add_tail(&port->hbfail.qe, &port->ioc->hb_notify_q);
/*
* initialize time stamp for stats reset
......
......@@ -41,19 +41,6 @@ BFA_MODULE(uf);
#define BFA_LPS_MAX_VPORTS_SUPP_CB 255
#define BFA_LPS_MAX_VPORTS_SUPP_CT 190
/*
* lps_pvt BFA LPS private functions
*/
enum bfa_lps_event {
BFA_LPS_SM_LOGIN = 1, /* login request from user */
BFA_LPS_SM_LOGOUT = 2, /* logout request from user */
BFA_LPS_SM_FWRSP = 3, /* f/w response to login/logout */
BFA_LPS_SM_RESUME = 4, /* space present in reqq queue */
BFA_LPS_SM_DELETE = 5, /* lps delete from user */
BFA_LPS_SM_OFFLINE = 6, /* Link is offline */
BFA_LPS_SM_RX_CVL = 7, /* Rx clear virtual link */
};
/*
* FC PORT related definitions
......@@ -113,19 +100,6 @@ enum bfa_fcport_ln_sm_event {
} \
} while (0)
enum bfa_rport_event {
BFA_RPORT_SM_CREATE = 1, /* rport create event */
BFA_RPORT_SM_DELETE = 2, /* deleting an existing rport */
BFA_RPORT_SM_ONLINE = 3, /* rport is online */
BFA_RPORT_SM_OFFLINE = 4, /* rport is offline */
BFA_RPORT_SM_FWRSP = 5, /* firmware response */
BFA_RPORT_SM_HWFAIL = 6, /* IOC h/w failure */
BFA_RPORT_SM_QOS_SCN = 7, /* QoS SCN from firmware */
BFA_RPORT_SM_SET_SPEED = 8, /* Set Rport Speed */
BFA_RPORT_SM_QRESUME = 9, /* space in requeue queue */
};
/*
* forward declarations FCXP related functions
*/
......@@ -438,12 +412,6 @@ bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
}
bfa_boolean_t
bfa_plog_get_setting(struct bfa_plog_s *plog)
{
return (bfa_boolean_t)plog->plog_enabled;
}
/*
* fcxp_pvt BFA FCXP private functions
*/
......@@ -1846,24 +1814,6 @@ bfa_lps_fdisclogo(struct bfa_lps_s *lps)
bfa_sm_send_event(lps, BFA_LPS_SM_LOGOUT);
}
/*
* Discard a pending login request -- should be called only for
* link down handling.
*/
void
bfa_lps_discard(struct bfa_lps_s *lps)
{
bfa_sm_send_event(lps, BFA_LPS_SM_OFFLINE);
}
/*
* Return lport services tag
*/
u8
bfa_lps_get_tag(struct bfa_lps_s *lps)
{
return lps->lp_tag;
}
/*
* Return lport services tag given the pid
......@@ -1884,55 +1834,6 @@ bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid)
return 0;
}
/*
* return if fabric login indicates support for NPIV
*/
bfa_boolean_t
bfa_lps_is_npiv_en(struct bfa_lps_s *lps)
{
return lps->npiv_en;
}
/*
* Return TRUE if attached to F-Port, else return FALSE
*/
bfa_boolean_t
bfa_lps_is_fport(struct bfa_lps_s *lps)
{
return lps->fport;
}
/*
* Return TRUE if attached to a Brocade Fabric
*/
bfa_boolean_t
bfa_lps_is_brcd_fabric(struct bfa_lps_s *lps)
{
return lps->brcd_switch;
}
/*
* return TRUE if authentication is required
*/
bfa_boolean_t
bfa_lps_is_authreq(struct bfa_lps_s *lps)
{
return lps->auth_req;
}
bfa_eproto_status_t
bfa_lps_get_extstatus(struct bfa_lps_s *lps)
{
return lps->ext_status;
}
/*
* return port id assigned to the lport
*/
u32
bfa_lps_get_pid(struct bfa_lps_s *lps)
{
return lps->lp_pid;
}
/*
* return port id assigned to the base lport
......@@ -1945,60 +1846,6 @@ bfa_lps_get_base_pid(struct bfa_s *bfa)
return BFA_LPS_FROM_TAG(mod, 0)->lp_pid;
}
/*
* Return bb_credit assigned in FLOGI response
*/
u16
bfa_lps_get_peer_bbcredit(struct bfa_lps_s *lps)
{
return lps->pr_bbcred;
}
/*
* Return peer port name
*/
wwn_t
bfa_lps_get_peer_pwwn(struct bfa_lps_s *lps)
{
return lps->pr_pwwn;
}
/*
* Return peer node name
*/
wwn_t
bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps)
{
return lps->pr_nwwn;
}
/*
* return reason code if login request is rejected
*/
u8
bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps)
{
return lps->lsrjt_rsn;
}
/*
* return explanation code if login request is rejected
*/
u8
bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps)
{
return lps->lsrjt_expl;
}
/*
* Return fpma/spma MAC for lport
*/
mac_t
bfa_lps_get_lp_mac(struct bfa_lps_s *lps)
{
return lps->lp_mac;
}
/*
* LPS firmware message class handler.
*/
......@@ -3064,8 +2911,8 @@ bfa_fcport_send_disable(struct bfa_fcport_s *fcport)
static void
bfa_fcport_set_wwns(struct bfa_fcport_s *fcport)
{
fcport->pwwn = bfa_ioc_get_pwwn(&fcport->bfa->ioc);
fcport->nwwn = bfa_ioc_get_nwwn(&fcport->bfa->ioc);
fcport->pwwn = fcport->bfa->ioc.attr->pwwn;
fcport->nwwn = fcport->bfa->ioc.attr->nwwn;
bfa_trc(fcport->bfa, fcport->pwwn);
bfa_trc(fcport->bfa, fcport->nwwn);
......@@ -3707,8 +3554,8 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
attr->nwwn = fcport->nwwn;
attr->pwwn = fcport->pwwn;
attr->factorypwwn = bfa_ioc_get_mfg_pwwn(&bfa->ioc);
attr->factorynwwn = bfa_ioc_get_mfg_nwwn(&bfa->ioc);
attr->factorypwwn = bfa->ioc.attr->mfg_pwwn;
attr->factorynwwn = bfa->ioc.attr->mfg_nwwn;
memcpy(&attr->pport_cfg, &fcport->cfg,
sizeof(struct bfa_port_cfg_s));
......@@ -3726,7 +3573,7 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
/* beacon attributes */
attr->beacon = fcport->beacon;
attr->link_e2e_beacon = fcport->link_e2e_beacon;
attr->plog_enabled = bfa_plog_get_setting(fcport->bfa->plog);
attr->plog_enabled = (bfa_boolean_t)fcport->bfa->plog->plog_enabled;
attr->io_profile = bfa_fcpim_get_io_profile(fcport->bfa);
attr->pport_cfg.path_tov = bfa_fcpim_path_tov_get(bfa);
......@@ -4584,7 +4431,7 @@ bfa_rport_create(struct bfa_s *bfa, void *rport_drv)
rp->bfa = bfa;
rp->rport_drv = rport_drv;
bfa_rport_clear_stats(rp);
memset(&rp->stats, 0, sizeof(rp->stats));
bfa_assert(bfa_sm_cmp_state(rp, bfa_rport_sm_uninit));
bfa_sm_send_event(rp, BFA_RPORT_SM_CREATE);
......@@ -4592,12 +4439,6 @@ bfa_rport_create(struct bfa_s *bfa, void *rport_drv)
return rp;
}
void
bfa_rport_delete(struct bfa_rport_s *rport)
{
bfa_sm_send_event(rport, BFA_RPORT_SM_DELETE);
}
void
bfa_rport_online(struct bfa_rport_s *rport, struct bfa_rport_info_s *rport_info)
{
......@@ -4616,12 +4457,6 @@ bfa_rport_online(struct bfa_rport_s *rport, struct bfa_rport_info_s *rport_info)
bfa_sm_send_event(rport, BFA_RPORT_SM_ONLINE);
}
void
bfa_rport_offline(struct bfa_rport_s *rport)
{
bfa_sm_send_event(rport, BFA_RPORT_SM_OFFLINE);
}
void
bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed)
{
......@@ -4632,12 +4467,6 @@ bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed)
bfa_sm_send_event(rport, BFA_RPORT_SM_SET_SPEED);
}
void
bfa_rport_clear_stats(struct bfa_rport_s *rport)
{
memset(&rport->stats, 0, sizeof(rport->stats));
}
/*
* SGPG related functions
......@@ -5101,8 +4930,6 @@ bfa_uf_start(struct bfa_s *bfa)
bfa_uf_post_all(BFA_UF_MOD(bfa));
}
/*
* hal_uf_api
*/
......
......@@ -220,6 +220,18 @@ void bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
/*
* RPORT related defines
*/
enum bfa_rport_event {
BFA_RPORT_SM_CREATE = 1, /* rport create event */
BFA_RPORT_SM_DELETE = 2, /* deleting an existing rport */
BFA_RPORT_SM_ONLINE = 3, /* rport is online */
BFA_RPORT_SM_OFFLINE = 4, /* rport is offline */
BFA_RPORT_SM_FWRSP = 5, /* firmware response */
BFA_RPORT_SM_HWFAIL = 6, /* IOC h/w failure */
BFA_RPORT_SM_QOS_SCN = 7, /* QoS SCN from firmware */
BFA_RPORT_SM_SET_SPEED = 8, /* Set Rport Speed */
BFA_RPORT_SM_QRESUME = 9, /* space in requeue queue */
};
#define BFA_RPORT_MIN 4
struct bfa_rport_mod_s {
......@@ -516,12 +528,9 @@ bfa_boolean_t bfa_fcport_is_qos_enabled(struct bfa_s *bfa);
* bfa rport API functions
*/
struct bfa_rport_s *bfa_rport_create(struct bfa_s *bfa, void *rport_drv);
void bfa_rport_delete(struct bfa_rport_s *rport);
void bfa_rport_online(struct bfa_rport_s *rport,
struct bfa_rport_info_s *rport_info);
void bfa_rport_offline(struct bfa_rport_s *rport);
void bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed);
void bfa_rport_clear_stats(struct bfa_rport_s *rport);
void bfa_cb_rport_online(void *rport);
void bfa_cb_rport_offline(void *rport);
void bfa_cb_rport_qos_scn_flowid(void *rport,
......@@ -594,28 +603,14 @@ void bfa_uf_free(struct bfa_uf_s *uf);
u32 bfa_lps_get_max_vport(struct bfa_s *bfa);
struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa);
void bfa_lps_delete(struct bfa_lps_s *lps);
void bfa_lps_discard(struct bfa_lps_s *lps);
void bfa_lps_flogi(struct bfa_lps_s *lps, void *uarg, u8 alpa,
u16 pdusz, wwn_t pwwn, wwn_t nwwn,
bfa_boolean_t auth_en);
void bfa_lps_fdisc(struct bfa_lps_s *lps, void *uarg, u16 pdusz,
wwn_t pwwn, wwn_t nwwn);
void bfa_lps_fdisclogo(struct bfa_lps_s *lps);
u8 bfa_lps_get_tag(struct bfa_lps_s *lps);
bfa_boolean_t bfa_lps_is_npiv_en(struct bfa_lps_s *lps);
bfa_boolean_t bfa_lps_is_fport(struct bfa_lps_s *lps);
bfa_boolean_t bfa_lps_is_brcd_fabric(struct bfa_lps_s *lps);
bfa_boolean_t bfa_lps_is_authreq(struct bfa_lps_s *lps);
bfa_eproto_status_t bfa_lps_get_extstatus(struct bfa_lps_s *lps);
u32 bfa_lps_get_pid(struct bfa_lps_s *lps);
u32 bfa_lps_get_base_pid(struct bfa_s *bfa);
u8 bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid);
u16 bfa_lps_get_peer_bbcredit(struct bfa_lps_s *lps);
wwn_t bfa_lps_get_peer_pwwn(struct bfa_lps_s *lps);
wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps);
u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps);
u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps);
mac_t bfa_lps_get_lp_mac(struct bfa_lps_s *lps);
void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status);
void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status);
void bfa_cb_lps_fdisclogo_comp(void *bfad, void *uarg);
......
......@@ -206,7 +206,7 @@ bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event)
}
spin_lock_irqsave(&bfad->bfad_lock, flags);
bfa_init(&bfad->bfa);
bfa_iocfc_init(&bfad->bfa);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
/* Set up interrupt handler for each vectors */
......@@ -725,7 +725,7 @@ bfad_bfa_tmo(unsigned long data)
spin_lock_irqsave(&bfad->bfad_lock, flags);
bfa_timer_tick(&bfad->bfa);
bfa_timer_beat(&bfad->bfa.timer_mod);
bfa_comp_deq(&bfad->bfa, &doneq);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
......@@ -882,8 +882,8 @@ bfad_drv_init(struct bfad_s *bfad)
goto out_hal_mem_alloc_failure;
}
bfa_init_trc(&bfad->bfa, bfad->trcmod);
bfa_init_plog(&bfad->bfa, &bfad->plog_buf);
bfad->bfa.trcmod = bfad->trcmod;
bfad->bfa.plog = &bfad->plog_buf;
bfa_plog_init(&bfad->plog_buf);
bfa_plog_str(&bfad->plog_buf, BFA_PL_MID_DRVR, BFA_PL_EID_DRIVER_START,
0, "Driver Attach");
......@@ -893,9 +893,9 @@ bfad_drv_init(struct bfad_s *bfad)
/* FCS INIT */
spin_lock_irqsave(&bfad->bfad_lock, flags);
bfa_fcs_trc_init(&bfad->bfa_fcs, bfad->trcmod);
bfad->bfa_fcs.trcmod = bfad->trcmod;
bfa_fcs_attach(&bfad->bfa_fcs, &bfad->bfa, bfad, BFA_FALSE);
bfa_fcs_set_fdmi_param(&bfad->bfa_fcs, fdmi_enable);
bfad->bfa_fcs.fdmi_enabled = fdmi_enable;
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
bfad->bfad_flags |= BFAD_DRV_INIT_DONE;
......@@ -913,7 +913,7 @@ bfad_drv_uninit(struct bfad_s *bfad)
spin_lock_irqsave(&bfad->bfad_lock, flags);
init_completion(&bfad->comp);
bfa_stop(&bfad->bfa);
bfa_iocfc_stop(&bfad->bfa);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
wait_for_completion(&bfad->comp);
......@@ -932,8 +932,8 @@ bfad_drv_start(struct bfad_s *bfad)
unsigned long flags;
spin_lock_irqsave(&bfad->bfad_lock, flags);
bfa_start(&bfad->bfa);
bfa_fcs_start(&bfad->bfa_fcs);
bfa_iocfc_start(&bfad->bfa);
bfa_fcs_fabric_modstart(&bfad->bfa_fcs);
bfad->bfad_flags |= BFAD_HAL_START_DONE;
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
......@@ -963,7 +963,7 @@ bfad_stop(struct bfad_s *bfad)
spin_lock_irqsave(&bfad->bfad_lock, flags);
init_completion(&bfad->comp);
bfa_stop(&bfad->bfa);
bfa_iocfc_stop(&bfad->bfa);
bfad->bfad_flags &= ~BFAD_HAL_START_DONE;
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
wait_for_completion(&bfad->comp);
......@@ -1524,7 +1524,7 @@ bfad_init(void)
if (strcmp(FCPI_NAME, " fcpim") == 0)
supported_fc4s |= BFA_LPORT_ROLE_FCP_IM;
bfa_ioc_auto_recover(ioc_auto_recover);
bfa_auto_recover = ioc_auto_recover;
bfa_fcs_rport_set_del_timeout(rport_del_timeout);
error = pci_register_driver(&bfad_pci_driver);
......
......@@ -90,7 +90,7 @@ bfad_debugfs_open_fwtrc(struct inode *inode, struct file *file)
memset(fw_debug->debug_buffer, 0, fw_debug->buffer_len);
spin_lock_irqsave(&bfad->bfad_lock, flags);
rc = bfa_debug_fwtrc(&bfad->bfa,
rc = bfa_ioc_debug_fwtrc(&bfad->bfa.ioc,
fw_debug->debug_buffer,
&fw_debug->buffer_len);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
......@@ -134,7 +134,7 @@ bfad_debugfs_open_fwsave(struct inode *inode, struct file *file)
memset(fw_debug->debug_buffer, 0, fw_debug->buffer_len);
spin_lock_irqsave(&bfad->bfad_lock, flags);
rc = bfa_debug_fwsave(&bfad->bfa,
rc = bfa_ioc_debug_fwsave(&bfad->bfa.ioc,
fw_debug->debug_buffer,
&fw_debug->buffer_len);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
......
......@@ -922,7 +922,7 @@ bfad_im_supported_speeds(struct bfa_s *bfa)
if (!ioc_attr)
return 0;
bfa_get_attr(bfa, ioc_attr);
bfa_ioc_get_attr(&bfa->ioc, ioc_attr);
if (ioc_attr->adapter_attr.max_speed == BFA_PORT_SPEED_8GBPS) {
if (ioc_attr->adapter_attr.is_mezz) {
supported_speed |= FC_PORTSPEED_8GBIT |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment