Skip to content
Commit 38653379 authored by Luo Jiaxing's avatar Luo Jiaxing Committed by Martin K. Petersen
Browse files

scsi: libsas: Check link status in ATA prereset()

libata currently attempts to reset even if the SATA disk is unplugged.  To
avoid the meaningless reset of a missing disk, libsas should report offline
status to libata. libata already provides a .prereset callback for this
purpose. This is called by ata_eh_reset() and can be used to influence
whether a reset attempt should be made.

Add sas_ata_preset callback to check status of phy and disk. If the disk is
already offline or phy is disabled, we return -ENOENT to libata to avoid
the reset.

Link: https://lore.kernel.org/r/1595408643-63011-3-git-send-email-luojiaxing@huawei.com


Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3a243c2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment