diff options
author | John Garry <john.garry@huawei.com> | 2019-04-11 20:46:38 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-04-12 21:30:12 -0400 |
commit | c63b88ccff0a0efff1d14aa25439ae3e207a5ccf (patch) | |
tree | 65986e8ddf7155e166c998267e19a1a266de73d0 /drivers/scsi/scsi.c | |
parent | 447f78c0e183892bcdd5664472cfcb8846b9081e (diff) |
scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected
In commit efdcad62e7b8 ("scsi: hisi_sas: Set PHY linkrate when
disconnected"), we use the sas_phy_data.enable flag to track whether the
PHY was enabled or not, so that we know if we should set the PHY negotiated
linkrate at SAS_LINK_RATE_UNKNOWN or SAS_PHY_DISABLED.
However, it is not proper to use sas_phy_data.enable, since it is only set
when libsas attempts to set the PHY disabled/enabled; hence, it may not
even have an initial value.
As a solution to this problem, introduce hisi_sas_phy.enable to track
whether the PHY is enabled or not, so that we can set the negotiated
linkrate properly when the PHY comes down.
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi.c')
0 files changed, 0 insertions, 0 deletions