Skip to content

Commit 5a54691

Browse files
Luojiaxing1991martinkpetersen
authored andcommitted
scsi: hisi_sas: Feed back linkrate(max/min) when re-attached
At directly attached situation, if the user modifies the sysfs interface of maximum_linkrate and minimum_linkrate to renegotiate the linkrate between SAS controller and target, the value of both files mentioned above should have change to user setting after renegotiate is over, but it remains unchanged. To fix this bug, maximum_linkrate and minimum_linkrate will be directly fed back to relevant sas_phy structure. Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 38fe73c commit 5a54691

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,9 @@ static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
904904
_r.maximum_linkrate = max;
905905
_r.minimum_linkrate = min;
906906

907+
sas_phy->phy->maximum_linkrate = max;
908+
sas_phy->phy->minimum_linkrate = min;
909+
907910
hisi_hba->hw->phy_disable(hisi_hba, phy_no);
908911
msleep(100);
909912
hisi_hba->hw->phy_set_linkrate(hisi_hba, phy_no, &_r);

0 commit comments

Comments
 (0)