|
@@ -1031,17 +1031,17 @@ static void fc_lport_rft_id_resp(struct fc_seq *sp, struct fc_frame *fp,
|
|
|
|
|
|
FC_DEBUG_LPORT("Received a RFT_ID response\n");
|
|
FC_DEBUG_LPORT("Received a RFT_ID response\n");
|
|
|
|
|
|
|
|
+ if (IS_ERR(fp)) {
|
|
|
|
+ fc_lport_error(lport, fp);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (lport->state != LPORT_ST_RFT_ID) {
|
|
if (lport->state != LPORT_ST_RFT_ID) {
|
|
FC_DBG("Received a RFT_ID response, but in state %s\n",
|
|
FC_DBG("Received a RFT_ID response, but in state %s\n",
|
|
fc_lport_state(lport));
|
|
fc_lport_state(lport));
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IS_ERR(fp)) {
|
|
|
|
- fc_lport_error(lport, fp);
|
|
|
|
- goto err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
fh = fc_frame_header_get(fp);
|
|
fh = fc_frame_header_get(fp);
|
|
ct = fc_frame_payload_get(fp, sizeof(*ct));
|
|
ct = fc_frame_payload_get(fp, sizeof(*ct));
|
|
|
|
|
|
@@ -1083,17 +1083,17 @@ static void fc_lport_rpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
|
|
|
|
|
|
FC_DEBUG_LPORT("Received a RPN_ID response\n");
|
|
FC_DEBUG_LPORT("Received a RPN_ID response\n");
|
|
|
|
|
|
|
|
+ if (IS_ERR(fp)) {
|
|
|
|
+ fc_lport_error(lport, fp);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (lport->state != LPORT_ST_RPN_ID) {
|
|
if (lport->state != LPORT_ST_RPN_ID) {
|
|
FC_DBG("Received a RPN_ID response, but in state %s\n",
|
|
FC_DBG("Received a RPN_ID response, but in state %s\n",
|
|
fc_lport_state(lport));
|
|
fc_lport_state(lport));
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IS_ERR(fp)) {
|
|
|
|
- fc_lport_error(lport, fp);
|
|
|
|
- goto err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
fh = fc_frame_header_get(fp);
|
|
fh = fc_frame_header_get(fp);
|
|
ct = fc_frame_payload_get(fp, sizeof(*ct));
|
|
ct = fc_frame_payload_get(fp, sizeof(*ct));
|
|
if (fh && ct && fh->fh_type == FC_TYPE_CT &&
|
|
if (fh && ct && fh->fh_type == FC_TYPE_CT &&
|
|
@@ -1133,17 +1133,17 @@ static void fc_lport_scr_resp(struct fc_seq *sp, struct fc_frame *fp,
|
|
|
|
|
|
FC_DEBUG_LPORT("Received a SCR response\n");
|
|
FC_DEBUG_LPORT("Received a SCR response\n");
|
|
|
|
|
|
|
|
+ if (IS_ERR(fp)) {
|
|
|
|
+ fc_lport_error(lport, fp);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (lport->state != LPORT_ST_SCR) {
|
|
if (lport->state != LPORT_ST_SCR) {
|
|
FC_DBG("Received a SCR response, but in state %s\n",
|
|
FC_DBG("Received a SCR response, but in state %s\n",
|
|
fc_lport_state(lport));
|
|
fc_lport_state(lport));
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IS_ERR(fp)) {
|
|
|
|
- fc_lport_error(lport, fp);
|
|
|
|
- goto err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
op = fc_frame_payload_op(fp);
|
|
op = fc_frame_payload_op(fp);
|
|
if (op == ELS_LS_ACC)
|
|
if (op == ELS_LS_ACC)
|
|
fc_lport_enter_ready(lport);
|
|
fc_lport_enter_ready(lport);
|
|
@@ -1359,17 +1359,17 @@ static void fc_lport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
|
|
|
|
|
|
FC_DEBUG_LPORT("Received a LOGO response\n");
|
|
FC_DEBUG_LPORT("Received a LOGO response\n");
|
|
|
|
|
|
|
|
+ if (IS_ERR(fp)) {
|
|
|
|
+ fc_lport_error(lport, fp);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (lport->state != LPORT_ST_LOGO) {
|
|
if (lport->state != LPORT_ST_LOGO) {
|
|
FC_DBG("Received a LOGO response, but in state %s\n",
|
|
FC_DBG("Received a LOGO response, but in state %s\n",
|
|
fc_lport_state(lport));
|
|
fc_lport_state(lport));
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IS_ERR(fp)) {
|
|
|
|
- fc_lport_error(lport, fp);
|
|
|
|
- goto err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
op = fc_frame_payload_op(fp);
|
|
op = fc_frame_payload_op(fp);
|
|
if (op == ELS_LS_ACC)
|
|
if (op == ELS_LS_ACC)
|
|
fc_lport_enter_reset(lport);
|
|
fc_lport_enter_reset(lport);
|
|
@@ -1443,17 +1443,17 @@ static void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
|
|
|
|
|
|
FC_DEBUG_LPORT("Received a FLOGI response\n");
|
|
FC_DEBUG_LPORT("Received a FLOGI response\n");
|
|
|
|
|
|
|
|
+ if (IS_ERR(fp)) {
|
|
|
|
+ fc_lport_error(lport, fp);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (lport->state != LPORT_ST_FLOGI) {
|
|
if (lport->state != LPORT_ST_FLOGI) {
|
|
FC_DBG("Received a FLOGI response, but in state %s\n",
|
|
FC_DBG("Received a FLOGI response, but in state %s\n",
|
|
fc_lport_state(lport));
|
|
fc_lport_state(lport));
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IS_ERR(fp)) {
|
|
|
|
- fc_lport_error(lport, fp);
|
|
|
|
- goto err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
fh = fc_frame_header_get(fp);
|
|
fh = fc_frame_header_get(fp);
|
|
did = ntoh24(fh->fh_d_id);
|
|
did = ntoh24(fh->fh_d_id);
|
|
if (fc_frame_payload_op(fp) == ELS_LS_ACC && did != 0) {
|
|
if (fc_frame_payload_op(fp) == ELS_LS_ACC && did != 0) {
|