From patchwork Mon Mar 5 14:48:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 130638 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2771457lja; Mon, 5 Mar 2018 06:49:56 -0800 (PST) X-Google-Smtp-Source: AG47ELvM2ihwGVD8fexERCVTZfjHEoYQlNW1Hdfxh7Fr/Dv0Kl8Db2PgX5KRKzy5bYtIx6uB/BmX X-Received: by 10.101.82.1 with SMTP id o1mr12600254pgp.37.1520261396488; Mon, 05 Mar 2018 06:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520261396; cv=none; d=google.com; s=arc-20160816; b=0IIpSRm+ODh1qiQdevw3Wvp2GVW/STBkSOBzO2w9zLjUQh5RHimrEnFMuDfO7yYYMe PAcGvqkb25fWx68BeVV/LXGraEHQ6juscTY3JuGF5vsdaN6iKoVfFlTdLaRUXu1gTdOL Kj74RPGlbvRVnHyBPW6ZCTYWrIdy3wIhirPwki3QLaSRyW3St5v7MUSZWOb4sQ907i3j VIldzg2eB8gq6D3ZSDpuNZYydVjJUMihmOAIQWVIGISMWGvZMCzPaT/nNc52Ra8IJdyR /eVRga5nGNiBnC2nZNMWRpAHgg+9dru+XSDA2aHpvHK9kEN4ReXIpNSORayd8Xn2GbhD GaQw== 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=HY7P2ykVO7aXNsFrmsUF9y8vdVz33rC24I8YDuRWDu0=; b=HffZ5Hxi1ZpCG1Y09XJZVsgEsi2qM/ZXwgp0JeyUUHK7OVwLX1nchm6pc7lXr4dA7+ 1qrNwuZiTAio5eU0iNoh0VddVw/TG8pfsSi4zVm6swKBkRn8PanV8WQYekKn9RsD5sBd R0pfdGHOLknx1MlIchBAS/soFWxTmaSz60FK/5wfM2eiVSTYgVMRB0uGu5IBg2I+KC5C SgSiDqC3gyCBFqaOFLPCE2wXZvc+4w2bUnIF9A6CeOt/3LSzlsB9mxvbcy2d3jFrypwz nruVstYbwg8x8cpfuxrCCVzJMXO+KWQjAD6sCspuuDvNC36G+VvUKRgZao4jH63eA7FT 5gEw== 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 t192si8305847pgc.594.2018.03.05.06.49.56; Mon, 05 Mar 2018 06:49:56 -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 S932207AbeCEOtz (ORCPT + 1 other); Mon, 5 Mar 2018 09:49:55 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6145 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932106AbeCEOtx (ORCPT ); Mon, 5 Mar 2018 09:49:53 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5171F1AF4B58D; Mon, 5 Mar 2018 22:49:34 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.361.1; Mon, 5 Mar 2018 22:49:26 +0800 From: John Garry To: , , , CC: , , , , Xiaofei Tan , John Garry Subject: [PATCH v3 1/8] dt-bindings: scsi: hisi_sas: add an property of signal attenuation Date: Mon, 5 Mar 2018 22:48:43 +0800 Message-ID: <1520261330-204596-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520261330-204596-1-git-send-email-john.garry@huawei.com> References: <1520261330-204596-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 For some new boards with hip07 chipset we are required to set PHY config registers differently. The hw property which determines how to set these registers is in the PHY signal attenuation readings. This patch add an devicetree property, "hisilicon,signal-attenuation", which is used to describe the signal attenuation of an board. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- Documentation/devicetree/bindings/scsi/hisilicon-sas.txt | 7 +++++++ 1 file changed, 7 insertions(+) -- 1.9.1 diff --git a/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt b/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt index df3bef7..8c6659e 100644 --- a/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt +++ b/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt @@ -53,6 +53,13 @@ Main node required properties: Optional main node properties: - hip06-sas-v2-quirk-amt : when set, indicates that the v2 controller has the "am-max-transmissions" limitation. + - hisilicon,signal-attenuation : array of 3 32-bit values, containing de-emphasis, + preshoot, and boost attenuation readings for the board. They + are used to describe the signal attenuation of the board. These + values' range is 7600 to 12400, and used to represent -24dB to + 24dB. + The formula is "y = (x-10000)/10000". For example, 10478 + means 4.78dB. Example: sas0: sas@c1000000 { From patchwork Mon Mar 5 14:48:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 130640 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2772166lja; Mon, 5 Mar 2018 06:50:36 -0800 (PST) X-Google-Smtp-Source: AG47ELvZ1dlbivtDKzLsa0S0Av9aFMVVrZHT0PoSR3Hy1zlm7hrBXoa6Uce9209nQlLgw2XCvdEB X-Received: by 2002:a17:902:7c11:: with SMTP id x17-v6mr13501274pll.59.1520261436112; Mon, 05 Mar 2018 06:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520261436; cv=none; d=google.com; s=arc-20160816; b=idlrctW29z+/siFVMMFqZcvKa1DxuZ8waNfDfhmfUGsQTWVRBvyiugCNx422j0Aj0N KT+lQe9HR4zhnBq8mW69CAuQgaDfa+Bh5Up0dMvBNFM+EzOvDsONhxaNXHzoIMKYSSOd DRXjGXvDhEJ0WHCCHN5lfKiiH6Xc1e06gGCCHxnIz55DodQNOADFBMKI4MebkgCf6t/Y HtdmJuK0yisBiCtArwsYSisojcuEKad1Imt6bPNHZMpBviQkkCcCvg+OVqyW4k3c7F4V A6dQJg9Ohd2BJfcmgXTlwJWEdb/wHjdsDHXUm8Tn4iIWeTXkowyuZbgAdgOMdHvva2L7 5W0A== 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=LD7nzVOPQ+CP1SnZdH8gaXgVnZXSgvWIlkHACRs9//YONJOPN8rh8KAVgtL/Ph4uCn +B8yiiwo2VUJamlQsXeKYzg5yA7Wc6f29eHb8iwh5WjNjbYPhii2+kuA9IaylIvG8aBw ewWHOeb6SHpgYa6Vm3djlWZNzW7F+vqlhciEHuP5inL1frTvJsVQzZk3kl6hWuqDeXkJ 7u/1QM30R0Sh5Y38EEVBF5qyI3WPMqgdlqGRF/Ffm1iuBT2xzaTdGuCENSHxscqkkaT5 mv1AKrV13kgpuvkDA9C6xV1NeJKzYp7jHDnhl/przHeNjkFdt5p1rkKlgVZt45fEdJYk ePQg== 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 m1-v6si7054892pll.192.2018.03.05.06.50.35; Mon, 05 Mar 2018 06:50:36 -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 S1752485AbeCEOuf (ORCPT + 1 other); Mon, 5 Mar 2018 09:50:35 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6140 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752465AbeCEOuA (ORCPT ); Mon, 5 Mar 2018 09:50:00 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 053D79D646E7D; Mon, 5 Mar 2018 22:49:34 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.361.1; Mon, 5 Mar 2018 22:49:27 +0800 From: John Garry To: , , , CC: , , , , Xiaofei Tan , John Garry Subject: [PATCH v3 5/8] scsi: hisi_sas: increase timer expire of internal abort task Date: Mon, 5 Mar 2018 22:48:47 +0800 Message-ID: <1520261330-204596-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520261330-204596-1-git-send-email-john.garry@huawei.com> References: <1520261330-204596-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,