Skip to content

Commit f58c897

Browse files
Yihang Limartinkpetersen
authored andcommitted
scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id
Currently the driver sets the port invalid if one phy in the port is not enabled, which may cause issues in expander situation. In directly attached situation, if phy up doesn't occur in time when refreshing port id, the port is incorrectly set to invalid which will also cause disk lost. Therefore set a port invalid only if there are no devices attached to the port. Signed-off-by: Yihang Li <liyihang9@huawei.com> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Link: https://lore.kernel.org/r/1672805000-141102-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 037b480 commit f58c897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba)
13161316
device->linkrate = phy->sas_phy.linkrate;
13171317

13181318
hisi_hba->hw->setup_itct(hisi_hba, sas_dev);
1319-
} else
1319+
} else if (!port->port_attached)
13201320
port->id = 0xff;
13211321
}
13221322
}

0 commit comments

Comments
 (0)