Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173676
b: refs/heads/master
c: 52a6690
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Dec 4, 2009
1 parent 252b549 commit c9991ae
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 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: 5f9a056db9c7973c46337ec8d034323aa72bf206
refs/heads/master: 52a6690d3f0cb7414c34b1e26c569b32d4987662
41 changes: 35 additions & 6 deletions trunk/drivers/scsi/libfc/fc_elsct.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ EXPORT_SYMBOL(fc_elsct_init);
const char *fc_els_resp_type(struct fc_frame *fp)
{
const char *msg;
struct fc_frame_header *fh;
struct fc_ct_hdr *ct;

if (IS_ERR(fp)) {
switch (-PTR_ERR(fp)) {
case FC_NO_ERR:
Expand All @@ -106,15 +109,41 @@ const char *fc_els_resp_type(struct fc_frame *fp)
break;
}
} else {
switch (fc_frame_payload_op(fp)) {
case ELS_LS_ACC:
msg = "accept";
fh = fc_frame_header_get(fp);
switch (fh->fh_type) {
case FC_TYPE_ELS:
switch (fc_frame_payload_op(fp)) {
case ELS_LS_ACC:
msg = "accept";
break;
case ELS_LS_RJT:
msg = "reject";
break;
default:
msg = "response unknown ELS";
break;
}
break;
case ELS_LS_RJT:
msg = "reject";
case FC_TYPE_CT:
ct = fc_frame_payload_get(fp, sizeof(*ct));
if (ct) {
switch (ntohs(ct->ct_cmd)) {
case FC_FS_ACC:
msg = "CT accept";
break;
case FC_FS_RJT:
msg = "CT reject";
break;
default:
msg = "response unknown CT";
break;
}
} else {
msg = "short CT response";
}
break;
default:
msg = "response unknown ELS";
msg = "response not ELS or CT";
break;
}
}
Expand Down

0 comments on commit c9991ae

Please sign in to comment.