From patchwork Fri Sep 6 12:55:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 173232 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp600604oce; Fri, 6 Sep 2019 05:58:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWYQzcumwBMO8hdVe7c+CGemDChL6pe3tW6/6A6dfpp4t7Gh+7bpmUSuE+mjck3sCjUAiV X-Received: by 2002:a17:90a:2e15:: with SMTP id q21mr9377370pjd.97.1567774726706; Fri, 06 Sep 2019 05:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567774726; cv=none; d=google.com; s=arc-20160816; b=Njt/5hPJ4PzGZcpmHk16E5+gG60DvPcHxz4S0S6qo0xlXbhpnAVF7qUkWbeMzSrTZl EuwtY8KuaMSYuwHrPjk6GeS4KaxfuMfrZuvg1dF2+nSapg7oRqlrmJx0crPE2n1cHjmb jRkwB4E4aN7Q05es7IOp7BaXlf6TvesKlzWtBkxJgj9j0hV7XhgBn9rokOZny/Tm1UBO A+fNtlDfFjGsBzuzvIPM8lm55PYx6QpHoccFqtMpLmKlvuW7bLm6W8K0DUmvk/Ev/Fws sKvOQQCNo2vUcbl4LVAJxPdsxaJdG4FRQvcigaqbkWdyqXPbgo4gHys0Cfr6I3YnLZaL dgxA== 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; bh=QlCfALBHhwKKCPLF16qvRjc2w4ZU/eoZL5Lky4tXDT0=; b=MQWDY67K0wnhOx4G8cWHuptY5a2b0nqPdXvnjaEIw5SZoGciyNq2CdMpYSVmPL3S/m PstCzRV7kJYOSXW/5DRGP1TU0w4h3OUhtrNECigpbsdjDNLbpmsl/VnicP3lf1qxXhra AiZf9dy5GPe+24WT054eMig8csy3vZWL/bdrtCLEaLNc16zG4gmmt9sJ2j0OEAllW6La 2grkl1JWJZ1Q1A/vHLQzX3Fqtpima+TvzKRsDKj/fgZ4O/5O5QXfbcx5r7rysmoQISFV A7IJo8moXnfuwldCX5sIzFdl1vDN9I21kVjoyWruEvvCxXPMwFWIgj/P6zHnSnpKlaMA twgA== 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 s5si4862251pjk.68.2019.09.06.05.58.46; Fri, 06 Sep 2019 05:58:46 -0700 (PDT) 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 S2404996AbfIFM6p (ORCPT + 28 others); Fri, 6 Sep 2019 08:58:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7136 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404933AbfIFM6R (ORCPT ); Fri, 6 Sep 2019 08:58:17 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E0459D1663D03E407419; Fri, 6 Sep 2019 20:58:10 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Fri, 6 Sep 2019 20:58:02 +0800 From: John Garry To: , CC: , , , Luo Jiaxing , "John Garry" Subject: [PATCH 04/13] scsi: hisi_sas: Remove sleep after issue phy reset if sas_smp_phy_control() fails Date: Fri, 6 Sep 2019 20:55:28 +0800 Message-ID: <1567774537-20003-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1567774537-20003-1-git-send-email-john.garry@huawei.com> References: <1567774537-20003-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luo Jiaxing At expander environment, we delay after issue phy reset to wait for hardware to handle phy reset. But if sas_smp_phy_control() fails, the delay is unnecessary so remove it. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 5642c53cccae..247268983df9 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1791,9 +1791,10 @@ static int hisi_sas_debug_I_T_nexus_reset(struct domain_device *device) } else if (sas_dev->dev_status != HISI_SAS_DEV_INIT) { /* * If in init state, we rely on caller to wait for link to be - * ready; otherwise, delay. + * ready; otherwise, except phy reset is fail, delay. */ - msleep(2000); + if (!rc) + msleep(2000); } return rc;