summaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 15:21:01 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 09:06:00 -0500
commit24f089e2f2c800f88039e9d536d558ec6e349fad (patch)
tree59cf263f112e176015a3a37c3928cc3d2a4dfcb5 /include/scsi/libfc.h
parent251748a99e631a2c46edcf9e519cfc60fae8153d (diff)
downloadop-kernel-dev-24f089e2f2c800f88039e9d536d558ec6e349fad.zip
op-kernel-dev-24f089e2f2c800f88039e9d536d558ec6e349fad.tar.gz
[SCSI] libfc: add fc_fill_reply_hdr() and fc_fill_hdr()
Add functions to fill in an FC header given a request header. These reduces code lines in fc_lport and fc_rport and works without an exchange/sequence assigned. fc_fill_reply_hdr() fills a header for a final reply frame. fc_fill_hdr() which is similar but allows specifying the f_ctl parameter. Add defines for F_CTL values FC_FCTL_REQ and FC_FCTL_RESP. These can be used for most request and response sequences. v2 of patch adds a line to copy the frame encapsulation info from the received frame. Signed-off-by: Joe Eykholt <jeykholt@cisco.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/libfc.h')
-rw-r--r--include/scsi/libfc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index f1ce793..a6414ec 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -1027,6 +1027,10 @@ struct fc_seq *fc_elsct_send(struct fc_lport *, u32 did,
void *arg, u32 timer_msec);
void fc_lport_flogi_resp(struct fc_seq *, struct fc_frame *, void *);
void fc_lport_logo_resp(struct fc_seq *, struct fc_frame *, void *);
+void fc_fill_reply_hdr(struct fc_frame *, const struct fc_frame *,
+ enum fc_rctl, u32 parm_offset);
+void fc_fill_hdr(struct fc_frame *, const struct fc_frame *,
+ enum fc_rctl, u32 f_ctl, u16 seq_cnt, u32 parm_offset);
/*
OpenPOWER on IntegriCloud