scsi: hisi_sas: alloc queue id of slot according to device id
commitc70f1fb7558f0b3c8f63c3e8a2caeb08eb1f8274
authorXiang Chen <chenxiang66@hisilicon.com>
Mon, 7 Nov 2016 12:48:31 +0000 (7 20:48 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Nov 2016 14:54:39 +0000 (25 09:54 -0500)
tree63a86c798860d72ad9bbc80a5cc4d3a22b187302
parentd3b688d3c69d318177c104f451b9064831da42b9
scsi: hisi_sas: alloc queue id of slot according to device id

Currently slots are allocated from queues in a round-robin fashion.
This causes a problem for internal commands in device mode. For this
mode, we should ensure that the internal abort command is the last
command seen in the host for that device. We can only ensure this when
we place the internal abort command after the preceding commands for
device that in the same queue, as there is no order in which the host
will select a queue to execute the next command.

This queue restriction makes supporting scsi mq more tricky in
the future, but should not be a blocker.

Note: Even though v1 hw does not support internal abort, the
      allocation method is chosen to be the same for consistency.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas.h
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