diff options
author | John Garry <john.garry@huawei.com> | 2019-02-06 18:52:54 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-02-08 18:08:22 -0500 |
commit | 795f25a31b542df93bff892ce46390f9befa2135 (patch) | |
tree | 034566c85a0ce25291f855197a8affd66ca743f1 /drivers/scsi/hisi_sas/hisi_sas.h | |
parent | 1273d65f29045df915ff1448672cca22f7c078e6 (diff) | |
download | linux-795f25a31b542df93bff892ce46390f9befa2135.tar.gz linux-795f25a31b542df93bff892ce46390f9befa2135.tar.bz2 linux-795f25a31b542df93bff892ce46390f9befa2135.zip |
scsi: hisi_sas: Issue internal abort on all relevant queues
To support queue mapped to a CPU, it needs to be ensured that issuing an
internal abort is safe, in that it is guaranteed that an internal abort is
processed for a single IO or a device after all the relevant command(s)
which it is attempting to abort have been processed by the controller.
Currently we only deliver commands for any device on a single queue to
solve this problem, as we know that commands issued on the same queue will
be processed in order, and we will not have a scenario where the internal
abort is racing against a command(s) which it is trying to abort.
To enqueue commands on queue mapped to a CPU, choosing a queue for an
command is based on the associated queue for the current CPU, so this is
not safe for internal abort since it would definitely not be guaranteed
that commands for the command devices are issued on the same queue.
To solve this issue, we take a bludgeoning approach, and issue a separate
internal abort on any queue(s) relevant to the command or device, in that
we will be guaranteed that at least one of these internal aborts will be
received last in the controller.
So, for aborting a single command, we can just force the internal abort to
be issued on the same queue as the command which we are trying to abort.
For aborting all commands associated with a device, we issue a separate
internal abort on all relevant queues. Issuing multiple internal aborts in
this fashion would have not side affect.
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index ff844d4ba0d3..5accad05a86f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -365,6 +365,8 @@ struct hisi_hba { u32 intr_coal_ticks; /* Time of interrupt coalesce in us */ u32 intr_coal_count; /* Interrupt count to coalesce */ + int cq_nvecs; + /* debugfs memories */ u32 *debugfs_global_reg; u32 *debugfs_port_reg[HISI_SAS_MAX_PHYS]; |