From 886ae66326aa1db3b5faa86266ac89b7750cdf1a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 13 Aug 2013 18:43:56 +0000 Subject: [PATCH] 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 --- fcst/ft_io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fcst/ft_io.c b/fcst/ft_io.c index 49013413a..26305eecb 100644 --- a/fcst/ft_io.c +++ b/fcst/ft_io.c @@ -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) {