Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144451
b: refs/heads/master
c: 76f6804
h: refs/heads/master
i:
  144449: 2316a39
  144447: 86a010c
v: v3
  • Loading branch information
Abhijeet Joglekar authored and James Bottomley committed Apr 27, 2009
1 parent 6c01a06 commit b7c6ef6
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d228c0f7f9e3ade147e57682915c55b92448230
refs/heads/master: 76f6804e7e7bb836cbdf4a73fe6c5485e4cc04c2
60 changes: 35 additions & 25 deletions trunk/drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,17 +1032,19 @@ static void fc_lport_rft_id_resp(struct fc_seq *sp, struct fc_frame *fp,

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) {
FC_DBG("Received a RFT_ID response, but in state %s\n",
fc_lport_state(lport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_lport_error(lport, fp);
goto err;
}

fh = fc_frame_header_get(fp);
ct = fc_frame_payload_get(fp, sizeof(*ct));

Expand Down Expand Up @@ -1084,17 +1086,19 @@ static void fc_lport_rpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,

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) {
FC_DBG("Received a RPN_ID response, but in state %s\n",
fc_lport_state(lport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_lport_error(lport, fp);
goto err;
}

fh = fc_frame_header_get(fp);
ct = fc_frame_payload_get(fp, sizeof(*ct));
if (fh && ct && fh->fh_type == FC_TYPE_CT &&
Expand Down Expand Up @@ -1134,17 +1138,19 @@ static void fc_lport_scr_resp(struct fc_seq *sp, struct fc_frame *fp,

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) {
FC_DBG("Received a SCR response, but in state %s\n",
fc_lport_state(lport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_lport_error(lport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC)
fc_lport_enter_ready(lport);
Expand Down Expand Up @@ -1360,17 +1366,19 @@ static void fc_lport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,

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) {
FC_DBG("Received a LOGO response, but in state %s\n",
fc_lport_state(lport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_lport_error(lport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC)
fc_lport_enter_reset(lport);
Expand Down Expand Up @@ -1444,17 +1452,19 @@ static void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,

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) {
FC_DBG("Received a FLOGI response, but in state %s\n",
fc_lport_state(lport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_lport_error(lport, fp);
goto err;
}

fh = fc_frame_header_get(fp);
did = ntoh24(fh->fh_d_id);
if (fc_frame_payload_op(fp) == ELS_LS_ACC && did != 0) {
Expand Down
48 changes: 28 additions & 20 deletions trunk/drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,19 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp,
FC_DEBUG_RPORT("Received a PLOGI response from port (%6x)\n",
rport->port_id);

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

if (rdata->rp_state != RPORT_ST_PLOGI) {
FC_DBG("Received a PLOGI response, but in state %s\n",
fc_rport_state(rport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC &&
(plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) {
Expand Down Expand Up @@ -614,17 +616,19 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
FC_DEBUG_RPORT("Received a PRLI response from port (%6x)\n",
rport->port_id);

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

if (rdata->rp_state != RPORT_ST_PRLI) {
FC_DBG("Received a PRLI response, but in state %s\n",
fc_rport_state(rport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC) {
pp = fc_frame_payload_get(fp, sizeof(*pp));
Expand Down Expand Up @@ -678,17 +682,19 @@ static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
FC_DEBUG_RPORT("Received a LOGO response from port (%6x)\n",
rport->port_id);

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

if (rdata->rp_state != RPORT_ST_LOGO) {
FC_DEBUG_RPORT("Received a LOGO response, but in state %s\n",
fc_rport_state(rport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_rport_error_retry(rport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC) {
fc_rport_enter_rtv(rport);
Expand Down Expand Up @@ -764,17 +770,19 @@ static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp,
FC_DEBUG_RPORT("Received a RTV response from port (%6x)\n",
rport->port_id);

if (IS_ERR(fp)) {
fc_rport_error(rport, fp);
goto err;
}

if (rdata->rp_state != RPORT_ST_RTV) {
FC_DBG("Received a RTV response, but in state %s\n",
fc_rport_state(rport));
if (IS_ERR(fp))
goto err;
goto out;
}

if (IS_ERR(fp)) {
fc_rport_error(rport, fp);
goto err;
}

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC) {
struct fc_els_rtv_acc *rtv;
Expand Down

0 comments on commit b7c6ef6

Please sign in to comment.