]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET
authorXiang Chen <chenxiang66@hisilicon.com>
Tue, 24 Oct 2017 15:51:36 +0000 (23:51 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 16 Feb 2018 17:42:14 +0000 (12:42 -0500)
BugLink: https://bugs.launchpad.net/bugs/1739807
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 1eb8eeac17ee808b50b422f5ef2e27f5497f82ad)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index 3070a42eca0b9fc56acadb983cad8d65227b1739..7986ab166c51347ebc8eb3a6737a5964730f5b0c 100644 (file)
@@ -191,7 +191,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);
index 53a5c5387824f55c2c6bc37e7534dca02ac4ad6f..d7309f585afab1e90229e95425de252e12ce9134 100644 (file)
@@ -756,7 +756,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:
index 08eca20b0b81812a8ef32ac23d47a5ccbbb4f5ab..00b5ee4e49d3e7fc31c677af46d49c1b28974adc 100644 (file)
@@ -1857,7 +1857,7 @@ static const struct hisi_sas_hw hisi_sas_v1_hw = {
        .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,
index 4c6b1a6fa6757146e392c10af5028d1a3f641211..90adb59f8a3473dbcdc3f005d9cea88354e997d6 100644 (file)
@@ -3468,7 +3468,7 @@ static const struct hisi_sas_hw hisi_sas_v2_hw = {
        .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,
index 83d2dca1c650c3e0c32568ac1c6fba5505ece351..53e1974139493108e1b66cd9d589220f7762a448 100644 (file)
@@ -1636,7 +1636,7 @@ static const struct hisi_sas_hw hisi_sas_v3_hw = {
        .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,