diff options
author | Robert Love <robert.w.love@intel.com> | 2009-11-03 14:47:28 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:01:05 -0500 |
commit | 5868287460b0fc243e828a0b856cd53d8bf45739 (patch) | |
tree | 81b18b5e3a104b3202b8e2583d9bd3ffc5546895 /drivers/scsi/libfc/fc_libfc.h | |
parent | 07aac328342d6ca1725d901e1c5da8a1aa88f557 (diff) |
[SCSI] libfc: Add routine to copy data from a buffer to a SG list
When handling the multi-frame responses of fc pass-thru requests,
a code segment similar to fc_fcp_recv_data (routine to receive
inbound SCSI data) is used in the response handler. This patch
is to add a routine, called fc_copy_buffer_to_sglist(), to handle
the common function of copying data from a buffer to a scatter-
gather list in order to avoid code duplication.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_libfc.h')
-rw-r--r-- | drivers/scsi/libfc/fc_libfc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_libfc.h b/drivers/scsi/libfc/fc_libfc.h index 0530149ac174..e4b5e9280cb0 100644 --- a/drivers/scsi/libfc/fc_libfc.h +++ b/drivers/scsi/libfc/fc_libfc.h | |||
@@ -101,4 +101,12 @@ void fc_destroy_fcp(void); | |||
101 | */ | 101 | */ |
102 | const char *fc_els_resp_type(struct fc_frame *); | 102 | const char *fc_els_resp_type(struct fc_frame *); |
103 | 103 | ||
104 | /* | ||
105 | * Copies a buffer into an sg list | ||
106 | */ | ||
107 | u32 fc_copy_buffer_to_sglist(void *buf, size_t len, | ||
108 | struct scatterlist *sg, | ||
109 | u32 *nents, size_t *offset, | ||
110 | enum km_type km_type, u32 *crc); | ||
111 | |||
104 | #endif /* _FC_LIBFC_H_ */ | 112 | #endif /* _FC_LIBFC_H_ */ |