]> git.baikalelectronics.ru Git - kernel.git/commitdiff
target/tcm_fc: use CPU affinity for responses
authorHannes Reinecke <hare@suse.de>
Mon, 22 Aug 2016 08:54:11 +0000 (10:54 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 21 Oct 2016 08:19:44 +0000 (01:19 -0700)
The libfc stack assigns exchange IDs based on the CPU the request
was received on, so we need to send the responses via the same CPU.
Otherwise the send logic gets confuses and responses will be delayed,
causing exchange timeouts on the initiator side.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/tcm_fc/tfc_cmd.c

index 36f08644250c2d5d69ccaf7a52228fd6913ab6f6..ff5de9a96643f9b21e06a14af4bcd5e7277689f9 100644 (file)
@@ -572,7 +572,7 @@ static void ft_send_work(struct work_struct *work)
        if (target_submit_cmd(&cmd->se_cmd, cmd->sess->se_sess, fcp->fc_cdb,
                              &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun),
                              ntohl(fcp->fc_dl), task_attr, data_dir,
-                             TARGET_SCF_ACK_KREF))
+                             TARGET_SCF_ACK_KREF | TARGET_SCF_USE_CPUID))
                goto err;
 
        pr_debug("r_ctl %x target_submit_cmd %p\n", fh->fh_r_ctl, cmd);