On 2024/2/27 17:01, Xingui Yang wrote:
As of commit d8649fc1c5e4 ("scsi: libsas: Do discovery on empty PHY to update PHY info"), do discovery will send a new SMP_DISCOVER and update phy->phy_change_count. We found that if the disk is reconnected and phy change_count changes at this time, the disk scanning process will not be triggered. So update the PHY info with the last query results. Fixes: d8649fc1c5e4 ("scsi: libsas: Do discovery on empty PHY to update PHY info") Signed-off-by: Xingui Yang<yangxingui@xxxxxxxxxx> --- v1 -> v2: Use sas_get_phy_discover() instead of sas_get_phy_attached_dev() in sas_rediscover_dev() and use disc_resp to update phy info. --- drivers/scsi/libsas/sas_expander.c | 37 ++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-)
Looks good to me: Reviewed-by: Jason Yan <yanaijie@xxxxxxxxxx>