summaryrefslogtreecommitdiffstats
path: root/include/math-emu/quad.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2019-02-28 22:51:00 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-06 19:26:46 -0500
commitefdcad62e7b8a02fcccc5ccca57806dce1482ac8 (patch)
treef2675e4969b55b085967cab1faa8cbf7f7acf2d9 /include/math-emu/quad.h
parentaaeb82323d12f3b61015878e035d74600e1f2c85 (diff)
downloadlinux-stable-efdcad62e7b8a02fcccc5ccca57806dce1482ac8.tar.gz
linux-stable-efdcad62e7b8a02fcccc5ccca57806dce1482ac8.tar.bz2
linux-stable-efdcad62e7b8a02fcccc5ccca57806dce1482ac8.zip
scsi: hisi_sas: Set PHY linkrate when disconnected
When the PHY comes down, we currently do not set the negotiated linkrate: root@(none)$ pwd /sys/class/sas_phy/phy-0:0 root@(none)$ more enable 1 root@(none)$ more negotiated_linkrate 12.0 Gbit root@(none)$ echo 0 > enable root@(none)$ more negotiated_linkrate 12.0 Gbit root@(none)$ This patch fixes the driver code to set it properly when the PHY comes down. If the PHY had been enabled, then set unknown; otherwise, flag as disabled. The logical place to set the negotiated linkrate for this scenario is PHY down routine, which is called from the PHY down ISR. However, it is not possible to know if the PHY comes down due to PHY disable or loss of link, as sas_phy.enabled member is not set until after the transport disable routine is complete, which races with the PHY down ISR. As an imperfect solution, use sas_phy_data.enable as the flag to know if the PHY is down due to disable. It's imperfect, as sas_phy_data is internal to libsas. I can't see another way without adding a new field to hisi_sas_phy and managing it, or changing SCSI SAS transport. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/math-emu/quad.h')
0 files changed, 0 insertions, 0 deletions