Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204113
b: refs/heads/master
c: 618461c
h: refs/heads/master
i:
  204111: f653bce
v: v3
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jul 27, 2010
1 parent 5f835c8 commit 9817f89
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 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: 292e40b956982601dfc61fe8f0470eb18a616d7e
refs/heads/master: 618461c02b00a658ec8aa07d409cd496a7e254e2
23 changes: 19 additions & 4 deletions trunk/drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
u32 roles = FC_RPORT_ROLE_UNKNOWN;
u32 fcp_parm = 0;
u8 op;
u8 resp_code = 0;

mutex_lock(&rdata->rp_mutex);

Expand All @@ -722,11 +723,25 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC) {
pp = fc_frame_payload_get(fp, sizeof(*pp));
if (pp && pp->prli.prli_spp_len >= sizeof(pp->spp)) {
fcp_parm = ntohl(pp->spp.spp_params);
if (fcp_parm & FCP_SPPF_RETRY)
rdata->flags |= FC_RP_FLAGS_RETRY;
if (!pp)
goto out;

resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK);
FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x\n",
pp->spp.spp_flags);
if (resp_code != FC_SPP_RESP_ACK) {
if (resp_code == FC_SPP_RESP_CONF)
fc_rport_error(rdata, fp);
else
fc_rport_error_retry(rdata, fp);
goto out;
}
if (pp->prli.prli_spp_len < sizeof(pp->spp))
goto out;

fcp_parm = ntohl(pp->spp.spp_params);
if (fcp_parm & FCP_SPPF_RETRY)
rdata->flags |= FC_RP_FLAGS_RETRY;

rdata->supported_classes = FC_COS_CLASS3;
if (fcp_parm & FCP_SPPF_INIT_FCN)
Expand Down

0 comments on commit 9817f89

Please sign in to comment.