Received: by 10.223.185.116 with SMTP id b49csp133008wrg; Fri, 2 Mar 2018 15:12:54 -0800 (PST) X-Google-Smtp-Source: AG47ELs93+9MAbEmgEeNMLYsMc7MJOLTnKLkMNrn1oPYC0Tq5sjeDr9du8T92A1n+sw+Bp7cgNDg X-Received: by 10.99.158.84 with SMTP id r20mr5607216pgo.296.1520032374575; Fri, 02 Mar 2018 15:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520032374; cv=none; d=google.com; s=arc-20160816; b=KjYkb5LE9soiK5TyGkQsW3GeGU3HEc2CJAdL6Dze2xwbpXj9J60UuQJhevuzF82N5p V02G4iPOLyeZx5cws0OVBfK8bW1Id6G0POYBUcMNryVYxjJX1B7A389Sgga0XCPAawm+ juv76TEfRVZhGL+zYsweLEZwgTmcx8T9bbb2Xyvwchw3zUk0tMh9Ber7zP66RgWKN9wc uh1pDGG7uZzSav6mxMD7DZ57FnzWkJ2/qsAn5lOBd2+OGQs89X1+ZPAflhew1jSoULwX rnBkSeMccsIS3mPTfu5OXOqC8L8DxRTdcwXAgzRv27oOZP2sb3XikDlyIG3xpAtfWr00 c2uw== 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=A010a7KZmgCrmXxIbl9JbrtvZYGyCdkzhTtIYSdKaejpp2IE7O8hDYsoiKl1AFyEm4 S8IYDcRVA5/q9+Kr7tqZ3pvzf+zMH5fylzKhXVw9o1zP55YL93bG/U3+Xd4MqkS+86Xp QNPMduPcJxnP37UJqxJXq1N1HlXfGGc+id2/SzoZ6G0ze8wSG7dj8hiCZErvqqv5zk9W B28XVBtPHOIURrVpVICh8r3SdB/H8rfW7KbMc+UMtHhIFAWk7j9tMkQF0lsekx7ieOBW 9N/DlVQOhESVj04tfWbpggBaXstCbopL+a6lm1x5tUM3uXeh4yHzA71LAnd7lUdsa12b oShw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 k3si5642291pfj.24.2018.03.02.15.12.39; Fri, 02 Mar 2018 15:12:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1429101AbeCBPJI (ORCPT + 99 others); Fri, 2 Mar 2018 10:09:08 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5733 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1429022AbeCBPIC (ORCPT ); Fri, 2 Mar 2018 10:08:02 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 559168B5D30AD; Fri, 2 Mar 2018 23:07:33 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.361.1; Fri, 2 Mar 2018 23:07:28 +0800 From: John Garry To: , , , CC: , , , , Xiaofei Tan , John Garry Subject: [PATCH v2 5/8] scsi: hisi_sas: increase timer expire of internal abort task Date: Fri, 2 Mar 2018 23:06:19 +0800 Message-ID: <1520003182-26277-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520003182-26277-1-git-send-email-john.garry@huawei.com> References: <1520003182-26277-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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, -- 1.9.1