From patchwork Tue Oct 24 15:51:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 116961 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5914202qgn; Tue, 24 Oct 2017 08:06:50 -0700 (PDT) X-Google-Smtp-Source: ABhQp+STF663Fo3BrTkBW5gEAtJJofrFofbc+5LrG3WjrJjzonPvPNbLhzxwwem9PmcH951/9dbc X-Received: by 10.84.218.141 with SMTP id r13mr13126974pli.53.1508857610757; Tue, 24 Oct 2017 08:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508857610; cv=none; d=google.com; s=arc-20160816; b=rtTiob4vf8aVdLnxGaQCis9w2lMGkJ6Lbb4QjLbQJ7aNRenByA5m1xD2Ph3ZX+Z4yt 6Vprr44BvQJ1QwkxEfOpmYLc3BzvH6s52thNEoeio5wCLTHFIL1PWQyoLD7uoxubgtWQ 5i/+gaWnQV+9U2Nx1aI+GHqcWG/mNjGq29rm6+72gpZROvcgpmXdAYSg32DhLcCCJcNa C4zC9VBH28Yg0JsYbpDVCThjjRUSsKGOrh6kN4JqTecuw6eyaUudimXoKvHfBnp97s8g +8SUE9L19rM+9klIjlcxVZYiQr63qhR4Iqnn48CIea9dM5JGYSjQKs+Sotxskn86yMAV RnJQ== 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=+UUTWczqS7awXgI8ugUMidgD0qTzpqxVyG4N1TpGFJ4=; b=SoChIjVaWnwK/3G8dOAhy7HoDL5DsQCSeWFQq1VR+GvSkbPNyijWKc3xac+EeW+lFN nSH+WrAxlFefRVxf9NvhJbrrT0Kxcv3YjtNeD4ZCJlFRVbSU9gYwrjuvGxHMsP2GPGrO T2uXFLlpLjp4mImybuOe+cT/lF6Z/AaoEqKlcMGPioSA70RLmOu1Adn5Tm7b94DvlvS3 RP7qPQcVZYID6nDlIc+0NFtJAIGsgowX9BnGnafgu327qXqFrusBOxQw1SVca6cVwsSI 6DTb5dzudPCOdC/dq0So0i3F5Ow+xkhwmao/55TXoVJrGsdQscXh4h8s+cp9J1qm5q0M 1utQ== 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 l6si310644pgo.198.2017.10.24.08.06.50; Tue, 24 Oct 2017 08:06:50 -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 S932395AbdJXPGs (ORCPT + 27 others); Tue, 24 Oct 2017 11:06:48 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50576 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751637AbdJXPF3 (ORCPT ); Tue, 24 Oct 2017 11:05:29 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3E9ED7084060F; Tue, 24 Oct 2017 23:05:23 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.361.1; Tue, 24 Oct 2017 23:05:17 +0800 From: John Garry To: , CC: , , , , Xiang Chen , John Garry Subject: [PATCH 06/19] scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET Date: Tue, 24 Oct 2017 23:51:36 +0800 Message-ID: <1508860309-212397-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508860309-212397-1-git-send-email-john.garry@huawei.com> References: <1508860309-212397-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: Xiang Chen When a PHY_FUNC_LINK_RESET is issued, we need to fill the transport identify_frame to SAS controller before the PHYs are enabled. Without this, we may find that if a PHY which belonged to a wideport before the reset may generate a new port id. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 07538cf..ea4b5d6 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -198,7 +198,7 @@ struct hisi_sas_hw { int (*slot_complete)(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot); void (*phys_init)(struct hisi_hba *hisi_hba); - void (*phy_enable)(struct hisi_hba *hisi_hba, int phy_no); + void (*phy_start)(struct hisi_hba *hisi_hba, int phy_no); void (*phy_disable)(struct hisi_hba *hisi_hba, int phy_no); void (*phy_hard_reset)(struct hisi_hba *hisi_hba, int phy_no); void (*get_events)(struct hisi_hba *hisi_hba, int phy_no); diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index f49a131..88d90dc 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -765,7 +765,7 @@ static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func, case PHY_FUNC_LINK_RESET: hisi_hba->hw->phy_disable(hisi_hba, phy_no); msleep(100); - hisi_hba->hw->phy_enable(hisi_hba, phy_no); + hisi_hba->hw->phy_start(hisi_hba, phy_no); break; case PHY_FUNC_DISABLE: diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 08eca20..00b5ee4 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1857,7 +1857,7 @@ static int hisi_sas_v1_init(struct hisi_hba *hisi_hba) .start_delivery = start_delivery_v1_hw, .slot_complete = slot_complete_v1_hw, .phys_init = phys_init_v1_hw, - .phy_enable = enable_phy_v1_hw, + .phy_start = start_phy_v1_hw, .phy_disable = disable_phy_v1_hw, .phy_hard_reset = phy_hard_reset_v1_hw, .phy_set_linkrate = phy_set_linkrate_v1_hw, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 3b2e5b5..50a0fc8 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3463,7 +3463,7 @@ static int soft_reset_v2_hw(struct hisi_hba *hisi_hba) .start_delivery = start_delivery_v2_hw, .slot_complete = slot_complete_v2_hw, .phys_init = phys_init_v2_hw, - .phy_enable = enable_phy_v2_hw, + .phy_start = start_phy_v2_hw, .phy_disable = disable_phy_v2_hw, .phy_hard_reset = phy_hard_reset_v2_hw, .get_events = phy_get_events_v2_hw, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index ac499e9..67ebd8f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -1781,7 +1781,7 @@ static int soft_reset_v3_hw(struct hisi_hba *hisi_hba) .start_delivery = start_delivery_v3_hw, .slot_complete = slot_complete_v3_hw, .phys_init = phys_init_v3_hw, - .phy_enable = enable_phy_v3_hw, + .phy_start = start_phy_v3_hw, .phy_disable = disable_phy_v3_hw, .phy_hard_reset = phy_hard_reset_v3_hw, .phy_get_max_linkrate = phy_get_max_linkrate_v3_hw,