lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <1554986804-233706-3-git-send-email-john.garry@huawei.com> Date: Thu, 11 Apr 2019 20:46:37 +0800 From: John Garry <john.garry@...wei.com> To: <jejb@...ux.vnet.ibm.com>, <martin.petersen@...cle.com> CC: <linuxarm@...wei.com>, <linux-kernel@...r.kernel.org>, <linux-scsi@...r.kernel.org>, Xiang Chen <chenxiang66@...ilicon.com>, "John Garry" <john.garry@...wei.com> Subject: [PATCH 2/9] scsi: hisi_sas: Remedy inconsistent PHY down state in software From: Xiang Chen <chenxiang66@...ilicon.com> Currently there are two scenarioes which may cause PHY state of hardware (which is 0) is inconsistent with the state held in software: - Unplug SAS wire before get_phys_state when SAS controller reset, then the interrupts of phy down are ignored, phy state is 0 before reset, and it also gets 0 after reset, so phy down doesn't occur even if unpluged SAS wire; - For v3 hw later version, it will close bus when 2 bit ECC error occur. So if unplug SAS wire at that time, interrupts of phy down also not occur. So at last it will cause host reset. It also get phy state 0 before and after reset, the same issue occurs. To solve it, use hisi_sas_phy_down() directly in rescan topology function. Signed-off-by: Xiang Chen <chenxiang66@...ilicon.com> Signed-off-by: John Garry <john.garry@...wei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a1eaddcf740d..e7401e2bea27 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1427,9 +1427,9 @@ static void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 old_state, sas_ha->notify_port_event(sas_phy, PORTE_BROADCAST_RCVD); } - } else if (old_state & (1 << phy_no)) - /* PHY down but was up before */ + } else { hisi_sas_phy_down(hisi_hba, phy_no, 0); + } } } -- 2.17.1
Powered by blists - more mailing lists