mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>
Cc: <linuxarm@huawei.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <zhangfei.gao@linaro.org>,
	Xiang Chen <chenxiang66@hisilicon.com>,
	John Garry <john.garry@huawei.com>
Subject: [PATCH 06/19] scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET
Date: Tue, 24 Oct 2017 23:51:36 +0800	[thread overview]
Message-ID: <1508860309-212397-7-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1508860309-212397-1-git-send-email-john.garry@huawei.com>

From: Xiang Chen <chenxiang66@hisilicon.com>

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 <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
---
 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(-)

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,
-- 
1.9.1

  parent reply	other threads:[~2017-10-24 15:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 15:51 [PATCH 00/19] hisi_sas: misc fixes, improvements, and new features John Garry
2017-10-24 15:51 ` [PATCH 01/19] scsi: hisi_sas: delete get_ncq_tag_v3_hw() John Garry
2017-10-24 15:51 ` [PATCH 02/19] scsi: hisi_sas: fix internal abort slot timeout bug John Garry
2017-10-24 15:51 ` [PATCH 03/19] scsi: hisi_sas: use spin_lock_irqsave() for hisi_hba.lock John Garry
2017-10-24 15:51 ` [PATCH 04/19] scsi: hisi_sas: grab hisi_hba.lock when processing slots John Garry
2017-10-24 15:51 ` [PATCH 05/19] scsi: hisi_sas: fix SATA breakpoint memory size John Garry
2017-10-24 15:51 ` John Garry [this message]
2017-10-24 15:51 ` [PATCH 07/19] scsi: hisi_sas: fix NULL check in SMP abort task path John Garry
2017-10-24 15:51 ` [PATCH 08/19] scsi: hisi_sas: fix the risk of freeing slot twice John Garry
2017-10-24 15:51 ` [PATCH 09/19] scsi: hisi_sas: use array for v2 hw AXI errors John Garry
2017-10-24 15:51 ` [PATCH 10/19] scsi: hisi_sas: report ECC errors in v2 hw to userspace John Garry
2017-10-24 15:51 ` [PATCH 11/19] scsi: hisi_sas: report v2 hw AXI errors " John Garry
2017-10-24 15:51 ` [PATCH 12/19] scsi: hisi_sas: check PHY state in get_wideport_bitmap_v3_hw() John Garry
2017-10-24 15:51 ` [PATCH 13/19] scsi: hisi_sas: init connect cfg register for v3 hw John Garry
2017-10-24 15:51 ` [PATCH 14/19] scsi: hisi_sas: add v3 hw DFX feature John Garry
2017-10-24 15:51 ` [PATCH 15/19] scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw John Garry
2017-10-24 15:51 ` [PATCH 16/19] scsi: hisi_sas: fix a bug when free device " John Garry
2017-10-24 15:51 ` [PATCH 17/19] scsi: hisi_sas: complete all tasklets prior to host reset John Garry
2017-10-24 15:51 ` [PATCH 18/19] scsi: hisi_sas: add v3 hw support for AXI fatal error John Garry
2017-10-24 15:51 ` [PATCH 19/19] scsi: hisi_sas: add v3 hw port AXI error handling John Garry
2017-10-25 12:29 ` [PATCH 00/19] hisi_sas: misc fixes, improvements, and new features Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508860309-212397-7-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®