aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/fc_encode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/fc_encode.h')
-rw-r--r--include/scsi/fc_encode.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h
index c5ee6bb79e05..27dad703824f 100644
--- a/include/scsi/fc_encode.h
+++ b/include/scsi/fc_encode.h
@@ -32,6 +32,7 @@ struct fc_ct_req {
32 struct fc_ns_gid_ft gid; 32 struct fc_ns_gid_ft gid;
33 struct fc_ns_rn_id rn; 33 struct fc_ns_rn_id rn;
34 struct fc_ns_rft rft; 34 struct fc_ns_rft rft;
35 struct fc_ns_fid fid;
35 } payload; 36 } payload;
36}; 37};
37 38
@@ -94,10 +95,16 @@ static inline struct fc_ct_req *fc_ct_hdr_fill(const struct fc_frame *fp,
94} 95}
95 96
96/** 97/**
97 * fc_ct_fill - Fill in a name service request frame 98 * fc_ct_fill() - Fill in a name service request frame
99 * @lport: local port.
100 * @fc_id: FC_ID of non-destination rport for GPN_ID and similar inquiries.
101 * @fp: frame to contain payload.
102 * @op: CT opcode.
103 * @r_ctl: pointer to FC header R_CTL.
104 * @fh_type: pointer to FC-4 type.
98 */ 105 */
99static inline int fc_ct_fill(struct fc_lport *lport, 106static inline int fc_ct_fill(struct fc_lport *lport,
100 struct fc_frame *fp, 107 u32 fc_id, struct fc_frame *fp,
101 unsigned int op, enum fc_rctl *r_ctl, 108 unsigned int op, enum fc_rctl *r_ctl,
102 enum fc_fh_type *fh_type) 109 enum fc_fh_type *fh_type)
103{ 110{
@@ -109,6 +116,11 @@ static inline int fc_ct_fill(struct fc_lport *lport,
109 ct->payload.gid.fn_fc4_type = FC_TYPE_FCP; 116 ct->payload.gid.fn_fc4_type = FC_TYPE_FCP;
110 break; 117 break;
111 118
119 case FC_NS_GPN_ID:
120 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_fid));
121 hton24(ct->payload.fid.fp_fid, fc_id);
122 break;
123
112 case FC_NS_RFT_ID: 124 case FC_NS_RFT_ID:
113 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rft)); 125 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rft));
114 hton24(ct->payload.rft.fid.fp_fid, 126 hton24(ct->payload.rft.fid.fp_fid,