mbox series

[for-next,0/5] scsi: hisi_sas/libsas: Fix SATA devices missing issue during hisi_sas_debug_I_T_nexus_reset()

Message ID 20221118083714.4034612-1-zhanjie9@hisilicon.com
Headers show
Series scsi: hisi_sas/libsas: Fix SATA devices missing issue during hisi_sas_debug_I_T_nexus_reset() | expand

Message

Jie Zhan Nov. 18, 2022, 8:37 a.m. UTC
SATA devices on an expander may be removed and not be found again
when I_T nexus reset and revalidation are processed simultaneously,
which is probable to happen in hisi_sas_clear_nexus_ha().

The issue came up since commit 71453bd9d1bf ("scsi: hisi_sas: Use
sas_ata_wait_after_reset() in IT nexus reset"), where the ex_phy's
change count is updated in hisi_sas_debug_I_T_nexus_reset(), stopping
future revalidation from discovering the SATA devices after link
reset.

This patchset fixes the issue.

Jie Zhan (5):
  Revert "scsi: hisi_sas: Drain bcast events in
    hisi_sas_rescan_topology()"
  Revert "scsi: hisi_sas: Don't send bcast events from HW during nexus
    HA reset"
  scsi: libsas: Add smp_ata_check_ready_type()
  scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset
  scsi: libsas: Do not export sas_ata_wait_after_reset()

 drivers/scsi/hisi_sas/hisi_sas_main.c | 31 ++++++++-------------------
 drivers/scsi/libsas/sas_ata.c         | 28 ++++++++++++++++++++++--
 drivers/scsi/libsas/sas_expander.c    |  4 ++--
 drivers/scsi/libsas/sas_internal.h    |  2 ++
 include/scsi/sas_ata.h                |  7 +++---
 5 files changed, 42 insertions(+), 30 deletions(-)

Comments

Martin K. Petersen Dec. 1, 2022, 3:45 a.m. UTC | #1
On Fri, 18 Nov 2022 16:37:09 +0800, Jie Zhan wrote:

> SATA devices on an expander may be removed and not be found again
> when I_T nexus reset and revalidation are processed simultaneously,
> which is probable to happen in hisi_sas_clear_nexus_ha().
> 
> The issue came up since commit 71453bd9d1bf ("scsi: hisi_sas: Use
> sas_ata_wait_after_reset() in IT nexus reset"), where the ex_phy's
> change count is updated in hisi_sas_debug_I_T_nexus_reset(), stopping
> future revalidation from discovering the SATA devices after link
> reset.
> 
> [...]

Applied to 6.2/scsi-queue, thanks!

[1/5] Revert "scsi: hisi_sas: Drain bcast events in hisi_sas_rescan_topology()"
      https://git.kernel.org/mkp/scsi/c/7e613be7c63d
[2/5] Revert "scsi: hisi_sas: Don't send bcast events from HW during nexus HA reset"
      https://git.kernel.org/mkp/scsi/c/94a3555d1f0f
[3/5] scsi: libsas: Add smp_ata_check_ready_type()
      https://git.kernel.org/mkp/scsi/c/9181ce3cb5d9
[4/5] scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset
      https://git.kernel.org/mkp/scsi/c/3c2673a09cf1
[5/5] scsi: libsas: Do not export sas_ata_wait_after_reset()
      https://git.kernel.org/mkp/scsi/c/4d450cf2b00d