From patchwork Mon Feb 19 19:13:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 128844 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3801923ljc; Mon, 19 Feb 2018 10:23:55 -0800 (PST) X-Google-Smtp-Source: AH8x226y49EGd/qUxrKCCmMuOChoCaOA0awpHgmqKSyNGz/KqHNImersfHybHzQb1JSvOtnLh5WS X-Received: by 10.99.182.12 with SMTP id j12mr13272329pgf.113.1519064635731; Mon, 19 Feb 2018 10:23:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519064635; cv=none; d=google.com; s=arc-20160816; b=c4rghFRiZcBrkGl5HmT1l+LWGtidYoTddNcXLYvntpys06gIgR0QFRlgMXu48OKHx/ UQwHKPIkQjRUCMdYTQAcsRSQUrDx/SvZ93azaGs/vGCgl7vlbeRT4PMi0FONbuCJw6bh 80afC9LNpwm0dazEb3sRHN2nd8wsT+7J3uYP78wb5mGingAx1ON32Nkph6KFc+D2OpXS CUV9EIEjAl24sEn/wDPpKe5mvwYoTMZj/xwZEPgz/f3GJus9vqZh0lJdFo+KZ0wsi1r8 EGDLnd024be3dcVdGK9R78//3spAGpZx4KfTJyByhYVVth1Iidr+senA7oJuohQTitdD tsfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=dhQj25UHgAqz0fi2vBcFen4tBEnixxIOY4PNNRKJxgo=; b=pDPTzflBSic6znC3svHOwf0KTWaPgAQ0MIuKmoMlHEHpTgvGal1nI8aYJiSXFmufcY NcpYHUlXdj7v0SLmJDnNqy5FIYrF3T1eDmHw3NCFbfsaez+RksD5ZPwirpjjtKbAG5+B kWaD+nkggkCddQxmS93HwcIHL4NUCC0k57VqqH3BMb3dJSFuqWStWpdu4uVCexXKZxAi wUydlvZY0jywgoz3eya8FFlwH2FyKEKybWZEDdodVDR4sVXcn9zaI5uHmeDnZxn/oKeP 8M6aOX5YN1fBmmID6B+tE+yORzvQWEr/ZyaPAc7B9G0P2MuJK9mT0ECsW+1ujJwfmikR DZmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si3508430pgq.332.2018.02.19.10.23.55; Mon, 19 Feb 2018 10:23:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753729AbeBSSXy (ORCPT + 1 other); Mon, 19 Feb 2018 13:23:54 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5251 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753435AbeBSSWQ (ORCPT ); Mon, 19 Feb 2018 13:22:16 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 099B086F2462D; Tue, 20 Feb 2018 02:22:00 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Tue, 20 Feb 2018 02:21:53 +0800 From: John Garry To: , , , CC: , , , , Xiaofei Tan , John Garry Subject: [PATCH 5/8] scsi: hisi_sas: increase timer expire of internal abort task Date: Tue, 20 Feb 2018 03:13:28 +0800 Message-ID: <1519067611-206638-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519067611-206638-1-git-send-email-john.garry@huawei.com> References: <1519067611-206638-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Xiaofei Tan 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 Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 9d16372..9ff8790 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -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 @@ static int hisi_sas_query_task(struct sas_task *task) 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,