From 057e5fc03369f8f2ed9b2ca884754b1d80b83620 Mon Sep 17 00:00:00 2001 From: John Garry Date: Thu, 12 May 2022 19:15:32 +0800 Subject: scsi: libsas: Refactor sas_ata_hard_reset() Create function sas_ata_wait_after_reset() from sas_ata_hard_reset() as some LLDDs may want to check for a remote ATA phy is up after reset. Link: https://lore.kernel.org/r/1652354134-171343-2-git-send-email-john.garry@huawei.com Tested-by: Yihang Li Reviewed-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen --- include/scsi/sas_ata.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index d47dea70855d..a1df4f9d57a3 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h @@ -34,6 +34,7 @@ void sas_resume_sata(struct asd_sas_port *port); void sas_ata_end_eh(struct ata_port *ap); int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, int force_phy_id); +int sas_ata_wait_after_reset(struct domain_device *dev, unsigned long deadline); #else @@ -91,6 +92,12 @@ static inline int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, { return 0; } + +static inline int sas_ata_wait_after_reset(struct domain_device *dev, + unsigned long deadline) +{ + return -ETIMEDOUT; +} #endif #endif /* _SAS_ATA_H_ */ -- cgit v1.2.3