aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorJohn Garry2022-02-22 20:50:59 +0800
committerMartin K. Petersen2022-02-22 21:11:02 -0500
commit3f2e252ef727318f81588704461735617ad55b88 (patch)
tree3d7ddb6d091a935e6455252ef5273589fd378b85 /include/scsi
parent4fea759edfa795b170a72bfd3be7b7601012ce4b (diff)
scsi: libsas: Add sas_execute_ata_cmd()
Add a function to execute an ATA command using the TMF code, and use in the hisi_sas driver. That driver needs to be able to issue the command on a specific phy, so add an interface for that. With that, hisi_sas_exec_internal_tmf_task() may be deleted. Link: https://lore.kernel.org/r/1645534259-27068-19-git-send-email-john.garry@huawei.com Tested-by: Yihang Li <liyihang6@hisilicon.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h7
-rw-r--r--include/scsi/sas_ata.h8
2 files changed, 11 insertions, 4 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 4ea964d33600..dc529cc92d65 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -552,6 +552,9 @@ struct sas_ata_task {
u8 stp_affil_pol:1;
u8 device_control_reg_update:1;
+
+ bool force_phy;
+ int force_phy_id;
};
struct sas_smp_task {
@@ -579,10 +582,6 @@ struct sas_ssp_task {
struct sas_tmf_task {
u8 tmf;
u16 tag_of_task_to_be_managed;
-
- /* Temp */
- int force_phy;
- int phy_id;
};
struct sas_task {
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 21e7c10c6295..d47dea70855d 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -32,6 +32,8 @@ void sas_probe_sata(struct asd_sas_port *port);
void sas_suspend_sata(struct asd_sas_port *port);
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);
#else
@@ -83,6 +85,12 @@ static inline int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy
static inline void sas_ata_end_eh(struct ata_port *ap)
{
}
+
+static inline int sas_execute_ata_cmd(struct domain_device *device, u8 *fis,
+ int force_phy_id)
+{
+ return 0;
+}
#endif
#endif /* _SAS_ATA_H_ */