]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: hisi_sas: increase timer expire of internal abort task
authorXiaofei Tan <tanxiaofei@huawei.com>
Wed, 7 Mar 2018 12:25:09 +0000 (20:25 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 May 2018 09:11:59 +0000 (11:11 +0200)
BugLink: https://bugs.launchpad.net/bugs/1768974
The current 110ms expiry time is not long enough for the internal abort
task.

The reason is that the internal abort task could be blocked in HW if the HW
is retrying to set up link. The internal abort task will be executed only
when the retry process finished.

The maximum time is 5s for the retry of setting up link. So, the timer
expire should be more than 5s. This patch increases it from 110ms to 6s.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit bb9abc4af5449d2a72cda876be950988e8b2b888)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index dadd65bc98322253b9125c5cdfd4c2262bde78a6..2d12f75217659b8c56ccb572ead5b774cbafa09f 100644 (file)
@@ -871,6 +871,7 @@ static void hisi_sas_tmf_timedout(struct timer_list *t)
 
 #define TASK_TIMEOUT 20
 #define TASK_RETRY 3
+#define INTERNAL_ABORT_TIMEOUT 6
 static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
                                           void *parameter, u32 para_len,
                                           struct hisi_sas_tmf_task *tmf)
@@ -1574,7 +1575,7 @@ hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
        task->task_proto = device->tproto;
        task->task_done = hisi_sas_task_done;
        task->slow_task->timer.function = hisi_sas_tmf_timedout;
-       task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110);
+       task->slow_task->timer.expires = jiffies + INTERNAL_ABORT_TIMEOUT*HZ;
        add_timer(&task->slow_task->timer);
 
        res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id,