]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: hisi_sas: relocate smp sg map
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 9 May 2018 15:10:45 +0000 (23:10 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:22:09 +0000 (11:22 -0400)
commit7eee4b921822addfb67c2ced5772f003bb083520
tree36f15157742d5f3a35239bd37b3dba64e9872bd7
parent0d846e703dc8b77d31cc71e0bd8d004f187eac30
scsi: hisi_sas: relocate smp sg map

Currently we use DQ lock to protect delivery of DQ entry one by one.

To optimise to allow more than one slot to be built for a single DQ in
parallel, we need to remove the DQ lock when preparing slots, prior to
delivery.

To achieve this, we rearrange the slot build order to ensure that once
we allocate a slot for a task, we do cannot fail to deliver the task.

In this patch, we rearrange the slot building for SMP tasks to ensure
that sg mapping part (which can fail) happens before we allocate the
slot in the DQ.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c