ocs_fc: clean up empty lines in .c and .h files
This commit is contained in:
parent
f9874fbbf1
commit
98d835ae88
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365186
@ -36,7 +36,6 @@
|
||||
* OCS bsd driver common include file
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_H__)
|
||||
#define __OCS_H__
|
||||
|
||||
@ -103,7 +102,6 @@ typedef struct ocs_fcport_s {
|
||||
*/
|
||||
|
||||
struct ocs_softc {
|
||||
|
||||
device_t dev;
|
||||
struct cdev *cdev;
|
||||
|
||||
@ -197,7 +195,6 @@ struct ocs_softc {
|
||||
uint32_t config_tgt:1, /**< Configured to support target mode */
|
||||
config_ini:1; /**< Configured to support initiator mode */
|
||||
|
||||
|
||||
uint32_t nodedb_mask; /**< Node debugging mask */
|
||||
|
||||
char modeldesc[64];
|
||||
@ -218,7 +215,7 @@ struct ocs_softc {
|
||||
|
||||
bool attached;
|
||||
struct mtx dbg_lock;
|
||||
|
||||
|
||||
struct cam_devq *devq;
|
||||
ocs_fcport *fcports;
|
||||
|
||||
|
@ -132,7 +132,7 @@ ocs_attach_port(ocs_t *ocs, int chan)
|
||||
cam_sim_free(sim, FALSE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
fcp->ocs = ocs;
|
||||
fcp->sim = sim;
|
||||
fcp->path = path;
|
||||
@ -171,7 +171,7 @@ ocs_detach_port(ocs_t *ocs, int32_t chan)
|
||||
fcp->sim = NULL;
|
||||
mtx_unlock(&ocs->sim_lock);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ ocs_cam_attach(ocs_t *ocs)
|
||||
goto detach_port;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ocs->io_high_watermark = max_io;
|
||||
ocs->io_in_use = 0;
|
||||
return 0;
|
||||
@ -323,7 +323,6 @@ ocs_scsi_tgt_del_domain(ocs_domain_t *domain)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup scsi_api_target
|
||||
* @brief accept new sli port (sport) notification
|
||||
@ -493,7 +492,6 @@ ocs_scsi_del_initiator(ocs_node_t *node, ocs_scsi_del_initiator_reason_e reason)
|
||||
adc->arrived = 0;
|
||||
xpt_async(AC_CONTRACT, fcp->path, &ac);
|
||||
|
||||
|
||||
if (reason == OCS_SCSI_INITIATOR_MISSING) {
|
||||
return OCS_SCSI_CALL_COMPLETE;
|
||||
}
|
||||
@ -566,7 +564,6 @@ int32_t ocs_scsi_recv_cmd(ocs_io_t *io, uint64_t lun, uint8_t *cdb,
|
||||
}
|
||||
|
||||
if (atio) {
|
||||
|
||||
STAILQ_REMOVE_HEAD(&trsrc->atio, sim_links.stqe);
|
||||
|
||||
atio->ccb_h.status = CAM_CDB_RECVD;
|
||||
@ -699,7 +696,6 @@ int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lun, ocs_scsi_tmf_cmd_e cmd,
|
||||
goto ocs_scsi_recv_tmf_out;
|
||||
}
|
||||
|
||||
|
||||
tmfio->tgt_io.app = abortio;
|
||||
|
||||
STAILQ_REMOVE_HEAD(&trsrc->inot, sim_links.stqe);
|
||||
@ -773,7 +769,7 @@ int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lun, ocs_scsi_tmf_cmd_e cmd,
|
||||
abortio->tgt_io.flags |= OCS_CAM_IO_F_ABORT_DEV;
|
||||
rc = ocs_scsi_tgt_abort_io(abortio, ocs_io_abort_cb, tmfio);
|
||||
}
|
||||
|
||||
|
||||
ocs_scsi_recv_tmf_out:
|
||||
return rc;
|
||||
}
|
||||
@ -813,7 +809,6 @@ ocs_scsi_ini_del_device(ocs_t *ocs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup scsi_api_initiator
|
||||
* @brief accept new domain notification
|
||||
@ -959,7 +954,7 @@ ocs_tgt_find(ocs_fcport *fcp, ocs_node_t *node)
|
||||
{
|
||||
ocs_fc_target_t *tgt = NULL;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
for (i = 0; i < OCS_MAX_TARGETS; i++) {
|
||||
tgt = &fcp->tgt[i];
|
||||
|
||||
@ -970,7 +965,7 @@ ocs_tgt_find(ocs_fcport *fcp, ocs_node_t *node)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -996,12 +991,12 @@ uint32_t
|
||||
ocs_update_tgt(ocs_node_t *node, ocs_fcport *fcp, uint32_t tgt_id)
|
||||
{
|
||||
ocs_fc_target_t *tgt = NULL;
|
||||
|
||||
|
||||
tgt = &fcp->tgt[tgt_id];
|
||||
|
||||
tgt->node_id = node->instance_index;
|
||||
tgt->state = OCS_TGT_STATE_VALID;
|
||||
|
||||
|
||||
tgt->port_id = node->rnode.fc_id;
|
||||
tgt->wwpn = ocs_node_get_wwpn(node);
|
||||
tgt->wwnn = ocs_node_get_wwnn(node);
|
||||
@ -1052,7 +1047,7 @@ ocs_scsi_new_target(ocs_node_t *node)
|
||||
}
|
||||
|
||||
i = ocs_tgt_find(fcp, node);
|
||||
|
||||
|
||||
if (i < 0) {
|
||||
ocs_add_new_tgt(node, fcp);
|
||||
return 0;
|
||||
@ -1071,7 +1066,7 @@ ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt)
|
||||
device_printf(ocs->dev, "%s: calling with NULL sim\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (CAM_REQ_CMP == xpt_create_path(&cpath, NULL, cam_sim_path(fcp->sim),
|
||||
tgt, CAM_LUN_WILDCARD)) {
|
||||
xpt_async(AC_LOST_DEVICE, cpath, NULL);
|
||||
@ -1189,14 +1184,13 @@ ocs_scsi_del_target(ocs_node_t *node, ocs_scsi_del_target_reason_e reason)
|
||||
if(!ocs->attached) {
|
||||
ocs_delete_target(ocs, fcp, tgt_id);
|
||||
} else {
|
||||
|
||||
tgt->state = OCS_TGT_STATE_LOST;
|
||||
tgt->gone_timer = 30;
|
||||
if (!callout_active(&fcp->ldt)) {
|
||||
callout_reset(&fcp->ldt, hz, ocs_ldt, fcp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1742,7 +1736,6 @@ ocs_target_io(struct ocs_softc *ocs, union ccb *ccb)
|
||||
" are 0 \n", __func__);
|
||||
ocs_set_ccb_status(ccb, CAM_REQ_INVALID);
|
||||
rc = 1;
|
||||
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
@ -1917,7 +1910,7 @@ ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if ((fcp->role != KNOB_ROLE_NONE)){
|
||||
fcp->role = new_role;
|
||||
vport->enable_ini = (new_role & KNOB_ROLE_INITIATOR)? 1:0;
|
||||
@ -1927,7 +1920,7 @@ ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role)
|
||||
}
|
||||
|
||||
fcp->role = new_role;
|
||||
|
||||
|
||||
vport->enable_ini = (new_role & KNOB_ROLE_INITIATOR)? 1:0;
|
||||
vport->enable_tgt = (new_role & KNOB_ROLE_TARGET)? 1:0;
|
||||
|
||||
@ -2617,7 +2610,7 @@ ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb)
|
||||
aio->tgt_io.flags |= OCS_CAM_IO_F_ABORT_CAM;
|
||||
ocs_target_io_free(aio);
|
||||
ocs_set_ccb_status(ccb, CAM_REQ_CMP);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2808,7 +2801,7 @@ ocs_get_crn(ocs_node_t *node, uint8_t *crn, uint64_t lun)
|
||||
if (lcrn->lun != lun) {
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
if (lcrn->crnseed == 0)
|
||||
lcrn->crnseed = 1;
|
||||
|
||||
@ -2821,7 +2814,7 @@ ocs_del_crn(ocs_node_t *node)
|
||||
{
|
||||
uint32_t i;
|
||||
struct ocs_lun_crn *lcrn = NULL;
|
||||
|
||||
|
||||
for(i = 0; i < OCS_MAX_LUN; i++) {
|
||||
lcrn = node->ini_node.lun_crn[i];
|
||||
if (lcrn) {
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#include <cam/scsi/scsi_message.h>
|
||||
|
||||
|
||||
#define ccb_ocs_ptr spriv_ptr0
|
||||
#define ccb_io_ptr spriv_ptr1
|
||||
|
||||
@ -119,4 +118,3 @@ extern int32_t ocs_cam_attach(ocs_t *ocs);
|
||||
extern int32_t ocs_cam_detach(ocs_t *ocs);
|
||||
|
||||
#endif /* __OCS_CAM_H__ */
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
||||
* Contains declarations shared between the alex layer and HW/SLI4
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_COMMON_H__)
|
||||
#define __OCS_COMMON_H__
|
||||
|
||||
@ -154,7 +153,6 @@ typedef enum {
|
||||
* a separate SLI port object.
|
||||
*/
|
||||
struct ocs_sli_port_s {
|
||||
|
||||
ocs_t *ocs; /**< pointer to ocs */
|
||||
uint32_t tgt_id; /**< target id */
|
||||
uint32_t index; /**< ??? */
|
||||
@ -215,7 +213,6 @@ struct ocs_sli_port_s {
|
||||
* to connect to the domain of a FC or FCoE switch
|
||||
*/
|
||||
struct ocs_domain_s {
|
||||
|
||||
ocs_t *ocs; /**< pointer back to ocs */
|
||||
uint32_t instance_index; /**< unique instance index value */
|
||||
char display_name[OCS_DISPLAY_NAME_LENGTH]; /**< Node display name */
|
||||
@ -302,7 +299,6 @@ struct ocs_remote_node_group_s {
|
||||
* Implementation specific fields allowed here
|
||||
*/
|
||||
|
||||
|
||||
uint32_t instance_index; /*<< instance index */
|
||||
ocs_node_group_dir_t *node_group_dir; /*<< pointer to the node group directory */
|
||||
ocs_list_link_t link; /*<< linked list link */
|
||||
@ -325,7 +321,6 @@ typedef enum {
|
||||
*
|
||||
*/
|
||||
struct ocs_node_s {
|
||||
|
||||
ocs_t *ocs; /**< pointer back to ocs structure */
|
||||
uint32_t instance_index; /**< unique instance index value */
|
||||
char display_name[OCS_DISPLAY_NAME_LENGTH]; /**< Node display name */
|
||||
@ -420,5 +415,4 @@ struct ocs_vport_spec_s {
|
||||
ocs_sport_t *sport; /**< Used to match record after attaching for update */
|
||||
};
|
||||
|
||||
|
||||
#endif /* __OCS_COMMON_H__*/
|
||||
|
@ -118,7 +118,6 @@ ocs_ddump_sli4_queue(ocs_textbuf_t *textbuf, const char *name, ocs_hw_t *hw, sli
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Generate SLI4 ddump
|
||||
*
|
||||
@ -153,7 +152,6 @@ ocs_ddump_sli_q_fields(ocs_textbuf_t *textbuf, sli4_t *sli4, sli4_qtype_e qtype)
|
||||
ocs_ddump_endsection(textbuf, q_desc, qtype);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Generate SLI4 ddump
|
||||
*
|
||||
@ -259,7 +257,6 @@ ocs_ddump_sli(ocs_textbuf_t *textbuf, sli4_t *sli4)
|
||||
ocs_ddump_endsection(textbuf, "sli4", 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Dump HW IO
|
||||
*
|
||||
@ -334,7 +331,6 @@ ocs_ddump_queue_history(ocs_textbuf_t *textbuf, ocs_hw_q_hist_t *q_hist)
|
||||
ocs_q_hist_ftr_t ftr;
|
||||
uint32_t mask;
|
||||
|
||||
|
||||
/* footer's mask indicates what words were captured */
|
||||
ftr.word = q_hist->q_hist[x];
|
||||
mask = ftr.s.mask;
|
||||
@ -878,4 +874,3 @@ ocs_clear_saved_ddump(ocs_t *ocs)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,6 @@ __ocs_d_common(const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void
|
||||
ocs_assert(ocs, NULL);
|
||||
|
||||
switch(evt) {
|
||||
|
||||
/* Handle shutdown events */
|
||||
case OCS_EVT_SHUTDOWN:
|
||||
ocs_log_debug(ocs, "[%s] %-20s %-20s\n", node->display_name, funcname, ocs_sm_event_name(evt));
|
||||
@ -315,9 +314,6 @@ __ocs_d_wait_loop(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup device_sm
|
||||
* @brief state: wait for node resume event
|
||||
@ -384,7 +380,6 @@ __ocs_d_wait_del_ini_tgt(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup device_sm
|
||||
* @brief state: Wait for node resume event.
|
||||
@ -455,8 +450,6 @@ __ocs_d_wait_del_node(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Save the OX_ID for sending LS_ACC sometime later.
|
||||
*
|
||||
@ -535,7 +528,6 @@ ocs_process_abts(ocs_io_t *io, fc_header_t *hdr)
|
||||
|
||||
/* If an IO was found, attempt to take a reference on it */
|
||||
if (abortio != NULL && (ocs_ref_get_unless_zero(&abortio->ref) != 0)) {
|
||||
|
||||
/* Got a reference on the IO. Hold it until backend is notified below */
|
||||
node_printf(node, "Abort request: ox_id [%04x] rx_id [%04x]\n",
|
||||
ox_id, rx_id);
|
||||
@ -677,7 +669,6 @@ __ocs_d_wait_logo_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup device_sm
|
||||
* @brief Device node state machine: Wait for the PRLO response.
|
||||
@ -724,7 +715,6 @@ __ocs_d_wait_prlo_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialize device node.
|
||||
*
|
||||
@ -1654,13 +1644,12 @@ __ocs_d_device_ready(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case OCS_EVT_PDISC_RCVD: {
|
||||
fc_header_t *hdr = cbdata->header->dma.virt;
|
||||
ocs_send_plogi_acc(cbdata->io, ocs_be16toh(hdr->ox_id), NULL, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case OCS_EVT_PRLI_RCVD: {
|
||||
/* T, I+T: remote initiator is slow to get started */
|
||||
fc_header_t *hdr = cbdata->header->dma.virt;
|
||||
@ -1808,7 +1797,6 @@ __ocs_d_device_gone(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
default:
|
||||
rc = OCS_SCSI_CALL_COMPLETE;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ((rc == OCS_SCSI_CALL_COMPLETE) && (rc_2 == OCS_SCSI_CALL_COMPLETE)) {
|
||||
|
@ -47,7 +47,6 @@
|
||||
#define OCS_FC_RQ_SIZE_DEFAULT 1024
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* IO Configuration
|
||||
*/
|
||||
@ -59,7 +58,6 @@
|
||||
#define OCS_FC_MAX_SGL 128
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* DIF Configuration
|
||||
*/
|
||||
|
@ -77,8 +77,6 @@ static ocs_mgmt_functions_t domain_mgmt_functions = {
|
||||
.exec_handler = ocs_mgmt_domain_exec,
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Accept domain callback events from the HW.
|
||||
*
|
||||
@ -174,7 +172,6 @@ ocs_domain_cb(void *arg, ocs_hw_domain_event_e event, void *data)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Find the domain, given its FCF_WWN.
|
||||
*
|
||||
@ -225,7 +222,6 @@ ocs_domain_alloc(ocs_t *ocs, uint64_t fcf_wwn)
|
||||
|
||||
domain = ocs_malloc(ocs, sizeof(*domain), OCS_M_NOWAIT | OCS_M_ZERO);
|
||||
if (domain) {
|
||||
|
||||
domain->ocs = ocs;
|
||||
domain->instance_index = ocs->domain_instance_count++;
|
||||
domain->drvsm.app = domain;
|
||||
@ -258,7 +254,6 @@ ocs_domain_alloc(ocs_t *ocs, uint64_t fcf_wwn)
|
||||
ocs_log_err(ocs, "domain allocation failed\n");
|
||||
}
|
||||
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
@ -962,7 +957,6 @@ __ocs_domain_ready(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
|
||||
switch(evt) {
|
||||
case OCS_EVT_ENTER: {
|
||||
|
||||
/* start any pending vports */
|
||||
if (ocs_vport_start(domain)) {
|
||||
ocs_log_debug(domain->ocs, "ocs_vport_start() did not start all vports\n");
|
||||
@ -1197,8 +1191,6 @@ __ocs_domain_wait_domain_lost(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Save the port's service parameters.
|
||||
*
|
||||
@ -1282,7 +1274,6 @@ ocs_domain_post_event(ocs_domain_t *domain, ocs_sm_event_t event, void *arg)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Return the WWN as a uint64_t.
|
||||
*
|
||||
@ -1367,7 +1358,6 @@ ocs_ddump_domain(ocs_textbuf_t *textbuf, ocs_domain_t *domain)
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ocs_mgmt_domain_list(ocs_textbuf_t *textbuf, void *object)
|
||||
{
|
||||
@ -1390,8 +1380,6 @@ ocs_mgmt_domain_list(ocs_textbuf_t *textbuf, void *object)
|
||||
#endif
|
||||
|
||||
if (ocs_domain_lock_try(domain) == TRUE) {
|
||||
|
||||
|
||||
/* If we get here, then we are holding the domain lock */
|
||||
ocs_list_foreach(&domain->sport_list, sport) {
|
||||
if ((sport->mgmt_functions) && (sport->mgmt_functions->get_list_handler)) {
|
||||
@ -1468,7 +1456,6 @@ ocs_mgmt_domain_get(ocs_textbuf_t *textbuf, char *parent, char *name, void *obje
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_domain_unlock(domain);
|
||||
}
|
||||
@ -1507,7 +1494,6 @@ ocs_mgmt_domain_get_all(ocs_textbuf_t *textbuf, void *object)
|
||||
}
|
||||
ocs_domain_unlock(domain);
|
||||
|
||||
|
||||
ocs_mgmt_end_unnumbered_section(textbuf, "domain");
|
||||
|
||||
}
|
||||
@ -1524,11 +1510,9 @@ ocs_mgmt_domain_set(char *parent, char *name, char *value, void *object)
|
||||
|
||||
/* If it doesn't start with my qualifier I don't know what to do with it */
|
||||
if (ocs_strncmp(name, qualifier, strlen(qualifier)) == 0) {
|
||||
|
||||
/* See if it's a value I can supply */
|
||||
|
||||
/* if (ocs_strcmp(unqualified_name, "display_name") == 0) {
|
||||
|
||||
} else */
|
||||
{
|
||||
/* If I didn't know the value of this status pass the request to each of my children */
|
||||
@ -1541,7 +1525,6 @@ ocs_mgmt_domain_set(char *parent, char *name, char *value, void *object)
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_domain_unlock(domain);
|
||||
}
|
||||
@ -1563,7 +1546,6 @@ ocs_mgmt_domain_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_l
|
||||
|
||||
/* If it doesn't start with my qualifier I don't know what to do with it */
|
||||
if (ocs_strncmp(action, qualifier, strlen(qualifier)) == 0) {
|
||||
|
||||
{
|
||||
/* If I didn't know how to do this action pass the request to each of my children */
|
||||
ocs_domain_lock(domain);
|
||||
@ -1575,7 +1557,6 @@ ocs_mgmt_domain_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_l
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_domain_unlock(domain);
|
||||
}
|
||||
|
@ -36,7 +36,6 @@
|
||||
* OCS linux driver common include file
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_DRV_FC_H__)
|
||||
#define __OCS_DRV_FC_H__
|
||||
|
||||
@ -52,7 +51,6 @@
|
||||
#include "ocs_stats.h"
|
||||
|
||||
struct ocs_s {
|
||||
|
||||
ocs_os_t ocs_os;
|
||||
char display_name[OCS_DISPLAY_NAME_LENGTH];
|
||||
ocs_rlock_t lock; /*>> Device wide lock */
|
||||
@ -208,5 +206,4 @@ extern int32_t ocs_start_event_processing(ocs_os_t *ocs_os);
|
||||
#include "ocs_ioctl.h"
|
||||
#include "ocs_elxu.h"
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -68,7 +68,6 @@ static ocs_io_t *ocs_els_abort_io(ocs_io_t *els, int send_abts);
|
||||
static void _ocs_els_io_free(void *arg);
|
||||
static void ocs_els_delay_timer_cb(void *arg);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup els_api
|
||||
* @brief ELS state machine transition wrapper.
|
||||
@ -355,7 +354,6 @@ ocs_els_make_active(ocs_io_t *els)
|
||||
ocs_unlock(&node->active_ios_lock);
|
||||
return;
|
||||
} else {
|
||||
|
||||
/* remove from pending list */
|
||||
ocs_list_remove(&node->els_io_pend_list, els);
|
||||
els->els_pend = 0;
|
||||
@ -506,7 +504,6 @@ ocs_els_req_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int3
|
||||
ocs_els_post_event(els, OCS_EVT_SRRS_ELS_REQ_RJT, &cbdata);
|
||||
break;
|
||||
|
||||
|
||||
case SLI4_FC_WCQE_STATUS_LOCAL_REJECT:
|
||||
switch (ext_status) {
|
||||
case SLI4_FC_LOCAL_REJECT_SEQUENCE_TIMEOUT:
|
||||
@ -647,7 +644,6 @@ ocs_send_plogi(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
els->iparam.els.timeout = timeout_sec;
|
||||
|
||||
ocs_io_transition(els, __ocs_els_init, NULL);
|
||||
|
||||
}
|
||||
return els;
|
||||
}
|
||||
@ -909,7 +905,6 @@ ocs_send_logo(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
fc_logo_payload_t *logo;
|
||||
fc_plogi_payload_t *sparams;
|
||||
|
||||
|
||||
ocs = node->ocs;
|
||||
|
||||
node_els_trace();
|
||||
@ -1305,7 +1300,7 @@ ocs_send_plogi_acc(ocs_io_t *io, uint32_t ox_id, els_cb_t cb, void *cbarg)
|
||||
ocs_memcpy(plogi, node->sport->service_params, sizeof(*plogi));
|
||||
plogi->command_code = FC_ELS_CMD_ACC;
|
||||
plogi->resv1 = 0;
|
||||
|
||||
|
||||
/* Set Application header support bit if requested */
|
||||
if (req->common_service_parameters[1] & ocs_htobe32(1U << 24)) {
|
||||
plogi->common_service_parameters[1] |= ocs_htobe32(1U << 24);
|
||||
@ -1724,7 +1719,6 @@ ocs_ns_send_rftid(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
if (els == NULL) {
|
||||
ocs_log_err(ocs, "IO alloc failed\n");
|
||||
} else {
|
||||
|
||||
els->iparam.fc_ct.r_ctl = FC_RCTL_ELS;
|
||||
els->iparam.fc_ct.type = FC_TYPE_GS;
|
||||
els->iparam.fc_ct.df_ctl = 0;
|
||||
@ -1777,7 +1771,6 @@ ocs_ns_send_rffid(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
if (els == NULL) {
|
||||
ocs_log_err(ocs, "IO alloc failed\n");
|
||||
} else {
|
||||
|
||||
els->iparam.fc_ct.r_ctl = FC_RCTL_ELS;
|
||||
els->iparam.fc_ct.type = FC_TYPE_GS;
|
||||
els->iparam.fc_ct.df_ctl = 0;
|
||||
@ -1808,7 +1801,6 @@ ocs_ns_send_rffid(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
return els;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup els_api
|
||||
* @brief Send a GIDPT CT request.
|
||||
@ -1839,7 +1831,6 @@ ocs_ns_send_gidpt(ocs_node_t *node, uint32_t timeout_sec, uint32_t retries,
|
||||
if (els == NULL) {
|
||||
ocs_log_err(ocs, "IO alloc failed\n");
|
||||
} else {
|
||||
|
||||
els->iparam.fc_ct.r_ctl = FC_RCTL_ELS;
|
||||
els->iparam.fc_ct.type = FC_TYPE_GS;
|
||||
els->iparam.fc_ct.df_ctl = 0;
|
||||
@ -2102,7 +2093,6 @@ ocs_els_abort_io(ocs_io_t *els, int send_abts)
|
||||
return abort_io;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ELS IO State Machine
|
||||
*/
|
||||
@ -2126,7 +2116,6 @@ ocs_els_abort_io(ocs_io_t *els, int send_abts)
|
||||
__func__, ocs_sm_event_name(evt)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Cleanup an ELS IO
|
||||
*
|
||||
@ -2160,7 +2149,6 @@ ocs_els_io_cleanup(ocs_io_t *els, ocs_sm_event_t node_evt, void *arg)
|
||||
els->els_req_free = 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Common event handler for the ELS IO state machine.
|
||||
*
|
||||
@ -2650,7 +2638,6 @@ ocs_ddump_els(ocs_textbuf_t *textbuf, ocs_io_t *els)
|
||||
ocs_ddump_endsection(textbuf, "els", -1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief return TRUE if given ELS list is empty (while taking proper locks)
|
||||
*
|
||||
@ -2744,7 +2731,6 @@ ocs_send_ct_rsp(ocs_io_t *io, uint32_t ox_id, fcct_iu_header_t *ct_hdr, uint32_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Handle delay retry timeout
|
||||
*
|
||||
|
@ -166,7 +166,6 @@ __ocs_fabric_flogi_wait_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
|
||||
switch(evt) {
|
||||
case OCS_EVT_SRRS_ELS_REQ_OK: {
|
||||
|
||||
if (node_check_els_req(ctx, evt, arg, FC_ELS_CMD_FLOGI, __ocs_fabric_common, __func__)) {
|
||||
return NULL;
|
||||
}
|
||||
@ -317,7 +316,6 @@ __ocs_fabric_fdisc_wait_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
ocs_sport_attach(node->sport, cbdata->ext_status);
|
||||
ocs_node_transition(node, __ocs_fabric_wait_domain_attach, NULL);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case OCS_EVT_SRRS_ELS_REQ_RJT:
|
||||
@ -791,7 +789,6 @@ __ocs_ns_gidpt_wait_rsp(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup ns_sm
|
||||
* @brief Name services node state machine: Idle state.
|
||||
@ -1514,7 +1511,6 @@ __ocs_p2p_wait_flogi_acc_cmpl(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup p2p_sm
|
||||
* @brief Point-to-point node state machine: Wait for a PLOGI response
|
||||
|
@ -36,7 +36,6 @@
|
||||
* Declarations for the interface exported by ocs_fabric
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_FABRIC_H__)
|
||||
#define __OCS_FABRIC_H__
|
||||
extern void *__ocs_fabric_init(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg);
|
||||
|
@ -95,7 +95,6 @@
|
||||
#define FC_GS_NAMESERVER_RSNN_NN 0x0239
|
||||
#define FC_GS_NAMESERVER_RSPN_ID 0x0218
|
||||
|
||||
|
||||
#define FC_GS_REVISION 0x03
|
||||
|
||||
#define FC_GS_IO_PARAMS { .fc_ct.r_ctl = 0x02, \
|
||||
@ -115,7 +114,6 @@ typedef struct fc_vft_header_s {
|
||||
hopct:8;
|
||||
} fc_vft_header_t;
|
||||
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
static inline uint32_t fc_be24toh(uint32_t x) { return (ocs_be32toh(x) >> 8); }
|
||||
#else
|
||||
@ -147,7 +145,6 @@ typedef struct fc_header_s {
|
||||
uint32_t parameter;
|
||||
} fc_header_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief FC header in little-endian order
|
||||
*/
|
||||
@ -321,7 +318,6 @@ typedef struct fc_acc_payload_s {
|
||||
resv1:24;
|
||||
} fc_acc_payload_t;
|
||||
|
||||
|
||||
typedef struct fc_ls_rjt_payload_s {
|
||||
uint32_t command_code:8,
|
||||
resv1:24;
|
||||
@ -743,5 +739,4 @@ typedef struct fcp_xfer_rdy_iu_s {
|
||||
|
||||
#define MAX_ACC_REJECT_PAYLOAD (sizeof(fc_ls_rjt_payload_t) > sizeof(fc_acc_payload_t) ? sizeof(fc_ls_rjt_payload_t) : sizeof(fc_acc_payload_t))
|
||||
|
||||
|
||||
#endif /* !_OCS_FCP_H */
|
||||
|
@ -126,7 +126,6 @@ static ocs_hw_rtn_e ocs_hw_config_sli_port_health_check(ocs_hw_t *hw, uint8_t qu
|
||||
static int32_t ocs_hw_domain_add(ocs_hw_t *, ocs_domain_t *);
|
||||
static int32_t ocs_hw_domain_del(ocs_hw_t *, ocs_domain_t *);
|
||||
|
||||
|
||||
/* Port state machine */
|
||||
static void *__ocs_hw_port_alloc_init(ocs_sm_ctx_t *, ocs_sm_event_t, void *);
|
||||
static void *__ocs_hw_port_alloc_read_sparm64(ocs_sm_ctx_t *, ocs_sm_event_t, void *);
|
||||
@ -372,7 +371,6 @@ ocs_hw_setup(ocs_hw_t *hw, ocs_os_handle_t os, sli4_port_type_e port_type)
|
||||
hw->config.auto_xfer_rdy_app_tag_valid = OCS_HW_AUTO_XFER_RDY_APP_TAG_VALID_DEFAULT;
|
||||
hw->config.auto_xfer_rdy_app_tag_value = OCS_HW_AUTO_XFER_RDY_APP_TAG_VALUE_DEFAULT;
|
||||
|
||||
|
||||
if (sli_setup(&hw->sli, hw->os, port_type)) {
|
||||
ocs_log_err(hw->os, "SLI setup failed\n");
|
||||
return OCS_HW_RTN_ERROR;
|
||||
@ -482,7 +480,7 @@ ocs_hw_setup(ocs_hw_t *hw, ocs_os_handle_t os, sli4_port_type_e port_type)
|
||||
OCS_HW_MAX_NUM_EQ);
|
||||
return OCS_HW_RTN_ERROR;
|
||||
}
|
||||
|
||||
|
||||
if (hw->config.n_cq > OCS_HW_MAX_NUM_CQ) {
|
||||
ocs_log_crit(hw->os, "Max supported CQs = %d\n",
|
||||
OCS_HW_MAX_NUM_CQ);
|
||||
@ -610,7 +608,7 @@ ocs_hw_init(ocs_hw_t *hw)
|
||||
if (hw->config.n_rq == 1) {
|
||||
hw->sli.config.features.flag.mrqp = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (sli_init(&hw->sli)) {
|
||||
ocs_log_err(hw->os, "SLI failed to initialize\n");
|
||||
return OCS_HW_RTN_ERROR;
|
||||
@ -693,7 +691,7 @@ ocs_hw_init(ocs_hw_t *hw)
|
||||
hw->config.n_mq, q_count);
|
||||
return OCS_HW_RTN_ERROR;
|
||||
}
|
||||
|
||||
|
||||
q_count = MIN(sli_get_max_queue(&hw->sli, SLI_QTYPE_RQ),
|
||||
OCS_HW_MAX_NUM_RQ);
|
||||
if (hw->config.n_rq > q_count) {
|
||||
@ -723,7 +721,6 @@ ocs_hw_init(ocs_hw_t *hw)
|
||||
ocs_log_debug(hw->os, "Max WQs %d, hash size = %d\n",
|
||||
OCS_HW_MAX_NUM_WQ, OCS_HW_Q_HASH_SIZE);
|
||||
|
||||
|
||||
rc = ocs_hw_init_queues(hw, hw->qtop);
|
||||
if (rc != OCS_HW_RTN_SUCCESS) {
|
||||
return rc;
|
||||
@ -816,7 +813,6 @@ ocs_hw_init(ocs_hw_t *hw)
|
||||
|
||||
/* Register a FCFI to allow unsolicited frames to be routed to the driver */
|
||||
if (sli_get_medium(&hw->sli) == SLI_LINK_MEDIUM_FC) {
|
||||
|
||||
if (hw->hw_mrq_count) {
|
||||
ocs_log_debug(hw->os, "using REG_FCFI MRQ\n");
|
||||
|
||||
@ -874,7 +870,6 @@ ocs_hw_init(ocs_hw_t *hw)
|
||||
}
|
||||
hw->fcf_indicator = ((sli4_cmd_reg_fcfi_t *)buf)->fcfi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1180,7 +1175,6 @@ ocs_hw_teardown(ocs_hw_t *hw)
|
||||
}
|
||||
|
||||
if (hw->state != OCS_HW_STATE_QUEUES_ALLOCATED) {
|
||||
|
||||
hw->state = OCS_HW_STATE_TEARDOWN_IN_PROGRESS;
|
||||
|
||||
ocs_hw_flush(hw);
|
||||
@ -1250,12 +1244,10 @@ ocs_hw_teardown(ocs_hw_t *hw)
|
||||
ocs_lock_free(&hw->io_lock);
|
||||
ocs_lock_free(&hw->io_abort_lock);
|
||||
|
||||
|
||||
for (i = 0; i < hw->wq_count; i++) {
|
||||
sli_queue_free(&hw->sli, &hw->wq[i], destroy_queues, free_memory);
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < hw->rq_count; i++) {
|
||||
sli_queue_free(&hw->sli, &hw->rq[i], destroy_queues, free_memory);
|
||||
}
|
||||
@ -1443,7 +1435,6 @@ ocs_hw_reset(ocs_hw_t *hw, ocs_hw_reset_e reset)
|
||||
/* Teardown the HW queue topology */
|
||||
hw_queue_teardown(hw);
|
||||
} else {
|
||||
|
||||
/* Free rq buffers */
|
||||
ocs_hw_rx_free(hw);
|
||||
}
|
||||
@ -1474,7 +1465,6 @@ ocs_hw_get_fw_timed_out(ocs_hw_t *hw)
|
||||
sli_reg_read(&hw->sli, SLI4_REG_SLIPORT_ERROR2) == 0x10);
|
||||
}
|
||||
|
||||
|
||||
ocs_hw_rtn_e
|
||||
ocs_hw_get(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t *value)
|
||||
{
|
||||
@ -1803,8 +1793,6 @@ ocs_hw_get_ptr(ocs_hw_t *hw, ocs_hw_property_e prop)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocs_hw_rtn_e
|
||||
ocs_hw_set(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t value)
|
||||
{
|
||||
@ -2027,7 +2015,6 @@ ocs_hw_set(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t value)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
ocs_hw_rtn_e
|
||||
ocs_hw_set_ptr(ocs_hw_t *hw, ocs_hw_property_e prop, void *value)
|
||||
{
|
||||
@ -2218,7 +2205,6 @@ ocs_hw_eq_process(ocs_hw_t *hw, hw_eq_t *eq, uint32_t max_isr_time_msec)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (eq->queue->n_posted > (eq->queue->posted_limit)) {
|
||||
sli_queue_arm(&hw->sli, eq->queue, FALSE);
|
||||
}
|
||||
@ -2320,7 +2306,6 @@ ocs_hw_command(ocs_hw_t *hw, uint8_t *cmd, uint32_t opts, void *cb, void *arg)
|
||||
}
|
||||
|
||||
if (OCS_CMD_POLL == opts) {
|
||||
|
||||
ocs_lock(&hw->cmd_lock);
|
||||
if (hw->mq->length && !sli_queue_is_empty(&hw->sli, hw->mq)) {
|
||||
/*
|
||||
@ -2682,7 +2667,6 @@ ocs_hw_port_control(ocs_hw_t *hw, ocs_hw_port_e ctrl, uintptr_t value, ocs_hw_po
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
if (sli_cmd_init_link(&hw->sli, init_link, SLI4_BMBX_SIZE, speed, reset_alpa)) {
|
||||
rc = ocs_hw_command(hw, init_link, OCS_CMD_NOWAIT,
|
||||
ocs_hw_cb_port_control, NULL);
|
||||
@ -2725,7 +2709,6 @@ ocs_hw_port_control(ocs_hw_t *hw, ocs_hw_port_e ctrl, uintptr_t value, ocs_hw_po
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup port
|
||||
* @brief Free port resources.
|
||||
@ -3107,7 +3090,6 @@ ocs_hw_node_free_resources(ocs_hw_t *hw, ocs_remote_node_t *rnode)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup node
|
||||
* @brief Free a remote node object.
|
||||
@ -4174,7 +4156,6 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io,
|
||||
* data phase, it is marked for quarantine.
|
||||
*/
|
||||
if (hw->workaround.use_dif_sec_xri && (iparam->fcp_tgt.dif_oper != OCS_HW_DIF_OPER_DISABLED)) {
|
||||
|
||||
/*
|
||||
* If we have allocated a chained SGL for skyhawk, then
|
||||
* we can re-use this for the sec_hio.
|
||||
@ -5030,7 +5011,6 @@ ocs_hw_io_get_xid(ocs_hw_t *hw, ocs_hw_io_t *io)
|
||||
return io->indicator;
|
||||
}
|
||||
|
||||
|
||||
typedef struct ocs_hw_fw_write_cb_arg {
|
||||
ocs_hw_fw_cb_t cb;
|
||||
void *arg;
|
||||
@ -5604,7 +5584,6 @@ ocs_hw_get_host_stats(ocs_hw_t *hw, uint8_t cc, ocs_hw_host_stat_cb_t cb, void *
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Called when the READ_STATUS command completes.
|
||||
*
|
||||
@ -5649,7 +5628,6 @@ ocs_hw_cb_host_stat(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg)
|
||||
counts[OCS_HW_HOST_STAT_DROP_FRM_DUE_TO_NO_XRI_COUNT].counter = mbox_rsp->dropped_frames_due_to_no_xri_count;
|
||||
counts[OCS_HW_HOST_STAT_EMPTY_XRI_POOL_COUNT].counter = mbox_rsp->empty_xri_pool_count;
|
||||
|
||||
|
||||
if (cb_arg) {
|
||||
if (cb_arg->cb) {
|
||||
if ((status == 0) && mbox_rsp->hdr.status) {
|
||||
@ -6100,7 +6078,6 @@ ocs_hw_get_linkcfg_lancer(ocs_hw_t *hw, uint32_t opts, ocs_hw_port_control_cb_t
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the link configuration callback.
|
||||
*
|
||||
@ -6240,7 +6217,6 @@ ocs_hw_set_dif_seed(ocs_hw_t *hw)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the DIF mode value.
|
||||
*
|
||||
@ -6374,7 +6350,6 @@ ocs_hw_config_auto_xfer_rdy_t10pi(ocs_hw_t *hw, uint8_t *buf)
|
||||
sizeof(param),
|
||||
¶m);
|
||||
|
||||
|
||||
rc = ocs_hw_command(hw, buf, OCS_CMD_POLL, NULL, NULL);
|
||||
if (rc) {
|
||||
ocs_log_err(hw->os, "ocs_hw_command returns %d\n", rc);
|
||||
@ -6387,7 +6362,6 @@ ocs_hw_config_auto_xfer_rdy_t10pi(ocs_hw_t *hw, uint8_t *buf)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief enable sli port health check
|
||||
*
|
||||
@ -6449,7 +6423,6 @@ ocs_hw_config_set_fdt_xfer_hint(ocs_hw_t *hw, uint32_t fdt_xfer_hint)
|
||||
sizeof(param),
|
||||
¶m);
|
||||
|
||||
|
||||
rc = ocs_hw_command(hw, buf, OCS_CMD_POLL, NULL, NULL);
|
||||
if (rc) {
|
||||
ocs_log_warn(hw->os, "set FDT hint %d failed: %d\n", fdt_xfer_hint, rc);
|
||||
@ -6596,7 +6569,6 @@ ocs_hw_set_dump_location(ocs_hw_t *hw, uint32_t num_buffers, ocs_dma_t *dump_buf
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Set the Ethernet license.
|
||||
*
|
||||
@ -6736,7 +6708,6 @@ ocs_hw_exec_dmtf_clp_cmd(ocs_hw_t *hw, ocs_dma_t *dma_cmd, ocs_dma_t *dma_resp,
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Called when the DMTF CLP command completes.
|
||||
*
|
||||
@ -6955,7 +6926,6 @@ ocs_hw_cb_dump_get(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Read a dump image to the host.
|
||||
*
|
||||
@ -7196,7 +7166,6 @@ ocs_hw_get_port_protocol_cb(ocs_hw_t *hw, int32_t status,
|
||||
|
||||
if (cb_arg->cb) {
|
||||
cb_arg->cb(status, port_protocol, cb_arg->arg);
|
||||
|
||||
}
|
||||
|
||||
ocs_dma_free(hw->os, &cb_arg->payload);
|
||||
@ -7246,7 +7215,6 @@ ocs_hw_get_port_protocol(ocs_hw_t *hw, uint32_t pci_func,
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* cb_arg holds the data that will be passed to the callback on completion */
|
||||
cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_port_protocol_cb_arg_t), OCS_M_NOWAIT);
|
||||
if (cb_arg == NULL) {
|
||||
@ -7387,7 +7355,6 @@ ocs_hw_set_port_protocol_cb1(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* cb_arg holds the data that will be passed to the callback on completion */
|
||||
new_cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_port_protocol_cb_arg_t), OCS_M_NOWAIT);
|
||||
if (new_cb_arg == NULL) {
|
||||
@ -7442,7 +7409,6 @@ ocs_hw_set_port_protocol_cb1(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a
|
||||
pcie_desc_p->pf_type = SLI4_PROTOCOL_DEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (pcie_desc_p->pf_type == SLI4_PROTOCOL_FCOE) {
|
||||
@ -7478,7 +7444,6 @@ ocs_hw_set_port_protocol_cb1(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a
|
||||
ocs_free(hw->os, mqe, SLI4_BMBX_SIZE);
|
||||
ocs_free(hw->os, cb_arg, sizeof(ocs_hw_set_port_protocol_cb_arg_t));
|
||||
|
||||
|
||||
/* Send a SET_PROFILE_CONFIG mailbox command with the new descriptors */
|
||||
rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_set_port_protocol_cb2, new_cb_arg);
|
||||
if (rc) {
|
||||
@ -7494,7 +7459,6 @@ ocs_hw_set_port_protocol_cb1(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a
|
||||
ocs_free(hw->os, new_cb_arg, sizeof(ocs_hw_set_port_protocol_cb_arg_t));
|
||||
}
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -7544,7 +7508,6 @@ ocs_hw_set_port_protocol(ocs_hw_t *hw, ocs_hw_port_protocol_e new_protocol,
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* cb_arg holds the data that will be passed to the callback on completion */
|
||||
cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_port_protocol_cb_arg_t), OCS_M_NOWAIT);
|
||||
if (cb_arg == NULL) {
|
||||
@ -7680,7 +7643,6 @@ ocs_hw_get_profile_list(ocs_hw_t *hw, ocs_get_profile_list_cb_t cb, void* ul_arg
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* cb_arg holds the data that will be passed to the callback on completion */
|
||||
cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_profile_list_cb_arg_t), OCS_M_NOWAIT);
|
||||
if (cb_arg == NULL) {
|
||||
@ -8004,8 +7966,6 @@ ocs_hw_set_nvparms(ocs_hw_t *hw, ocs_set_nvparms_cb_t cb, uint8_t *wwpn,
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Called to obtain the count for the specified type.
|
||||
*
|
||||
@ -8151,7 +8111,6 @@ ocs_hw_set_active_profile(ocs_hw_t *hw, ocs_set_active_profile_cb_t cb, uint32_t
|
||||
return OCS_HW_RTN_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* cb_arg holds the data that will be passed to the callback on completion */
|
||||
cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_active_profile_cb_arg_t), OCS_M_NOWAIT);
|
||||
if (cb_arg == NULL) {
|
||||
@ -8176,8 +8135,6 @@ ocs_hw_set_active_profile(ocs_hw_t *hw, ocs_set_active_profile_cb_t cb, uint32_t
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Private functions
|
||||
*/
|
||||
@ -8514,7 +8471,6 @@ ocs_hw_cq_process(ocs_hw_t *hw, hw_cq_t *cq)
|
||||
CPUTRACE("xabt");
|
||||
ocs_hw_xabt_process(hw, cq, cqe, rid);
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
ocs_log_test(hw->os, "unhandled ctype=%#x rid=%#x\n", ctype, rid);
|
||||
@ -8960,8 +8916,6 @@ ocs_hw_xabt_process(ocs_hw_t *hw, hw_cq_t *cq, uint8_t *cqe, uint16_t rid)
|
||||
ocs_unlock(&hw->io_lock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* For IOs that were aborted internally, we need to issue any pending callback here. */
|
||||
if (io->done != NULL) {
|
||||
ocs_hw_done_t done = io->done;
|
||||
@ -9105,9 +9059,6 @@ ocs_hw_command_process(ocs_hw_t *hw, int32_t status, uint8_t *mqe, size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Process entries on the given mailbox queue.
|
||||
*
|
||||
@ -11037,7 +10988,6 @@ __ocs_hw_domain_freed(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
__ocs_hw_domain_free_redisc_fcf(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *data)
|
||||
{
|
||||
@ -11479,7 +11429,6 @@ ocs_hw_xri_move_to_port_owned(ocs_hw_t *hw, uint32_t num_xri)
|
||||
ocs_lock(&hw->io_lock);
|
||||
|
||||
for (i = 0; i < num_xri; i++) {
|
||||
|
||||
if (NULL != (io = ocs_list_remove_head(&hw->io_free))) {
|
||||
ocs_hw_rtn_e rc;
|
||||
|
||||
@ -11591,7 +11540,6 @@ ocs_hw_xri_move_to_host_owned(ocs_hw_t *hw, uint8_t num_xri)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Allocate an ocs_hw_rx_buffer_t array.
|
||||
*
|
||||
@ -12069,7 +12017,7 @@ ocs_hw_reque_xri( ocs_hw_t *hw, ocs_hw_io_t *io )
|
||||
*/
|
||||
OCS_STAT(hw->tcmd_wq_submit[io->wq->instance]++);
|
||||
OCS_STAT(io->wq->use_count++);
|
||||
|
||||
|
||||
rc = hw_wq_write(io->wq, &io->wqe);
|
||||
if (rc < 0) {
|
||||
ocs_log_err(hw->os, "sli_queue_write reque xri failed: %d\n", rc);
|
||||
@ -12252,9 +12200,6 @@ ocs_hw_get_def_wwn(ocs_t *ocs, uint32_t chan, uint64_t *wwpn, uint64_t *wwnn)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This contains all hw runtime workaround code. Based on the asic type,
|
||||
* asic revision, and range of fw revisions, a particular workaround may be enabled.
|
||||
@ -12270,7 +12215,6 @@ ocs_hw_get_def_wwn(ocs_t *ocs, uint32_t chan, uint64_t *wwpn, uint64_t *wwnn)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define HW_FWREV_ZERO (0ull)
|
||||
#define HW_FWREV_MAX (~0ull)
|
||||
|
||||
@ -12480,7 +12424,6 @@ ocs_hw_workaround_setup(struct ocs_hw_s *hw)
|
||||
for (i = 0, w = hw_workarounds; i < ARRAY_SIZE(hw_workarounds); i++, w++) {
|
||||
if (ocs_hw_workaround_match(hw, w)) {
|
||||
switch(w->workaround) {
|
||||
|
||||
case HW_WORKAROUND_TEST: {
|
||||
ocs_log_debug(hw->os, "Override: test: %d\n", w->value);
|
||||
break;
|
||||
|
@ -46,7 +46,6 @@
|
||||
|
||||
typedef struct ocs_hw_io_s ocs_hw_io_t;
|
||||
|
||||
|
||||
#if defined(OCS_INCLUDE_DEBUG)
|
||||
#else
|
||||
#define ocs_queue_history_wq(...)
|
||||
@ -277,7 +276,6 @@ typedef struct {
|
||||
ocs_hw_profile_descriptor_t descriptors[OCS_HW_MAX_PROFILES];
|
||||
} ocs_hw_profile_list_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Defines DIF operation modes
|
||||
*/
|
||||
@ -467,7 +465,6 @@ typedef struct ocs_hw_sgl_s {
|
||||
*/
|
||||
typedef int32_t (*ocs_hw_done_t)(struct ocs_hw_io_s *, ocs_remote_node_t *, uint32_t len, int32_t status, uint32_t ext, void *ul_arg);
|
||||
|
||||
|
||||
typedef union ocs_hw_io_param_u {
|
||||
struct {
|
||||
uint16_t ox_id;
|
||||
@ -885,8 +882,6 @@ typedef struct {
|
||||
|
||||
} ocs_hw_workaround_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief HW object
|
||||
*/
|
||||
@ -983,7 +978,6 @@ struct ocs_hw_s {
|
||||
ocs_list_t cmd_pending;
|
||||
uint32_t cmd_head_count;
|
||||
|
||||
|
||||
sli4_link_event_t link;
|
||||
ocs_hw_linkcfg_e linkcfg; /**< link configuration setting */
|
||||
uint32_t eth_license; /**< Ethernet license; to enable FCoE on Lancer */
|
||||
@ -1089,7 +1083,6 @@ struct ocs_hw_s {
|
||||
ocs_atomic_t send_frame_seq_id; /**< send frame sequence ID */
|
||||
};
|
||||
|
||||
|
||||
typedef enum {
|
||||
OCS_HW_IO_INUSE_COUNT,
|
||||
OCS_HW_IO_FREE_COUNT,
|
||||
@ -1376,14 +1369,12 @@ extern ocs_hw_rtn_e ocs_hw_dump_clear(ocs_hw_t *, ocs_hw_dump_clear_cb_t, void *
|
||||
|
||||
extern uint8_t ocs_hw_is_io_port_owned(ocs_hw_t *hw, ocs_hw_io_t *io);
|
||||
|
||||
|
||||
extern uint8_t ocs_hw_is_xri_port_owned(ocs_hw_t *hw, uint32_t xri);
|
||||
extern ocs_hw_io_t * ocs_hw_io_lookup(ocs_hw_t *hw, uint32_t indicator);
|
||||
extern uint32_t ocs_hw_xri_move_to_port_owned(ocs_hw_t *hw, uint32_t num_xri);
|
||||
extern ocs_hw_rtn_e ocs_hw_xri_move_to_host_owned(ocs_hw_t *hw, uint8_t num_xri);
|
||||
extern int32_t ocs_hw_reque_xri(ocs_hw_t *hw, ocs_hw_io_t *io);
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* structure elements used by HW */
|
||||
ocs_hw_t *hw; /**> pointer to HW */
|
||||
@ -1397,7 +1388,6 @@ typedef struct {
|
||||
ocs_dma_t payload; /**> a payload DMA buffer */
|
||||
} ocs_hw_send_frame_context_t;
|
||||
|
||||
|
||||
#define OCS_HW_OBJECT_G5 0xfeaa0001
|
||||
#define OCS_HW_OBJECT_G6 0xfeaa0003
|
||||
#define OCS_FILE_TYPE_GROUP 0xf7
|
||||
@ -1411,7 +1401,6 @@ struct ocs_hw_grp_hdr {
|
||||
uint8_t revision[32];
|
||||
};
|
||||
|
||||
|
||||
ocs_hw_rtn_e
|
||||
ocs_hw_send_frame(ocs_hw_t *hw, fc_header_le_t *hdr, uint8_t sof, uint8_t eof, ocs_dma_t *payload,
|
||||
ocs_hw_send_frame_context_t *ctx,
|
||||
@ -1461,7 +1450,6 @@ extern void ocs_hw_reqtag_free(ocs_hw_t *hw, hw_wq_callback_t *wqcb);
|
||||
extern hw_wq_callback_t *ocs_hw_reqtag_get_instance(ocs_hw_t *hw, uint32_t instance_index);
|
||||
extern void ocs_hw_reqtag_reset(ocs_hw_t *hw);
|
||||
|
||||
|
||||
extern uint32_t ocs_hw_dif_blocksize(ocs_hw_dif_info_t *dif_info);
|
||||
extern int32_t ocs_hw_dif_mem_blocksize(ocs_hw_dif_info_t *dif_info, int wiretomem);
|
||||
extern int32_t ocs_hw_dif_wire_blocksize(ocs_hw_dif_info_t *dif_info, int wiretomem);
|
||||
@ -1476,7 +1464,6 @@ extern uint32_t ocs_hw_get_def_wwn(ocs_t *ocs, uint32_t chan, uint64_t *wwpn, ui
|
||||
#define CPUTRACE(...)
|
||||
#endif
|
||||
|
||||
|
||||
/* Two levels of macro needed due to expansion */
|
||||
#define HW_FWREV(a,b,c,d) (((uint64_t)(a) << 48) | ((uint64_t)(b) << 32) | ((uint64_t)(c) << 16) | ((uint64_t)(d)))
|
||||
#define HW_FWREV_1(x) HW_FWREV(x)
|
||||
@ -1489,7 +1476,6 @@ extern uint32_t ocs_hw_get_def_wwn(ocs_t *ocs, uint32_t chan, uint64_t *wwpn, ui
|
||||
|
||||
extern void ocs_hw_workaround_setup(struct ocs_hw_s *hw);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Defines the number of the RQ buffers for each RQ
|
||||
*/
|
||||
|
@ -117,7 +117,6 @@ ocs_hw_init_queues(ocs_hw_t *hw, ocs_hw_qtop_t *qtop)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ocs_hw_assert(qtop != NULL);
|
||||
|
||||
for (i = 0, qt = qtop->entries; i < qtop->inuse_count; i++, qt++) {
|
||||
@ -164,7 +163,6 @@ ocs_hw_init_queues(ocs_hw_t *hw, ocs_hw_qtop_t *qtop)
|
||||
break;
|
||||
|
||||
case QTOP_WQ: {
|
||||
|
||||
len = (qt->len) ? qt->len : default_lengths[QTOP_WQ];
|
||||
if (qt->set_default) {
|
||||
default_lengths[QTOP_WQ] = len;
|
||||
@ -492,7 +490,6 @@ hw_new_cq_set(hw_eq_t *eqs[], hw_cq_t *cqs[], uint32_t num_cqs, uint32_t entry_c
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Allocate a new MQ object
|
||||
*
|
||||
@ -600,7 +597,6 @@ hw_new_rq(hw_cq_t *cq, uint32_t entry_count, uint32_t ulp)
|
||||
|
||||
ocs_hw_get(hw, OCS_HW_MAX_RQ_ENTRIES, &max_hw_rq);
|
||||
|
||||
|
||||
if (rq != NULL) {
|
||||
rq->instance = hw->hw_rq_count++;
|
||||
rq->cq = cq;
|
||||
@ -660,7 +656,6 @@ hw_new_rq(hw_cq_t *cq, uint32_t entry_count, uint32_t ulp)
|
||||
return rq;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Allocate a hw_rq_t object SET
|
||||
*
|
||||
@ -729,7 +724,6 @@ hw_new_rq_set(hw_cq_t *cqs[], hw_rq_t *rqs[], uint32_t num_rq_pairs, uint32_t en
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < num_rq_pairs; i++) {
|
||||
hw->hw_rq[rqs[i]->instance] = rqs[i];
|
||||
ocs_list_add_tail(&cqs[i]->q_list, rqs[i]);
|
||||
@ -758,7 +752,6 @@ hw_new_rq_set(hw_cq_t *cqs[], hw_rq_t *rqs[], uint32_t num_rq_pairs, uint32_t en
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free an EQ object
|
||||
*
|
||||
@ -1419,7 +1412,6 @@ tok_getnumber(ocs_hw_t *hw, ocs_hw_qtop_t *qtop, tok_t *tok)
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief parse an array of tokens
|
||||
*
|
||||
@ -1465,7 +1457,6 @@ parse_topology(ocs_hw_t *hw, tokarray_t *tokarray, ocs_hw_qtop_t *qtop)
|
||||
((tok[3].type == TOK_NUMBER) ||
|
||||
(tok[3].type == TOK_NUMBER_VALUE) ||
|
||||
(tok[3].type == TOK_NUMBER_LIST))) {
|
||||
|
||||
switch (tok[1].subtype) {
|
||||
case TOK_SUB_LEN:
|
||||
qt->len = tok_getnumber(hw, qtop, &tok[3]);
|
||||
@ -1925,7 +1916,6 @@ ocs_hw_rqpair_process_auto_xfr_rdy_cmd(ocs_hw_t *hw, hw_cq_t *cq, uint8_t *cqe)
|
||||
if (seq->auto_xrdy) {
|
||||
/* If data cqe came before cmd cqe in out of order in case of AXR */
|
||||
if(seq->hio->axr_buf->data_cqe == 1) {
|
||||
|
||||
#if defined(OCS_DISC_SPIN_DELAY)
|
||||
if (ocs_get_property("disk_spin_delay", prop_buf, sizeof(prop_buf)) == 0) {
|
||||
delay = ocs_strtoul(prop_buf, 0, 0);
|
||||
@ -2000,7 +1990,6 @@ ocs_hw_rqpair_process_auto_xfr_rdy_data(ocs_hw_t *hw, hw_cq_t *cq, uint8_t *cqe)
|
||||
seq->fcfi = buf->fcfi;
|
||||
seq->hw_priv = cq->eq;
|
||||
|
||||
|
||||
if (opt_wr->status == SLI4_FC_WCQE_STATUS_SUCCESS) {
|
||||
seq->status = OCS_HW_UNSOL_SUCCESS;
|
||||
} else if (opt_wr->status == SLI4_FC_WCQE_STATUS_REMOTE_STOP) {
|
||||
@ -2394,7 +2383,6 @@ ocs_hw_rqpair_auto_xfer_rdy_move_to_host(ocs_hw_t *hw, ocs_hw_io_t *io)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Posts an auto xfer rdy buffer to an IO.
|
||||
*
|
||||
|
@ -70,7 +70,6 @@ typedef struct {
|
||||
uint32_t num_pairs;
|
||||
} ocs_hw_mrq_t;
|
||||
|
||||
|
||||
#define MAX_TOKENS 256
|
||||
#define OCS_HW_MAX_QTOP_ENTRIES 200
|
||||
|
||||
|
@ -407,7 +407,6 @@ ocs_ddump_io(ocs_textbuf_t *textbuf, ocs_io_t *io)
|
||||
ocs_ddump_endsection(textbuf, "io", io->instance_index);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ocs_mgmt_io_list(ocs_textbuf_t *textbuf, void *object)
|
||||
{
|
||||
@ -485,7 +484,3 @@ ocs_mgmt_io_get_all(ocs_textbuf_t *textbuf, void *object)
|
||||
ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "xfer_req", "%d", io->xfer_req);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -69,7 +69,6 @@ typedef enum {
|
||||
} ocs_io_type_e;
|
||||
|
||||
struct ocs_io_s {
|
||||
|
||||
ocs_t *ocs; /**< pointer back to ocs */
|
||||
uint32_t instance_index; /**< unique instance index value */
|
||||
const char *display_name; /**< display name */
|
||||
|
@ -96,7 +96,6 @@ __ocs_ioctl_mbox_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg)
|
||||
|
||||
static int
|
||||
ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma){
|
||||
|
||||
sli4_cmd_sli_config_t *sli_config = (sli4_cmd_sli_config_t *)mcmd->payload;
|
||||
|
||||
if (sli_config->emb) {
|
||||
@ -120,7 +119,6 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
|
||||
rdobj->host_buffer_descriptor[0].buffer_length = mcmd->out_bytes;
|
||||
rdobj->host_buffer_descriptor[0].u.data.buffer_address_low = ocs_addr32_lo(dma->phys);
|
||||
rdobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys);
|
||||
|
||||
}
|
||||
break;
|
||||
case SLI4_OPC_COMMON_WRITE_OBJECT:
|
||||
@ -162,7 +160,6 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
|
||||
rdobj->host_buffer_descriptor[0].buffer_length = mcmd->out_bytes;
|
||||
rdobj->host_buffer_descriptor[0].u.data.buffer_address_low = ocs_addr32_lo(dma->phys);
|
||||
rdobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys);
|
||||
|
||||
}
|
||||
break;
|
||||
case SLI4_OPC_COMMON_READ_TRANSCEIVER_DATA:
|
||||
@ -222,7 +219,6 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd)
|
||||
device_printf(ocs->dev, "%s, command not support\n", __func__);
|
||||
goto no_support;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -245,7 +241,6 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd)
|
||||
mtx_lock(&ocs->dbg_lock);
|
||||
if (ocs_hw_command(&ocs->hw, mcmd->payload, OCS_CMD_NOWAIT,
|
||||
__ocs_ioctl_mbox_cb, ocs)) {
|
||||
|
||||
device_printf(ocs->dev, "%s: command- %x failed\n", __func__,
|
||||
((sli4_mbox_command_header_t *)mcmd->payload)->command);
|
||||
}
|
||||
@ -283,7 +278,6 @@ ocs_process_ecd_helper (ocs_t *ocs, ocs_ioctl_ecd_helper_t *req)
|
||||
uint16_t v16;
|
||||
uint32_t v32;
|
||||
|
||||
|
||||
/* Check the BAR read/write commands for valid bar */
|
||||
switch(req->cmd) {
|
||||
case OCS_ECD_HELPER_BAR_READ8:
|
||||
@ -461,7 +455,6 @@ ocs_ioctl(struct cdev *cdev, u_long cmd, caddr_t addr, int flag, struct thread *
|
||||
} else {
|
||||
ptbuf = &textbuf;
|
||||
}
|
||||
|
||||
}
|
||||
written = 0;
|
||||
if (ptbuf != NULL) {
|
||||
@ -543,7 +536,6 @@ ocs_ioctl(struct cdev *cdev, u_long cmd, caddr_t addr, int flag, struct thread *
|
||||
ocs_textbuf_free(ocs, &textbuf);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case OCS_IOCTL_CMD_MGMT_GET_ALL: {
|
||||
@ -565,7 +557,6 @@ ocs_ioctl(struct cdev *cdev, u_long cmd, caddr_t addr, int flag, struct thread *
|
||||
if(ocs_copy_to_user(req->user_buffer + copied,
|
||||
ocs_textbuf_ext_get_buffer(&textbuf, idx),
|
||||
ocs_textbuf_ext_get_written(&textbuf, idx))) {
|
||||
|
||||
ocs_log_err(ocs, "Error: ocs_textbuf_alloc failed\n");
|
||||
}
|
||||
copied += n;
|
||||
@ -602,7 +593,6 @@ ocs_ioctl(struct cdev *cdev, u_long cmd, caddr_t addr, int flag, struct thread *
|
||||
ocs_textbuf_get_buffer(&textbuf),
|
||||
ocs_textbuf_get_written(&textbuf))) {
|
||||
ocs_log_test(ocs, "Error: (%d) ocs_copy_to_user failed\n", __LINE__);
|
||||
|
||||
}
|
||||
}
|
||||
req->value_length = ocs_textbuf_get_written(&textbuf);
|
||||
@ -696,7 +686,6 @@ ocs_firmware_write(ocs_t *ocs, const uint8_t *buf, size_t buf_len,
|
||||
}
|
||||
|
||||
while (bytes_left > 0) {
|
||||
|
||||
if (bytes_left > FW_WRITE_BUFSIZE) {
|
||||
xfer_size = FW_WRITE_BUFSIZE;
|
||||
} else {
|
||||
@ -766,7 +755,6 @@ ocs_sys_fwupgrade(SYSCTL_HANDLER_ARGS)
|
||||
ocs_be32toh(fw_image->magic_number), fw->datasize);
|
||||
rc = -1;
|
||||
goto exit;
|
||||
|
||||
}
|
||||
|
||||
if (!strncmp(ocs->fw_version, fw_image->revision,
|
||||
@ -807,7 +795,6 @@ ocs_sys_fwupgrade(SYSCTL_HANDLER_ARGS)
|
||||
fw_change_status);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exit:
|
||||
@ -842,7 +829,6 @@ ocs_sysctl_wwnn(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
/*Read wwnn*/
|
||||
if (!req->newptr) {
|
||||
|
||||
return (sysctl_handle_string(oidp, old, sizeof(old), req));
|
||||
}
|
||||
|
||||
@ -878,7 +864,6 @@ ocs_sysctl_wwpn(SYSCTL_HANDLER_ARGS)
|
||||
snprintf(old, sizeof(old), "0x%llx",(unsigned long long) ocs_htobe64(*wwpn));
|
||||
}
|
||||
|
||||
|
||||
/*Read wwpn*/
|
||||
if (!req->newptr) {
|
||||
return (sysctl_handle_string(oidp, old, sizeof(old), req));
|
||||
@ -993,7 +978,6 @@ ocs_sysctl_fcid(SYSCTL_HANDLER_ARGS)
|
||||
return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ocs_sysctl_port_state(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -1012,7 +996,7 @@ ocs_sysctl_port_state(SYSCTL_HANDLER_ARGS)
|
||||
"offline" : "online");
|
||||
return (sysctl_handle_string(oidp, new, sizeof(new), req));
|
||||
}
|
||||
|
||||
|
||||
/*Configure port state*/
|
||||
rc = sysctl_handle_string(oidp, new, sizeof(new), req);
|
||||
if (rc)
|
||||
@ -1053,7 +1037,7 @@ ocs_sysctl_vport_wwpn(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
memset(str_wwpn, 0, sizeof(str_wwpn));
|
||||
snprintf(str_wwpn, sizeof(str_wwpn), "0x%llx", (unsigned long long)fcp->vport->wwpn);
|
||||
|
||||
|
||||
return (sysctl_handle_string(oidp, str_wwpn, sizeof(str_wwpn), req));
|
||||
}
|
||||
|
||||
@ -1195,7 +1179,6 @@ ocs_sysctl_init(ocs_t *ocs)
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(vtree), OID_AUTO,
|
||||
"wwpn", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
fcp, 0, ocs_sysctl_vport_wwpn, "A", "World Wide Port Name");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1252,4 +1235,3 @@ ocs_debug_detach(void *os)
|
||||
destroy_dev(ocs->cdev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,6 @@ typedef struct {
|
||||
#define OCS_IOCTL_CMD_UNLOAD _IO(OCS_IOCTL_CMD_BASE, 18)
|
||||
#define OCS_IOCTL_CMD_SEND_FRAME _IOWR(OCS_IOCTL_CMD_BASE, 19, ocs_ioctl_send_frame_t)
|
||||
|
||||
|
||||
extern void ocs_info_get_xport_address(ocs_t *ocs, ocs_ioctl_driver_info_t *info);
|
||||
extern int32_t ocs_device_ioctl_xport(ocs_t *ocs, unsigned int cmd, unsigned long arg);
|
||||
#endif
|
||||
|
@ -45,7 +45,6 @@
|
||||
|
||||
#if defined(OCS_LIST_DEBUG)
|
||||
|
||||
|
||||
#define ocs_list_magic_decl uint32_t magic;
|
||||
#define OCS_LIST_LIST_MAGIC 0xcafe0000
|
||||
#define OCS_LIST_LINK_MAGIC 0xcafe0001
|
||||
@ -111,7 +110,6 @@ _ocs_list_init(ocs_list_t *list, uint32_t offset)
|
||||
}
|
||||
#define ocs_list_init(head, type, link) _ocs_list_init(head, offsetof(type, link))
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup os
|
||||
* @brief Test if a list is empty
|
||||
@ -236,7 +234,6 @@ ocs_list_add_head(ocs_list_t *list, void *item)
|
||||
_ocs_list_insert_link(list, list->next, item2link(list, item));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup os
|
||||
* @brief Add an item to the tail of the list
|
||||
@ -264,7 +261,6 @@ ocs_list_add_tail(ocs_list_t *list, void *item)
|
||||
_ocs_list_insert_link(list->prev, list, link);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup os
|
||||
* @brief Return the first item in the list
|
||||
|
@ -60,7 +60,6 @@ static int32_t
|
||||
ocs_mgmt_read_phys(ocs_t *ocs, char *, void *, uint32_t , void *, uint32_t);
|
||||
#endif
|
||||
|
||||
|
||||
/* Getters */
|
||||
|
||||
static void get_nodes_count(ocs_t *, char *, ocs_textbuf_t*);
|
||||
@ -263,7 +262,6 @@ ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf)
|
||||
|
||||
/* Have each of my children add their actions */
|
||||
if (ocs_device_lock_try(ocs) == TRUE) {
|
||||
|
||||
/* If we get here then we are holding the device lock */
|
||||
ocs_list_foreach(&ocs->domain_list, domain) {
|
||||
if ((domain->mgmt_functions) && (domain->mgmt_functions->get_list_handler)) {
|
||||
@ -303,7 +301,6 @@ ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf)
|
||||
* @return Returns 0 if the value was found and returned, or -1 if an error occurred.
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
|
||||
{
|
||||
@ -314,7 +311,6 @@ ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
|
||||
|
||||
ocs_mgmt_start_unnumbered_section(textbuf, "ocs");
|
||||
|
||||
|
||||
snprintf(qualifier, sizeof(qualifier), "/ocs");
|
||||
|
||||
/* See if the name starts with my qualifier. If not then this request isn't for me */
|
||||
@ -354,12 +350,9 @@ ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
ocs_device_unlock(ocs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ocs_mgmt_end_unnumbered_section(textbuf, "ocs");
|
||||
@ -367,7 +360,6 @@ ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup mgmt
|
||||
* @brief Set the value of a mgmt item.
|
||||
@ -439,8 +431,6 @@ ocs_mgmt_set(ocs_t *ocs, char *name, char *value)
|
||||
}
|
||||
ocs_device_unlock(ocs);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -497,7 +487,6 @@ ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_in,
|
||||
return mgmt_table[i].action_handler(ocs, action, arg_in, arg_in_length,
|
||||
arg_out, arg_out_length);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +517,6 @@ ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_in,
|
||||
}
|
||||
ocs_device_unlock(ocs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -582,7 +570,6 @@ ocs_mgmt_read_phys(ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length,
|
||||
ocs_ramdisc_t **ramdisc_array;
|
||||
uint32_t ramdisc_count;
|
||||
|
||||
|
||||
if ((arg_in == NULL) ||
|
||||
(arg_in_length == 0) ||
|
||||
(arg_out == NULL) ||
|
||||
@ -634,13 +621,9 @@ ocs_mgmt_read_phys(ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
length = arg_out_length;
|
||||
|
||||
if (vaddr != NULL) {
|
||||
|
||||
if (ocs_copy_to_user(arg_out, vaddr, length)) {
|
||||
ocs_log_test(ocs, "Failed to copy buffer to user\n");
|
||||
return -EFAULT;
|
||||
@ -648,7 +631,6 @@ ocs_mgmt_read_phys(ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length,
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@ -697,22 +679,17 @@ static void* find_address_in_target(ocs_ramdisc_t **ramdisc_array, uint32_t ramd
|
||||
if (vaddr != NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (vaddr != NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return vaddr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static int32_t
|
||||
ocs_mgmt_firmware_reset(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length)
|
||||
{
|
||||
@ -793,8 +770,6 @@ ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, voi
|
||||
}
|
||||
|
||||
while (bytes_left > 0) {
|
||||
|
||||
|
||||
if (bytes_left > FW_WRITE_BUFSIZE) {
|
||||
xfer_size = FW_WRITE_BUFSIZE;
|
||||
} else {
|
||||
@ -843,7 +818,6 @@ ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, voi
|
||||
bytes_left -= result.actual_xfer;
|
||||
offset += result.actual_xfer;
|
||||
userp += result.actual_xfer;
|
||||
|
||||
}
|
||||
|
||||
/* Create string with status and copy to userland */
|
||||
@ -858,7 +832,6 @@ ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, voi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ocs_dma_free(ocs, &dma);
|
||||
|
||||
return rc;
|
||||
@ -2015,7 +1988,6 @@ typedef struct ocs_mgmt_get_port_protocol_result {
|
||||
ocs_hw_port_protocol_e port_protocol;
|
||||
} ocs_mgmt_get_port_protocol_result_t;
|
||||
|
||||
|
||||
static void
|
||||
ocs_mgmt_get_port_protocol_cb(int32_t status,
|
||||
ocs_hw_port_protocol_e port_protocol,
|
||||
@ -2073,8 +2045,6 @@ typedef struct ocs_mgmt_set_port_protocol_result {
|
||||
int32_t status;
|
||||
} ocs_mgmt_set_port_protocol_result_t;
|
||||
|
||||
|
||||
|
||||
static void
|
||||
ocs_mgmt_set_port_protocol_cb(int32_t status,
|
||||
void *arg)
|
||||
@ -2208,7 +2178,6 @@ get_profile_list(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "profile_list", result_buf);
|
||||
|
||||
ocs_free(ocs, result_buf, BUFFER_SIZE);
|
||||
@ -2280,7 +2249,6 @@ typedef struct ocs_mgmt_set_active_profile_result {
|
||||
int32_t status;
|
||||
} ocs_mgmt_set_active_profile_result_t;
|
||||
|
||||
|
||||
static void
|
||||
ocs_mgmt_set_active_profile_cb(int32_t status, void *ul_arg)
|
||||
{
|
||||
@ -2496,7 +2464,6 @@ typedef struct ocs_mgmt_set_nvparms_result {
|
||||
int32_t status;
|
||||
} ocs_mgmt_set_nvparms_result_t;
|
||||
|
||||
|
||||
static void
|
||||
ocs_mgmt_set_nvparms_cb(int32_t status, void *ul_arg)
|
||||
{
|
||||
@ -2728,11 +2695,8 @@ parse_wwn(char *wwn_in, uint64_t *wwn_out)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static char *mode_string(int mode);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup mgmt
|
||||
* @brief Generate the beginning of a numbered section in a management XML document.
|
||||
|
@ -36,7 +36,6 @@
|
||||
* Declarations for the common functions used by ocs_mgmt.
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_MGMT_H__)
|
||||
#define __OCS_MGMT_H__
|
||||
|
||||
@ -59,7 +58,6 @@ typedef struct ocs_mgmt_fw_write_result {
|
||||
uint32_t change_status;
|
||||
} ocs_mgmt_fw_write_result_t;
|
||||
|
||||
|
||||
/*
|
||||
* This structure is used in constructing a table of internal handler functions.
|
||||
*/
|
||||
@ -92,7 +90,6 @@ typedef struct ocs_mgmt_functions_s {
|
||||
ocs_mgmt_exec_handler exec_handler;
|
||||
} ocs_mgmt_functions_t;
|
||||
|
||||
|
||||
/* Helper functions */
|
||||
extern void ocs_mgmt_start_section(ocs_textbuf_t *textbuf, const char *name, int index);
|
||||
extern void ocs_mgmt_start_unnumbered_section(ocs_textbuf_t *textbuf, const char *name);
|
||||
|
@ -68,7 +68,6 @@ static ocs_mgmt_functions_t node_mgmt_functions = {
|
||||
.exec_handler = ocs_mgmt_node_exec,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup node_common
|
||||
* @brief Device node state machine wait for all ELS's to
|
||||
@ -263,7 +262,6 @@ ocs_node_create_pool(ocs_t *ocs, uint32_t node_count)
|
||||
|
||||
ocs_list_init(&xport->nodes_free_list, ocs_node_t, link);
|
||||
|
||||
|
||||
for (i = 0; i < node_count; i ++) {
|
||||
node = ocs_malloc(ocs, sizeof(ocs_node_t), OCS_M_ZERO | OCS_M_NOWAIT);
|
||||
if (node == NULL) {
|
||||
@ -839,7 +837,6 @@ __ocs_node_shutdown(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
* (or both); in either case, return to initial state
|
||||
*/
|
||||
ocs_node_init_device(node, send_plogi);
|
||||
|
||||
}
|
||||
/* else: let node shutdown occur */
|
||||
break;
|
||||
@ -931,7 +928,6 @@ ocs_node_initiate_cleanup(ocs_node_t *node)
|
||||
/* first cleanup ELS's that are pending (not yet active) */
|
||||
ocs_lock(&node->active_ios_lock);
|
||||
ocs_list_foreach_safe(&node->els_io_pend_list, els, els_next) {
|
||||
|
||||
/* skip the ELS IO for which a response will be sent after shutdown */
|
||||
if ((node->send_ls_acc != OCS_NODE_SEND_LS_ACC_NONE) &&
|
||||
(els == node->ls_acc_io)) {
|
||||
@ -1002,7 +998,6 @@ __ocs_node_wait_els_shutdown(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
node_sm_trace();
|
||||
|
||||
switch(evt) {
|
||||
|
||||
case OCS_EVT_ENTER: {
|
||||
ocs_node_hold_frames(node);
|
||||
if (ocs_els_io_list_empty(node, &node->els_io_active_list)) {
|
||||
@ -1089,7 +1084,6 @@ __ocs_node_wait_node_free(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
node_sm_trace();
|
||||
|
||||
switch(evt) {
|
||||
|
||||
case OCS_EVT_ENTER:
|
||||
ocs_node_hold_frames(node);
|
||||
break;
|
||||
@ -1341,7 +1335,6 @@ __ocs_node_common(const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, v
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup node_common
|
||||
* @brief save node service parameters
|
||||
@ -1697,7 +1690,6 @@ node_check_ns_req(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg, uint32_t cmd
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ocs_mgmt_node_list(ocs_textbuf_t *textbuf, void *object)
|
||||
{
|
||||
@ -1907,7 +1899,6 @@ ocs_mgmt_node_set(char *parent, char *name, char *value, void *object)
|
||||
|
||||
/* If it doesn't start with my qualifier I don't know what to do with it */
|
||||
if (ocs_strncmp(name, qualifier, strlen(qualifier)) == 0) {
|
||||
|
||||
ocs_lock(&node->active_ios_lock);
|
||||
ocs_list_foreach(&node->active_ios, io) {
|
||||
if ((io->mgmt_functions) && (io->mgmt_functions->set_handler)) {
|
||||
@ -1917,10 +1908,8 @@ ocs_mgmt_node_set(char *parent, char *name, char *value, void *object)
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_unlock(&node->active_ios_lock);
|
||||
|
||||
}
|
||||
|
||||
return retval;
|
||||
@ -1957,7 +1946,6 @@ ocs_mgmt_node_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_len
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_unlock(&node->active_ios_lock);
|
||||
}
|
||||
@ -1966,8 +1954,6 @@ ocs_mgmt_node_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_len
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Return TRUE if active ios list is empty
|
||||
*
|
||||
|
@ -39,7 +39,6 @@
|
||||
#if !defined(__OCS_NODE_H__)
|
||||
#define __OCS_NODE_H__
|
||||
|
||||
|
||||
#define node_sm_trace() \
|
||||
do { \
|
||||
if (OCS_LOG_ENABLE_SM_TRACE(node->ocs)) \
|
||||
@ -214,7 +213,6 @@ extern void ocs_node_post_event(ocs_node_t *node, ocs_sm_event_t evt, void *arg)
|
||||
extern void ocs_node_transition(ocs_node_t *node, ocs_sm_function_t state, void *data);
|
||||
extern void *__ocs_node_common(const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg);
|
||||
|
||||
|
||||
extern void ocs_node_initiate_cleanup(ocs_node_t *node);
|
||||
extern int ocs_ddump_node(ocs_textbuf_t *textbuf, ocs_node_t *node);
|
||||
|
||||
|
@ -920,7 +920,6 @@ ocs_get_num_cpus(void)
|
||||
return cpuinfo.num_cpus;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__ocs_callout(void *t)
|
||||
{
|
||||
|
@ -268,7 +268,6 @@ static inline uint32_t ocs_lg2(uint32_t val)
|
||||
#define ocs_htobe16(v) htobe16(v)
|
||||
#define ocs_be16toh(v) be16toh(v)
|
||||
|
||||
|
||||
#define ocs_htobe64(v) htobe64(v)
|
||||
#define ocs_be64toh(v) be64toh(v)
|
||||
|
||||
@ -522,7 +521,6 @@ extern void ocs_dma_sync(ocs_dma_t *, uint32_t);
|
||||
#define OCS_DMASYNC_PREWRITE BUS_DMASYNC_PREWRITE
|
||||
#define OCS_DMASYNC_POSTREAD BUS_DMASYNC_POSTREAD
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* Locking
|
||||
*/
|
||||
@ -999,7 +997,6 @@ typedef enum {
|
||||
OCS_THREAD_CREATE, /*<< create and wait for start request */
|
||||
} ocs_thread_start_e;
|
||||
|
||||
|
||||
extern int32_t ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *thread, ocs_thread_fctn fctn,
|
||||
const char *name, void *arg, ocs_thread_start_e start_option);
|
||||
extern int32_t ocs_thread_start(ocs_thread_t *thread);
|
||||
@ -1012,7 +1009,6 @@ extern ocs_thread_t *ocs_thread_self(void);
|
||||
extern int32_t ocs_thread_setcpu(ocs_thread_t *thread, uint32_t cpu);
|
||||
extern int32_t ocs_thread_getcpu(void);
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* PCI
|
||||
*
|
||||
@ -1062,7 +1058,6 @@ ocs_get_bus_dev_func(ocs_t *ocs, uint8_t* bus, uint8_t* dev, uint8_t* func);
|
||||
extern ocs_t *ocs_get_instance(uint32_t index);
|
||||
extern uint32_t ocs_instance(void *os);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup os
|
||||
* @brief Read a 32 bit value from the specified configuration register
|
||||
|
@ -134,7 +134,6 @@ ocs_map_bars(device_t dev, struct ocs_softc *ocs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ocs_setup_params(struct ocs_softc *ocs)
|
||||
{
|
||||
@ -172,7 +171,6 @@ ocs_setup_params(struct ocs_softc *ocs)
|
||||
if (!ocs->config_ini && !ocs->config_tgt) {
|
||||
device_printf(ocs->dev, "Unsupported, both initiator and target mode disabled.\n");
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev),
|
||||
@ -284,7 +282,6 @@ ocs_setup_params(struct ocs_softc *ocs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev),
|
||||
"external_loopback", &i)) {
|
||||
device_printf(ocs->dev, "external_loopback = %d\n", i);
|
||||
@ -313,7 +310,7 @@ ocs_setup_params(struct ocs_softc *ocs)
|
||||
ocs->rq_selection_policy = 0;
|
||||
ocs->rr_quanta = 1;
|
||||
ocs->filter_def = "0,0,0,0";
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -422,7 +419,7 @@ ocs_device_attach(ocs_t *ocs)
|
||||
}
|
||||
|
||||
ocs->attached = true;
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
fail_xport_online:
|
||||
@ -465,7 +462,7 @@ ocs_pci_attach(device_t dev)
|
||||
int instance;
|
||||
|
||||
instance = device_get_unit(dev);
|
||||
|
||||
|
||||
ocs = (struct ocs_softc *)device_get_softc(dev);
|
||||
if (NULL == ocs) {
|
||||
device_printf(dev, "cannot allocate softc\n");
|
||||
@ -496,7 +493,7 @@ ocs_pci_attach(device_t dev)
|
||||
device_printf(dev, "Failed to map pci bars\n");
|
||||
goto release_bus;
|
||||
}
|
||||
|
||||
|
||||
/* create a root DMA tag for the device */
|
||||
if (bus_dma_tag_create(bus_get_dma_tag(dev),
|
||||
1, /* byte alignment */
|
||||
@ -601,13 +598,11 @@ ocs_device_detach(ocs_t *ocs)
|
||||
bus_dma_tag_destroy(ocs->dmat);
|
||||
ocs_xport_free(ocs->xport);
|
||||
ocs->xport = NULL;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Detach the driver from the given device
|
||||
*
|
||||
@ -782,7 +777,6 @@ ocs_intr_setup(struct ocs_softc *ocs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Detach an interrupt handler
|
||||
*
|
||||
@ -960,4 +954,3 @@ static devclass_t ocs_devclass;
|
||||
|
||||
DRIVER_MODULE(ocs_fc, pci, ocs_driver, ocs_devclass, 0, 0);
|
||||
MODULE_VERSION(ocs_fc, 1);
|
||||
|
||||
|
@ -39,8 +39,7 @@
|
||||
/**
|
||||
* @defgroup scsi_api_base SCSI Base Target/Initiator
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "ocs.h"
|
||||
#include "ocs_els.h"
|
||||
#include "ocs_scsi.h"
|
||||
@ -91,7 +90,6 @@ static int32_t ocs_scsi_io_dispatch_hw_io(ocs_io_t *io, ocs_hw_io_t *hio);
|
||||
static int32_t ocs_scsi_io_dispatch_no_hw_io(ocs_io_t *io);
|
||||
static void _ocs_scsi_io_free(void *arg);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup scsi_api_base
|
||||
* @brief Returns a big-endian 32-bit value given a pointer.
|
||||
@ -294,8 +292,6 @@ ocs_scsi_io_free(ocs_io_t *io)
|
||||
ocs_ref_put(&io->ref); /* ocs_ref_get(): ocs_scsi_io_alloc() */
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int32_t
|
||||
ocs_scsi_send_io(ocs_hw_io_type_e type, ocs_node_t *node, ocs_io_t *io, uint64_t lun,
|
||||
ocs_scsi_tmf_cmd_e tmf, uint8_t *cdb, uint32_t cdb_len,
|
||||
@ -436,7 +432,6 @@ ocs_target_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length,
|
||||
}
|
||||
|
||||
cb(io, scsi_status, flags, io->scsi_tgt_cb_arg);
|
||||
|
||||
}
|
||||
ocs_scsi_check_pending(ocs);
|
||||
}
|
||||
@ -551,7 +546,6 @@ ocs_scsi_dif_check_unknown(ocs_io_t *io, uint32_t length, uint32_t check_length,
|
||||
scsi_status = OCS_SCSI_STATUS_DIF_REF_TAG_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return scsi_status;
|
||||
}
|
||||
@ -669,7 +663,6 @@ ocs_scsi_count_sgls(ocs_hw_dif_info_t *hw_dif, ocs_scsi_sgl_t *sgl, uint32_t sgl
|
||||
|
||||
/* Convert DIF Information */
|
||||
if (hw_dif->dif_oper != OCS_HW_DIF_OPER_DISABLED) {
|
||||
|
||||
/* If we're not DIF separate, then emit a seed SGE */
|
||||
if (!hw_dif->dif_separate) {
|
||||
count++;
|
||||
@ -709,7 +702,6 @@ ocs_scsi_build_sgls(ocs_hw_t *hw, ocs_hw_io_t *hio, ocs_hw_dif_info_t *hw_dif, o
|
||||
|
||||
/* Convert DIF Information */
|
||||
if (hw_dif->dif_oper != OCS_HW_DIF_OPER_DISABLED) {
|
||||
|
||||
/* If we're not DIF separate, then emit a seed SGE */
|
||||
if (!hw_dif->dif_separate) {
|
||||
rc = ocs_hw_io_add_seed_sge(hw, hio, hw_dif);
|
||||
@ -786,7 +778,6 @@ ocs_scsi_build_sgls(ocs_hw_t *hw, ocs_hw_io_t *hio, ocs_hw_dif_info_t *hw_dif, o
|
||||
sgl_count, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -955,7 +946,6 @@ static void ocs_log_sgl(ocs_io_t *io)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check pending error asynchronous callback function.
|
||||
*
|
||||
@ -1066,7 +1056,6 @@ ocs_scsi_check_pending(ocs_t *ocs)
|
||||
}
|
||||
} while (io != NULL);
|
||||
|
||||
|
||||
/*
|
||||
* If nothing was removed from the list,
|
||||
* we might be in a case where we need to abort an
|
||||
@ -1179,7 +1168,6 @@ ocs_scsi_io_dispatch(ocs_io_t *io, void *cb)
|
||||
*/
|
||||
hio = ocs_hw_io_alloc(&io->ocs->hw);
|
||||
if (hio == NULL) {
|
||||
|
||||
/* Couldn't get a HW IO. Save this IO on the pending list */
|
||||
ocs_lock(&xport->io_pending_lock);
|
||||
ocs_list_add_tail(&xport->io_pending_list, io);
|
||||
@ -1284,7 +1272,6 @@ ocs_scsi_io_dispatch_hw_io(ocs_io_t *io, ocs_hw_io_t *hio)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch (io->io_type) {
|
||||
case OCS_IO_TYPE_IO: {
|
||||
uint32_t max_sgl;
|
||||
@ -1582,7 +1569,6 @@ ocs_scsi_xfer_data(ocs_io_t *io, uint32_t flags,
|
||||
return ocs_scsi_io_dispatch(io, ocs_target_io_cb);
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
ocs_scsi_send_rd_data(ocs_io_t *io, uint32_t flags,
|
||||
ocs_scsi_dif_info_t *dif_info,
|
||||
@ -1843,7 +1829,6 @@ ocs_scsi_send_tmf_resp(ocs_io_t *io, ocs_scsi_tmf_resp_e rspcode, uint8_t addl_r
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Process target abort callback.
|
||||
*
|
||||
@ -2117,7 +2102,6 @@ ocs_scsi_io_complete(ocs_io_t *io)
|
||||
ocs_ref_put(&io->ref); /* ocs_ref_get(): ocs_scsi_io_alloc() */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Handle initiator IO completion.
|
||||
*
|
||||
@ -2245,7 +2229,6 @@ ocs_initiator_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length,
|
||||
}
|
||||
|
||||
cb(io, scsi_status, &rsp, flags, io->scsi_ini_cb_arg);
|
||||
|
||||
}
|
||||
ocs_scsi_check_pending(ocs);
|
||||
}
|
||||
@ -2543,7 +2526,6 @@ static int32_t ocs_scsi_send_io(ocs_hw_io_type_e type, ocs_node_t *node, ocs_io_
|
||||
ocs_textbuf_get_buffer(&txtbuf));
|
||||
}
|
||||
|
||||
|
||||
ocs_assert(io->cmdbuf.virt, -1);
|
||||
|
||||
cmnd = io->cmdbuf.virt;
|
||||
@ -2576,7 +2558,7 @@ static int32_t ocs_scsi_send_io(ocs_hw_io_type_e type, ocs_node_t *node, ocs_io_
|
||||
}
|
||||
|
||||
be64enc(cmnd->fcp_lun, CAM_EXTLUN_BYTE_SWIZZLE(lun));
|
||||
|
||||
|
||||
if (node->fcp2device) {
|
||||
if(ocs_get_crn(node, &cmnd->command_reference_number,
|
||||
lun)) {
|
||||
@ -2895,7 +2877,6 @@ ocs_scsi_del_initiator_complete(ocs_node_t *node)
|
||||
ocs_node_post_event(node, OCS_EVT_NODE_DEL_INI_COMPLETE, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup scsi_api_base
|
||||
* @brief Notify that delete target is complete.
|
||||
@ -2916,7 +2897,6 @@ ocs_scsi_del_target_complete(ocs_node_t *node)
|
||||
ocs_node_post_event(node, OCS_EVT_NODE_DEL_TGT_COMPLETE, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Update transferred count
|
||||
*
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "ocs_mgmt.h"
|
||||
#include "ocs_utils.h"
|
||||
|
||||
|
||||
/* ocs_scsi_rcv_cmd() ocs_scsi_rcv_tmf() flags */
|
||||
#define OCS_SCSI_CMD_DIR_IN (1U << 0)
|
||||
#define OCS_SCSI_CMD_DIR_OUT (1U << 1)
|
||||
@ -130,8 +129,6 @@ typedef enum {
|
||||
#define SCSI_STATUS_ACA_ACTIVE 0x30
|
||||
#define SCSI_STATUS_TASK_ABORTED 0x40
|
||||
|
||||
|
||||
|
||||
/* Callback used by send_rd_data(), recv_wr_data(), send_resp() */
|
||||
typedef int32_t (*ocs_scsi_io_cb_t)(ocs_io_t *io, ocs_scsi_io_status_e status, uint32_t flags,
|
||||
void *arg);
|
||||
@ -232,7 +229,6 @@ typedef struct ocs_scsi_sgl_s {
|
||||
size_t len; /**< length */
|
||||
} ocs_scsi_sgl_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief T10 DIF information passed to the transport
|
||||
*/
|
||||
@ -304,7 +300,6 @@ extern int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lun, ocs_scsi_tmf_cmd
|
||||
extern ocs_sport_t *ocs_sport_get_instance(ocs_domain_t *domain, uint32_t index);
|
||||
extern ocs_domain_t *ocs_domain_get_instance(ocs_t *ocs, uint32_t index);
|
||||
|
||||
|
||||
/* Calls from target-server to base driver */
|
||||
|
||||
extern int32_t ocs_scsi_send_rd_data(ocs_io_t *io, uint32_t flags,
|
||||
@ -395,7 +390,6 @@ extern int32_t ocs_scsi_dif_set_blocksize(ocs_scsi_dif_info_t *dif_info, uint32_
|
||||
extern int32_t ocs_scsi_dif_mem_blocksize(ocs_scsi_dif_info_t *dif_info, int wiretomem);
|
||||
extern int32_t ocs_scsi_dif_wire_blocksize(ocs_scsi_dif_info_t *dif_info, int wiretomem);
|
||||
|
||||
|
||||
uint32_t ocs_get_crn(ocs_node_t *node, uint8_t *crn, uint64_t lun);
|
||||
void ocs_del_crn(ocs_node_t *node);
|
||||
void ocs_reset_crn(ocs_node_t *node, uint64_t lun);
|
||||
@ -434,7 +428,6 @@ ocs_scsi_notify_sport_force_free(ocs_sport_t *sport)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Notification from base driver that node is in force-free path.
|
||||
*
|
||||
|
@ -36,7 +36,6 @@
|
||||
* Details SLI port (sport) functions.
|
||||
*/
|
||||
|
||||
|
||||
#include "ocs.h"
|
||||
#include "ocs_fabric.h"
|
||||
#include "ocs_els.h"
|
||||
@ -456,7 +455,6 @@ ocs_sport_attach(ocs_sport_t *sport, uint32_t fc_id)
|
||||
ocs_log_debug(ocs, "[%s] %-20s\n", sport->display_name, ocs_sm_event_name(evt)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
* @brief SLI port state machine: Common event handler.
|
||||
*
|
||||
@ -635,7 +633,6 @@ __ocs_sport_vport_init(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -1043,7 +1040,7 @@ ocs_sport_vport_new(ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn,
|
||||
sport->is_vport = 1;
|
||||
sport->tgt_data = tgt_data;
|
||||
sport->ini_data = ini_data;
|
||||
|
||||
|
||||
/* Transition to vport_init */
|
||||
ocs_sm_transition(&sport->sm, __ocs_sport_vport_init, NULL);
|
||||
|
||||
@ -1253,7 +1250,6 @@ ocs_ddump_sport(ocs_textbuf_t *textbuf, ocs_sli_port_t *sport)
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ocs_mgmt_sport_list(ocs_textbuf_t *textbuf, void *object)
|
||||
{
|
||||
@ -1278,13 +1274,11 @@ ocs_mgmt_sport_list(ocs_textbuf_t *textbuf, void *object)
|
||||
ocs_mgmt_emit_property_name(textbuf, MGMT_MODE_RD, "wwnn");
|
||||
|
||||
if (ocs_sport_lock_try(sport) == TRUE) {
|
||||
|
||||
/* If we get here, then we are holding the sport lock */
|
||||
ocs_list_foreach(&sport->node_list, node) {
|
||||
if ((node->mgmt_functions) && (node->mgmt_functions->get_list_handler)) {
|
||||
node->mgmt_functions->get_list_handler(textbuf, node);
|
||||
}
|
||||
|
||||
}
|
||||
ocs_sport_unlock(sport);
|
||||
}
|
||||
@ -1427,7 +1421,6 @@ ocs_mgmt_sport_set(char *parent, char *name, char *value, void *object)
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ocs_mgmt_sport_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_length,
|
||||
void *arg_out, uint32_t arg_out_length, void *object)
|
||||
@ -1441,7 +1434,6 @@ ocs_mgmt_sport_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_le
|
||||
|
||||
/* If it doesn't start with my qualifier I don't know what to do with it */
|
||||
if (ocs_strncmp(action, qualifier, strlen(qualifier)) == 0) {
|
||||
|
||||
/* See if it's an action I can perform */
|
||||
|
||||
/* if (ocs_strcmp ....
|
||||
@ -1461,7 +1453,6 @@ ocs_mgmt_sport_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_le
|
||||
if (retval == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
ocs_sport_unlock(sport);
|
||||
}
|
||||
@ -1759,10 +1750,8 @@ ocs_remote_node_group_alloc(ocs_node_group_dir_t *node_group_dir)
|
||||
sport = node_group_dir->sport;
|
||||
ocs = sport->ocs;
|
||||
|
||||
|
||||
node_group = ocs_malloc(ocs, sizeof(*node_group), OCS_M_ZERO | OCS_M_NOWAIT);
|
||||
if (node_group != NULL) {
|
||||
|
||||
/* set pointer to node group directory */
|
||||
node_group->node_group_dir = node_group_dir;
|
||||
|
||||
@ -1809,7 +1798,6 @@ ocs_remote_node_group_free(ocs_remote_node_group_t *node_group)
|
||||
ocs_node_group_dir_t *node_group_dir;
|
||||
|
||||
if (node_group != NULL) {
|
||||
|
||||
ocs_assert(node_group->node_group_dir);
|
||||
ocs_assert(node_group->node_group_dir->sport);
|
||||
ocs_assert(node_group->node_group_dir->sport->ocs);
|
||||
@ -1922,5 +1910,3 @@ ocs_node_group_init(ocs_node_t *node)
|
||||
|
||||
return (hrc == OCS_HW_RTN_SUCCESS) ? 0 : -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,6 +108,4 @@ extern void ocs_remote_node_group_free(ocs_remote_node_group_t *node_group);
|
||||
extern int ocs_node_group_init(ocs_node_t *node);
|
||||
extern void ocs_node_group_free(ocs_node_t *node);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -36,7 +36,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__OCS_STATS_H__)
|
||||
#define __OCS_STATS_H__
|
||||
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include "ocs_fabric.h"
|
||||
#include "ocs_device.h"
|
||||
|
||||
|
||||
#define frame_printf(ocs, hdr, fmt, ...) \
|
||||
do { \
|
||||
char s_id_text[16]; \
|
||||
@ -125,7 +124,6 @@ ocs_unsol_abort_cb (ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t len, in
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup unsol
|
||||
* @brief Abort either a RQ Pair auto XFER RDY XRI.
|
||||
@ -557,7 +555,6 @@ ocs_domain_accept_frames(ocs_domain_t *domain)
|
||||
ocs_domain_process_pending(domain);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup unsol
|
||||
* @brief Dispatch unsolicited FC frame.
|
||||
@ -1138,7 +1135,6 @@ ocs_dispatch_fcp_data(ocs_node_t *node, ocs_hw_sequence_t *seq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup unsol
|
||||
* @brief Handle the callback for the TMF FUNCTION_REJECTED response.
|
||||
|
@ -416,7 +416,6 @@ ocs_varray_get_count(ocs_varray_t *va)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
struct ocs_cbuf_s {
|
||||
ocs_os_handle_t os; /*<< OS handle */
|
||||
uint32_t entry_count; /*<< entry count */
|
||||
@ -660,7 +659,6 @@ ocs_ddump_value(ocs_textbuf_t *textbuf, const char *name, const char *fmt, ...)
|
||||
ocs_textbuf_printf(textbuf, "<%s>%s</%s>\n", name, valuebuf, name);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Generate driver dump data for an arbitrary buffer of DWORDS
|
||||
*
|
||||
@ -739,7 +737,6 @@ ocs_ddump_queue_entries(ocs_textbuf_t *textbuf, void *q_addr, uint32_t size,
|
||||
if (index < 0) {
|
||||
index += length;
|
||||
}
|
||||
|
||||
}
|
||||
#define OCS_NEWLINE_MOD 8
|
||||
ocs_textbuf_printf(textbuf, "<qentries>\n");
|
||||
@ -768,7 +765,6 @@ ocs_ddump_queue_entries(ocs_textbuf_t *textbuf, void *q_addr, uint32_t size,
|
||||
ocs_textbuf_printf(textbuf, "</qentries>\n");
|
||||
}
|
||||
|
||||
|
||||
#define OCS_DEBUG_ENABLE(x) (x ? ~0 : 0)
|
||||
|
||||
#define OCS_DEBUG_MASK \
|
||||
@ -835,7 +831,6 @@ int ocs_debug_is_enabled(uint32_t mask) {
|
||||
return (ocs_debug_mask & mask) == mask;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup debug
|
||||
* @brief Dump 32 bit hex/ascii data
|
||||
@ -900,7 +895,6 @@ ocs_dump32(uint32_t mask, ocs_os_handle_t os, const char *label, void *buf, uint
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined(OCS_DEBUG_QUEUE_HISTORY)
|
||||
|
||||
/* each bit corresponds to word to capture */
|
||||
@ -1465,7 +1459,6 @@ ocs_scsi_dif_wire_blocksize(ocs_scsi_dif_info_t *dif_info, int wiretomem)
|
||||
DIF_SIZE, /* OCS_SCSI_DIF_OPER_IN_CHKSUM_OUT_CRC, */
|
||||
DIF_SIZE}; /* OCS_SCSI_DIF_OPER_IN_RAW_OUT_RAW, */
|
||||
|
||||
|
||||
blocksize = ocs_scsi_dif_blocksize(dif_info);
|
||||
if (blocksize == 0) {
|
||||
return -1;
|
||||
@ -1610,7 +1603,6 @@ ocs_hw_dif_wire_blocksize(ocs_hw_dif_info_t *dif_info, int wiretomem)
|
||||
DIF_SIZE, /* OCS_HW_DIF_OPER_IN_CHKSUM_OUT_CRC, */
|
||||
DIF_SIZE}; /* OCS_HW_DIF_OPER_IN_RAW_OUT_RAW, */
|
||||
|
||||
|
||||
blocksize = ocs_hw_dif_blocksize(dif_info);
|
||||
if (blocksize == 0) {
|
||||
return -1;
|
||||
@ -1852,11 +1844,9 @@ ocs_textbuf_vprintf(ocs_textbuf_t *textbuf, const char *fmt, va_list ap)
|
||||
|
||||
/* See if data was truncated */
|
||||
if (written >= avail) {
|
||||
|
||||
written = avail;
|
||||
|
||||
if (textbuf->extendable) {
|
||||
|
||||
/* revert the partially written data */
|
||||
*(segment->buffer + segment->buffer_written) = 0;
|
||||
|
||||
@ -1915,7 +1905,6 @@ ocs_textbuf_buffer(ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_leng
|
||||
|
||||
s = (char*) buffer;
|
||||
while(*s) {
|
||||
|
||||
/*
|
||||
* XML escapes
|
||||
*
|
||||
@ -2005,8 +1994,6 @@ ocs_textbuf_reset(ocs_textbuf_t *textbuf)
|
||||
* resulting in 10k.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup spv
|
||||
* @brief Allocate a new sparse vector row.
|
||||
@ -2027,8 +2014,6 @@ static void
|
||||
return ocs_malloc(os, sizeof(void*) * rowcount, OCS_M_ZERO | OCS_M_NOWAIT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup spv
|
||||
* @brief Delete row recursively.
|
||||
@ -2233,7 +2218,6 @@ void
|
||||
* applicable SDK sources.
|
||||
*/
|
||||
|
||||
|
||||
static unsigned short crctable[256] =
|
||||
{
|
||||
0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B,
|
||||
@ -2574,7 +2558,6 @@ typedef struct {
|
||||
ocs_list_link_t link;
|
||||
} pool_hdr_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Allocate a memory pool.
|
||||
*
|
||||
|
@ -62,7 +62,6 @@ extern void ocs_varray_lock(ocs_varray_t *ai);
|
||||
extern void ocs_varray_unlock(ocs_varray_t *ai);
|
||||
extern uint32_t ocs_varray_get_count(ocs_varray_t *ai);
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* Circular buffer
|
||||
*
|
||||
@ -81,7 +80,6 @@ typedef struct {
|
||||
uint32_t length;
|
||||
} ocs_scsi_vaddr_len_t;
|
||||
|
||||
|
||||
#define OCS_TEXTBUF_MAX_ALLOC_LEN (256*1024)
|
||||
|
||||
typedef struct {
|
||||
@ -122,7 +120,6 @@ extern uint8_t *ocs_textbuf_ext_get_buffer(ocs_textbuf_t *textbuf, uint32_t idx)
|
||||
extern int32_t ocs_textbuf_ext_get_length(ocs_textbuf_t *textbuf, uint32_t idx);
|
||||
extern int32_t ocs_textbuf_ext_get_written(ocs_textbuf_t *textbuf, uint32_t idx);
|
||||
|
||||
|
||||
typedef struct ocs_pool_s ocs_pool_t;
|
||||
|
||||
extern ocs_pool_t *ocs_pool_alloc(ocs_os_handle_t os, uint32_t size, uint32_t count, uint32_t use_lock);
|
||||
@ -134,12 +131,10 @@ extern uint32_t ocs_pool_get_count(ocs_pool_t *pool);
|
||||
extern void *ocs_pool_get_instance(ocs_pool_t *pool, uint32_t idx);
|
||||
extern uint32_t ocs_pool_get_freelist_count(ocs_pool_t *pool);
|
||||
|
||||
|
||||
/* Uncomment this line to enable logging extended queue history
|
||||
*/
|
||||
//#define OCS_DEBUG_QUEUE_HISTORY
|
||||
|
||||
|
||||
/* Allocate maximum allowed (4M) */
|
||||
#if defined(OCS_DEBUG_QUEUE_HISTORY)
|
||||
#define OCS_Q_HIST_SIZE (1000000UL) /* Size in words */
|
||||
@ -153,7 +148,6 @@ extern uint32_t ocs_pool_get_freelist_count(ocs_pool_t *pool);
|
||||
#define OCS_LOG_ENABLE_Q_FULL_BUSY_MSG(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 5)) != 0) : 0)
|
||||
#define OCS_LOG_ENABLE_IO_ERRORS(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 6)) != 0) : 0)
|
||||
|
||||
|
||||
extern void ocs_dump32(uint32_t, ocs_os_handle_t, const char *, void *, uint32_t);
|
||||
extern void ocs_debug_enable(uint32_t mask);
|
||||
extern void ocs_debug_disable(uint32_t mask);
|
||||
@ -176,7 +170,6 @@ typedef union ocs_q_hist_ftr_u {
|
||||
} s;
|
||||
} ocs_q_hist_ftr_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief WQE command mask lookup
|
||||
*/
|
||||
@ -262,7 +255,6 @@ extern void _ocs_assert(const char *cond, const char *filename, int linenum);
|
||||
extern void ocs_dump_service_params(const char *label, void *sparms);
|
||||
extern void ocs_display_sparams(const char *prelabel, const char *reqlabel, int dest, void *textbuf, void *sparams);
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t crc;
|
||||
uint16_t app_tag;
|
||||
@ -308,7 +300,6 @@ extern const char *ocs_pm_get_state_string(ocs_t *ocs);
|
||||
#define SPV_ROWLEN 256
|
||||
#define SPV_DIM 3
|
||||
|
||||
|
||||
/*!
|
||||
* @defgroup spv Sparse Vector
|
||||
*/
|
||||
|
@ -174,7 +174,6 @@ ocs_find_vpd(uint8_t *vpddata, uint32_t vpddata_length, const char *key)
|
||||
}
|
||||
/* check for "RV" end */
|
||||
} else if ('R' == rc0 && 'V' == rc1) {
|
||||
|
||||
/* Read the checksum */
|
||||
for (i = 0; i < sublen; i++) {
|
||||
vpdnext(&vpdbuf);
|
||||
|
@ -545,12 +545,10 @@ ocs_xport_initialize(ocs_xport_t *xport)
|
||||
} else {
|
||||
ini_device_set = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Add vports */
|
||||
if (ocs->num_vports != 0) {
|
||||
|
||||
uint32_t max_vports;
|
||||
ocs_hw_get(&ocs->hw, OCS_HW_MAX_VPORTS, &max_vports);
|
||||
|
||||
@ -877,7 +875,6 @@ ocs_xport_control(ocs_xport_t *xport, ocs_xport_ctrl_e cmd, ...)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1053,7 +1050,6 @@ ocs_xport_link_stats_cb(int32_t status, uint32_t num_counters, ocs_hw_link_stat_
|
||||
ocs_sem_v(&(result->stats.semaphore));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ocs_xport_host_stats_cb(int32_t status, uint32_t num_counters, ocs_hw_host_stat_counts_t *counters, void *arg)
|
||||
{
|
||||
@ -1067,7 +1063,6 @@ ocs_xport_host_stats_cb(int32_t status, uint32_t num_counters, ocs_hw_host_stat_
|
||||
ocs_sem_v(&(result->stats.semaphore));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free a transport object.
|
||||
*
|
||||
|
@ -201,7 +201,6 @@ struct ocs_xport_s {
|
||||
ocs_xport_stats_t fc_xport_stats;
|
||||
};
|
||||
|
||||
|
||||
extern ocs_xport_t *ocs_xport_alloc(ocs_t *ocs);
|
||||
extern int32_t ocs_xport_attach(ocs_xport_t *xport);
|
||||
extern int32_t ocs_xport_initialize(ocs_xport_t *xport);
|
||||
|
@ -434,7 +434,6 @@ sli_dump_bmbx_command(sli4_t *sli4, void *mbx, const char *prefix)
|
||||
ocs_addr32_hi(sli4->bmbx_non_emb_pmd->phys),
|
||||
ocs_addr32_lo(sli4->bmbx_non_emb_pmd->phys));
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
/* not an SLI_CONFIG command, just display first 64 bytes, like we do
|
||||
@ -1390,7 +1389,6 @@ sli_cmd_sli_config(sli4_t *sli4, void *buf, size_t size, uint32_t length, ocs_dm
|
||||
/* save pointer to DMA for BMBX dumping purposes */
|
||||
sli4->bmbx_non_emb_pmd = dma;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
return offsetof(sli4_cmd_sli_config_t, payload.embed);
|
||||
@ -1607,7 +1605,6 @@ sli_cmd_unreg_vpi(sli4_t *sli4, void *buf, size_t size, uint16_t indicator, uint
|
||||
return sizeof(sli4_cmd_unreg_vpi_t);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Write an CONFIG_AUTO_XFER_RDY command to the provided buffer.
|
||||
@ -1765,7 +1762,6 @@ sli_cmd_common_create_cq(sli4_t *sli4, void *buf, size_t size,
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* now that we have the mailbox command size, we can set SLI_CONFIG fields */
|
||||
if (SLI4_PORT_TYPE_FC == sli4->port_type) {
|
||||
uint32_t payload_size;
|
||||
@ -2030,7 +2026,6 @@ sli_cmd_common_create_eq(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *qmem,
|
||||
return(sli_config_off + sizeof(sli4_req_common_create_eq_t));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Write a COMMON_DESTROY_EQ command.
|
||||
*
|
||||
@ -2102,7 +2097,7 @@ sli4_cmd_lowlevel_set_watchdog(sli4_t *sli4, void *buf, size_t size, uint16_t ti
|
||||
req->hdr.subsystem = SLI4_SUBSYSTEM_LOWLEVEL;
|
||||
req->hdr.request_length = sizeof(sli4_req_lowlevel_set_watchdog_t) - sizeof(sli4_req_hdr_t);
|
||||
req->watchdog_timeout = timeout;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2484,7 +2479,6 @@ sli_cmd_common_get_port_name(sli4_t *sli4, void *buf, size_t size)
|
||||
return sli_config_off + port_name->hdr.request_length;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Write a COMMON_WRITE_OBJECT command.
|
||||
@ -2541,11 +2535,9 @@ sli_cmd_common_write_object(sli4_t *sli4, void *buf, size_t size,
|
||||
host_buffer->u.data.buffer_address_low = ocs_addr32_lo(dma->phys);
|
||||
host_buffer->u.data.buffer_address_high = ocs_addr32_hi(dma->phys);
|
||||
|
||||
|
||||
return(sli_config_off + sizeof(sli4_req_common_write_object_t) + sizeof (sli4_bde_t));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Write a COMMON_DELETE_OBJECT command.
|
||||
@ -2639,7 +2631,6 @@ sli_cmd_common_read_object(sli4_t *sli4, void *buf, size_t size,
|
||||
host_buffer->u.data.buffer_address_high = 0;
|
||||
}
|
||||
|
||||
|
||||
return(sli_config_off + sizeof(sli4_req_common_read_object_t) + sizeof (sli4_bde_t));
|
||||
}
|
||||
|
||||
@ -2740,7 +2731,6 @@ sli_cmd_common_set_dump_location(sli4_t *sli4, void *buf, size_t size,
|
||||
return(sli_config_off + sizeof(sli4_req_common_set_dump_location_t));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Write a COMMON_SET_FEATURES command.
|
||||
@ -3094,7 +3084,6 @@ sli_cmd_common_set_reconfig_link_id(sli4_t *sli4, void *buf, size_t size, ocs_dm
|
||||
return(cmd_off + sizeof(sli4_req_common_set_reconfig_link_id_t));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Check the mailbox/queue completion entry.
|
||||
@ -3238,7 +3227,6 @@ sli_common_function_reset(sli4_t *sli4)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief check to see if the FW is ready.
|
||||
*
|
||||
@ -3587,7 +3575,6 @@ sli_query_fw_config(sli4_t *sli4)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int32_t
|
||||
sli_get_config(sli4_t *sli4)
|
||||
{
|
||||
@ -4584,14 +4571,12 @@ sli_queue_alloc(sli4_t *sli4, uint32_t qtype, sli4_queue_t *q, uint32_t n_entrie
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (__sli_queue_init(sli4, q, qtype, size, n_entries, align)) {
|
||||
ocs_log_err(sli4->os, "%s allocation failed\n", SLI_QNAME[qtype]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (create(sli4, sli4->bmbx.virt, SLI4_BMBX_SIZE, &q->dma, assoc ? assoc->id : 0, ulp)) {
|
||||
|
||||
if (__sli_create_queue(sli4, q)) {
|
||||
ocs_log_err(sli4->os, "create %s failed\n", SLI_QNAME[qtype]);
|
||||
return -1;
|
||||
@ -4605,7 +4590,6 @@ sli_queue_alloc(sli4_t *sli4, uint32_t qtype, sli4_queue_t *q, uint32_t n_entrie
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Allocate a c queue set.
|
||||
@ -4763,8 +4747,6 @@ sli_cq_alloc_set(sli4_t *sli4, sli4_queue_t *qs[], uint32_t num_cqs,
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli
|
||||
* @brief Free a queue.
|
||||
@ -5017,7 +4999,6 @@ _sli_queue_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
|
||||
case SLI_QTYPE_WQ: {
|
||||
ocs_dump32(OCS_DEBUG_ENABLE_WQ_DUMP, sli4->os, "wqe", entry, q->size);
|
||||
break;
|
||||
|
||||
}
|
||||
case SLI_QTYPE_MQ:
|
||||
/* Note: we don't really need to dump the whole
|
||||
@ -6602,7 +6583,6 @@ sli_els_request64_wqe(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli_fc
|
||||
* @brief Write an FCP_ICMND64_WQE work queue entry.
|
||||
@ -6786,7 +6766,6 @@ sli_fcp_iread64_wqe(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli_fc
|
||||
* @brief Write an FCP_IWRITE64_WQE work queue entry.
|
||||
@ -7450,7 +7429,6 @@ sli_send_frame_wqe(sli4_t *sli4, void *buf, size_t size, uint8_t sof, uint8_t eo
|
||||
sf->pu = 0;
|
||||
sf->context_tag = 0;
|
||||
|
||||
|
||||
sf->ct = 0;
|
||||
sf->command = SLI4_WQE_SEND_FRAME;
|
||||
sf->class = SLI4_ELS_REQUEST64_CLASS_3;
|
||||
@ -8039,7 +8017,6 @@ sli_fc_cqe_parse(sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_e *et
|
||||
|
||||
/* Flag errors except for FCP_RSP_FAILURE */
|
||||
if (rc && (rc != SLI4_FC_WCQE_STATUS_FCP_RSP_FAILURE)) {
|
||||
|
||||
ocs_log_test(sli4->os, "WCQE: status=%#x hw_status=%#x tag=%#x w1=%#x w2=%#x xb=%d\n",
|
||||
wcqe->status, wcqe->hw_status,
|
||||
wcqe->request_tag, wcqe->wqe_specific_1,
|
||||
@ -8449,7 +8426,6 @@ sli_fc_rq_alloc(sli4_t *sli4, sli4_queue_t *q,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup sli_fc
|
||||
* @brief Allocate a receive queue set.
|
||||
@ -8537,7 +8513,6 @@ sli_fc_rq_set_alloc(sli4_t *sli4, uint32_t num_rq_pairs,
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
rsp = (void *)((uint8_t *)dma.virt);
|
||||
if (rsp->hdr.status) {
|
||||
ocs_log_err(sli4->os, "bad create RQSet status=%#x addl=%#x\n",
|
||||
|
@ -132,7 +132,6 @@ sli_page_count(size_t bytes, uint32_t page_size)
|
||||
#define SLI4_ASIC_GEN_CORSAIR 0x05
|
||||
#define SLI4_ASIC_GEN_LANCER 0x0b
|
||||
|
||||
|
||||
/**
|
||||
* @brief BMBX - Bootstrap Mailbox Register
|
||||
*/
|
||||
@ -148,7 +147,6 @@ sli_page_count(size_t bytes, uint32_t page_size)
|
||||
|
||||
#define SLI4_BMBX_SIZE 256
|
||||
|
||||
|
||||
/**
|
||||
* @brief EQCQ_DOORBELL - EQ and CQ Doorbell Register
|
||||
*/
|
||||
@ -334,7 +332,6 @@ static inline uint32_t sli_cq_doorbell(uint16_t n_popped, uint16_t id, uint8_t a
|
||||
#define SLI4_PORT_STATUS_DUMP_PRESENT(r) ((r) & SLI4_PORT_STATUS_DIP)
|
||||
#define SLI4_PORT_STATUS_FDP_PRESENT(r) ((r) & SLI4_PORT_STATUS_FDP)
|
||||
|
||||
|
||||
#define SLI4_PHSDEV_CONTROL_REG_23 0x0414 /** register offset Interface Type 2 + 3 */
|
||||
#define SLI4_PHYDEV_CONTROL_DRST BIT(0) /** physical device reset */
|
||||
#define SLI4_PHYDEV_CONTROL_FRST BIT(1) /** firmware reset */
|
||||
@ -1046,7 +1043,6 @@ typedef struct sli4_cmd_reg_rpi_s {
|
||||
} sli4_cmd_reg_rpi_t;
|
||||
#define SLI4_REG_RPI_BUF_LEN 0x70
|
||||
|
||||
|
||||
/**
|
||||
* @brief REG_VFI - register a Virtual Fabric Indicator
|
||||
*/
|
||||
@ -1140,7 +1136,6 @@ typedef struct sli4_cmd_request_features_s {
|
||||
* in a separate memory buffer (mem)
|
||||
*/
|
||||
|
||||
|
||||
typedef struct sli4_sli_config_pmd_s {
|
||||
uint32_t address_low;
|
||||
uint32_t address_high;
|
||||
@ -1366,7 +1361,6 @@ typedef struct sli4_cmd_unreg_vpi_s {
|
||||
#define SLI4_UNREG_VPI_II_VFI 0x2
|
||||
#define SLI4_UNREG_VPI_II_FCFI 0x3
|
||||
|
||||
|
||||
/**
|
||||
* @brief AUTO_XFER_RDY - Configure the auto-generate XFER-RDY feature.
|
||||
*/
|
||||
@ -1394,7 +1388,6 @@ typedef struct sli4_cmd_config_auto_xfer_rdy_hp_s {
|
||||
#endif
|
||||
} sli4_cmd_config_auto_xfer_rdy_hp_t;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SLI-4 common configuration command formats and definitions
|
||||
*/
|
||||
@ -1513,7 +1506,6 @@ typedef struct sli4_req_common_function_reset_s {
|
||||
sli4_req_hdr_t hdr;
|
||||
} sli4_req_common_function_reset_t;
|
||||
|
||||
|
||||
typedef struct sli4_res_common_function_reset_s {
|
||||
sli4_res_hdr_t hdr;
|
||||
} sli4_res_common_function_reset_t;
|
||||
@ -1585,8 +1577,6 @@ typedef struct sli4_req_common_create_cq_v2_s {
|
||||
#endif
|
||||
} sli4_req_common_create_cq_v2_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief COMMON_CREATE_CQ_SET_V0
|
||||
*
|
||||
@ -1649,7 +1639,6 @@ typedef struct sli4_res_common_create_queue_s {
|
||||
#endif
|
||||
} sli4_res_common_create_queue_t;
|
||||
|
||||
|
||||
typedef struct sli4_res_common_create_queue_set_s {
|
||||
sli4_res_hdr_t hdr;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
@ -1660,7 +1649,6 @@ typedef struct sli4_res_common_create_queue_set_s {
|
||||
#endif
|
||||
} sli4_res_common_create_queue_set_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Common Destroy CQ
|
||||
*/
|
||||
@ -1893,7 +1881,6 @@ typedef struct sli4_req_common_get_cntl_addl_attributes_s {
|
||||
sli4_req_hdr_t hdr;
|
||||
} sli4_req_common_get_cntl_addl_attributes_t;
|
||||
|
||||
|
||||
typedef struct sli4_res_common_get_cntl_addl_attributes_s {
|
||||
sli4_res_hdr_t hdr;
|
||||
uint16_t ipl_file_number;
|
||||
@ -1976,7 +1963,6 @@ typedef struct sli4_res_common_get_resource_extent_info_s {
|
||||
#endif
|
||||
} sli4_res_common_get_resource_extent_info_t;
|
||||
|
||||
|
||||
#define SLI4_128BYTE_WQE_SUPPORT 0x02
|
||||
/**
|
||||
* @brief COMMON_GET_SLI4_PARAMETERS
|
||||
@ -2096,7 +2082,6 @@ typedef struct sli4_res_common_get_sli4_parameters_s {
|
||||
#endif
|
||||
} sli4_res_common_get_sli4_parameters_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief COMMON_QUERY_FW_CONFIG
|
||||
*
|
||||
@ -2107,7 +2092,6 @@ typedef struct sli4_req_common_query_fw_config_s {
|
||||
sli4_req_hdr_t hdr;
|
||||
} sli4_req_common_query_fw_config_t;
|
||||
|
||||
|
||||
#define SLI4_FUNCTION_MODE_FCOE_INI_MODE 0x40
|
||||
#define SLI4_FUNCTION_MODE_FCOE_TGT_MODE 0x80
|
||||
#define SLI4_FUNCTION_MODE_DUA_MODE 0x800
|
||||
@ -2883,7 +2867,6 @@ typedef struct sli4_res_common_set_reconfig_link_id_s {
|
||||
#endif
|
||||
} sli4_res_common_set_reconfig_link_id_t;
|
||||
|
||||
|
||||
typedef struct sli4_req_lowlevel_set_watchdog_s {
|
||||
sli4_req_hdr_t hdr;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
@ -2895,7 +2878,6 @@ typedef struct sli4_req_lowlevel_set_watchdog_s {
|
||||
|
||||
} sli4_req_lowlevel_set_watchdog_t;
|
||||
|
||||
|
||||
typedef struct sli4_res_lowlevel_set_watchdog_s {
|
||||
sli4_res_hdr_t hdr;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
@ -2944,7 +2926,6 @@ typedef struct sli4_mcqe_s {
|
||||
#endif
|
||||
} sli4_mcqe_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Asynchronous Completion Queue Entry
|
||||
*
|
||||
@ -3069,7 +3050,6 @@ sli_queue_unlock(sli4_queue_t *q)
|
||||
ocs_unlock(&q->lock);
|
||||
}
|
||||
|
||||
|
||||
#define SLI4_QUEUE_DEFAULT_CQ UINT16_MAX /** Use the default CQ */
|
||||
|
||||
#define SLI4_QUEUE_RQ_BATCH 8
|
||||
@ -3325,7 +3305,6 @@ sli_skh_chain_sge_build(sli4_t *sli4, sli4_sge_t *sge, uint32_t xri_index, uint3
|
||||
{
|
||||
sli4_sgl_chaining_params_t *cparms = &sli4->config.sgl_chaining_params;
|
||||
|
||||
|
||||
ocs_memset(sge, 0, sizeof(*sge));
|
||||
sge->sge_type = SLI4_SGE_TYPE_CHAIN;
|
||||
sge->buffer_address_high = (uint32_t)cparms->chain_sge_initial_value_hi;
|
||||
@ -3571,7 +3550,6 @@ typedef int32_t (*sli4_create_q_fn_t)(sli4_t *, void *, size_t, ocs_dma_t *, uin
|
||||
*/
|
||||
typedef int32_t (*sli4_destroy_q_fn_t)(sli4_t *, void *, size_t, uint16_t);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Function prototypes
|
||||
*/
|
||||
@ -3877,7 +3855,6 @@ typedef struct sli4_req_fcoe_rq_create_v1_s {
|
||||
#endif
|
||||
} sli4_req_fcoe_rq_create_v1_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief FCOE_RQ_CREATE_V2
|
||||
*
|
||||
@ -3907,7 +3884,6 @@ typedef struct sli4_req_fcoe_rq_create_v2_s {
|
||||
#endif
|
||||
} sli4_req_fcoe_rq_create_v2_t;
|
||||
|
||||
|
||||
#define SLI4_FCOE_RQ_CREATE_V1_MAX_PAGES 8
|
||||
#define SLI4_FCOE_RQ_CREATE_V1_MIN_BUF_SIZE 64
|
||||
#define SLI4_FCOE_RQ_CREATE_V1_MAX_BUF_SIZE 2048
|
||||
@ -4006,7 +3982,6 @@ typedef struct sli4_res_fcoe_read_fcf_table_s {
|
||||
/* A next FCF index of -1 in the response means this is the last valid entry */
|
||||
#define SLI4_FCOE_FCF_TABLE_LAST (UINT16_MAX)
|
||||
|
||||
|
||||
/**
|
||||
* @brief FCOE_POST_HDR_TEMPLATES
|
||||
*/
|
||||
@ -4038,7 +4013,6 @@ typedef struct sli4_req_fcoe_rediscover_fcf_s {
|
||||
#endif
|
||||
} sli4_req_fcoe_rediscover_fcf_t;
|
||||
|
||||
|
||||
/**
|
||||
* Work Queue Entry (WQE) types.
|
||||
*/
|
||||
@ -4447,7 +4421,6 @@ typedef struct sli4_fcp_iwrite64_wqe_s {
|
||||
sli4_bde_t first_data_bde;
|
||||
} sli4_fcp_iwrite64_wqe_t;
|
||||
|
||||
|
||||
typedef struct sli4_fcp_128byte_wqe_s {
|
||||
uint32_t dw[32];
|
||||
} sli4_fcp_128byte_wqe_t;
|
||||
@ -5115,7 +5088,6 @@ typedef struct sli4_link_state_s {
|
||||
#endif
|
||||
} sli4_link_state_t;
|
||||
|
||||
|
||||
#define SLI4_LINK_ATTN_TYPE_LINK_UP 0x01
|
||||
#define SLI4_LINK_ATTN_TYPE_LINK_DOWN 0x02
|
||||
#define SLI4_LINK_ATTN_TYPE_NO_HARD_ALPA 0x03
|
||||
@ -5604,6 +5576,5 @@ sli_fc_rqe_fcfi(sli4_t *sli4, void *cqe)
|
||||
}
|
||||
|
||||
extern const char *sli_fc_get_status_string(uint32_t status);
|
||||
|
||||
#endif /* !_SLI4_H */
|
||||
|
||||
#endif /* !_SLI4_H */
|
||||
|
Loading…
Reference in New Issue
Block a user