fcst: Avoid triggering CRC errors at the initiator side

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-08-13 18:43:56 +00:00
parent 80ba881d46
commit 886ae66326
+10
View File
@@ -94,6 +94,16 @@ int ft_send_read_data(struct scst_cmd *cmd)
/* no scatter/gather in skb for odd word length due to fc_seq_send() */
use_sg = !(remaining % 4) && lport->sg_supp;
/*
* Note: since libfc_function_template.seq_send() sends frames
* asynchronously and since the SCST data buffer is freed as soon as
* scst_tgt_cmd_done() has been invoked, data has to be copied into
* the skb instead of only copying a pointer to the data. To do: defer
* invocation of scst_tgt_cmd_done() until sending the data frames
* finished once the paged fragment destructor or an equivalent is
* upstream.
*/
use_sg = false;
while (remaining) {
if (!loop_limit) {