Esempio n. 1
0
void
bfa_fcs_port_loop_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp,
				 void *cbarg, bfa_status_t req_status,
				 u32 rsp_len, u32 resid_len,
				 struct fchs_s *rsp_fchs)
{
	struct bfa_fcs_port_s *port = (struct bfa_fcs_port_s *) cbarg;
	struct fc_logi_s     *plogi_resp;
	struct fc_els_cmd_s   *els_cmd;

	bfa_trc(port->fcs, req_status);

	
	if (req_status != BFA_STATUS_OK) {
		bfa_trc(port->fcs, req_status);
		

		return;
	}

	els_cmd = (struct fc_els_cmd_s *) BFA_FCXP_RSP_PLD(fcxp);
	plogi_resp = (struct fc_logi_s *) els_cmd;

	if (els_cmd->els_code == FC_ELS_ACC) {
		bfa_fcs_rport_start(port, rsp_fchs, plogi_resp);
	} else {
		bfa_trc(port->fcs, plogi_resp->els_cmd.els_code);
		bfa_assert(0);
	}
}
Esempio n. 2
0
/**
 *   Called by fcxp to notify the Plogi response
 */
static void
bfa_fcs_port_loop_plogi_response(void *fcsarg, struct bfa_fcxp_s *fcxp,
                                 void *cbarg, bfa_status_t req_status,
                                 u32 rsp_len, u32 resid_len,
                                 struct fchs_s *rsp_fchs)
{
    struct bfa_fcs_port_s *port = (struct bfa_fcs_port_s *) cbarg;
    struct fc_logi_s     *plogi_resp;
    struct fc_els_cmd_s   *els_cmd;

    bfa_trc(port->fcs, req_status);

    /*
     * Sanity Checks
     */
    if (req_status != BFA_STATUS_OK) {
        bfa_trc(port->fcs, req_status);
        /*
         * @todo
         * This could mean that the device with this APLA does not
         * exist on the loop.
         */

        return;
    }

    els_cmd = (struct fc_els_cmd_s *) BFA_FCXP_RSP_PLD(fcxp);
    plogi_resp = (struct fc_logi_s *) els_cmd;

    if (els_cmd->els_code == FC_ELS_ACC) {
        bfa_fcs_rport_start(port, rsp_fchs, plogi_resp);
    } else {
        bfa_trc(port->fcs, plogi_resp->els_cmd.els_code);
        bfa_assert(0);
    }
}