From: Luo Jiaxing <luojiaxing@huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID9GQH -------------------------------- Upstream: No We found out that abnormal scenario handle for flutter can not cover all abnormal scenario,so we change the order to let it handle eralier. Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> DTS:DTS2019041908574 Description: NA Team:HISI_SW Feature or Bugfix:Bugfix Change-Id: I69ea02d622ae2873d8bace66da7ad0fee9cf90fd Signed-off-by: l00437090 <l00437090@huawei.com> Reviewed-on: http://10.90.31.173:8080/6839 Tested-by: public TuringEE <turingee@huawei.com> Reviewed-by: chenxiang 00284940 <chenxiang66@hisilicon.com> Reviewed-by: public TuringEE <turingee@huawei.com> Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> --- drivers/scsi/libsas/sas_expander.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index f1ec8d5d3573..35b0b9e6f3f2 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -2066,13 +2066,6 @@ static bool sas_process_flutter(struct domain_device *dev, struct ex_phy *phy, pr_debug("ex %016llx phy%d broadcast flutter%s\n", SAS_ADDR(dev->sas_addr), phy_id, action); - if (linkrate != phy->linkrate) { - pr_debug("ex %016llx phy%d linkrate changed from %d to %d\n", - SAS_ADDR(dev->sas_addr), phy_id, - linkrate, phy->linkrate); - return false; - } - /* the phy attached address will be updated by sas_ex_phy_discover() * and sometimes become abnormal */ @@ -2088,6 +2081,13 @@ static bool sas_process_flutter(struct domain_device *dev, struct ex_phy *phy, return false; } + if (linkrate != phy->linkrate) { + pr_debug("ex %016llx phy%d linkrate changed from %d to %d\n", + SAS_ADDR(dev->sas_addr), phy_id, + linkrate, phy->linkrate); + return false; + } + if (ata_dev) { struct ata_device *adev = sas_to_ata_dev(ata_dev); unsigned int class = ata_dev->sata_dev.class; -- 2.46.1