diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2011-02-25 18:03:07 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-28 19:32:33 -0500 |
commit | 059f04d4aa60f89b7ad6ca118856f4cb59d9257f (patch) | |
tree | e96e5e540062b1eceb290e8ddb2b6cda8b305261 /include/scsi | |
parent | 72fa396bf57b31e8e2a401a21a3a088c0cc6b043 (diff) |
[SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
fc_fill_fc_hdr() expects fc_frame as an argument. Introduce __fc_fill_fc_hdr to
accept fc_frame_header as an argument.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/fc_encode.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h index 6d293c846a46..be418d8448a5 100644 --- a/include/scsi/fc_encode.h +++ b/include/scsi/fc_encode.h | |||
@@ -46,16 +46,11 @@ struct fc_ct_req { | |||
46 | } payload; | 46 | } payload; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | /** | 49 | static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh, |
50 | * fill FC header fields in specified fc_frame | 50 | enum fc_rctl r_ctl, |
51 | */ | 51 | u32 did, u32 sid, enum fc_fh_type type, |
52 | static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl, | 52 | u32 f_ctl, u32 parm_offset) |
53 | u32 did, u32 sid, enum fc_fh_type type, | ||
54 | u32 f_ctl, u32 parm_offset) | ||
55 | { | 53 | { |
56 | struct fc_frame_header *fh; | ||
57 | |||
58 | fh = fc_frame_header_get(fp); | ||
59 | WARN_ON(r_ctl == 0); | 54 | WARN_ON(r_ctl == 0); |
60 | fh->fh_r_ctl = r_ctl; | 55 | fh->fh_r_ctl = r_ctl; |
61 | hton24(fh->fh_d_id, did); | 56 | hton24(fh->fh_d_id, did); |
@@ -68,6 +63,19 @@ static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl, | |||
68 | } | 63 | } |
69 | 64 | ||
70 | /** | 65 | /** |
66 | * fill FC header fields in specified fc_frame | ||
67 | */ | ||
68 | static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl, | ||
69 | u32 did, u32 sid, enum fc_fh_type type, | ||
70 | u32 f_ctl, u32 parm_offset) | ||
71 | { | ||
72 | struct fc_frame_header *fh; | ||
73 | |||
74 | fh = fc_frame_header_get(fp); | ||
75 | __fc_fill_fc_hdr(fh, r_ctl, did, sid, type, f_ctl, parm_offset); | ||
76 | } | ||
77 | |||
78 | /** | ||
71 | * fc_adisc_fill() - Fill in adisc request frame | 79 | * fc_adisc_fill() - Fill in adisc request frame |
72 | * @lport: local port. | 80 | * @lport: local port. |
73 | * @fp: fc frame where payload will be placed. | 81 | * @fp: fc frame where payload will be placed. |