linux-stable/drivers/scsi/libsas
Xingui Yang 98cfafaf2f scsi: libsas: Fix disk not being scanned in after being removed
commit 8e68a458bc upstream.

As of commit d8649fc1c5 ("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.

Therefore, call sas_set_ex_phy() to update the PHY info with the results of
the last query. And because the previous phy info will be used when calling
sas_unregister_devs_sas_addr(), sas_unregister_devs_sas_addr() should be
called before sas_set_ex_phy().

Fixes: d8649fc1c5 ("scsi: libsas: Do discovery on empty PHY to update PHY info")
Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Link: https://lore.kernel.org/r/20240307141413.48049-3-yangxingui@huawei.com
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-03 15:19:54 +02:00
..
Kconfig
Makefile
sas_ata.c scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort() 2023-05-11 23:03:42 +09:00
sas_discover.c
sas_event.c
sas_expander.c scsi: libsas: Fix disk not being scanned in after being removed 2024-04-03 15:19:54 +02:00
sas_host_smp.c
sas_init.c
sas_internal.h
sas_phy.c
sas_port.c
sas_scsi_host.c
sas_task.c