diff options
author | John Garry <john.garry@huawei.com> | 2022-02-17 18:42:43 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-19 23:59:36 +0300 |
commit | 29d7769055a21968c0bbfe866affe1640d90bd1d (patch) | |
tree | 5afc2956140696a3ca5d138d3e0c28feceebcfa4 /drivers/scsi/libsas | |
parent | e8585452953a040a6d1d901e5b2e8c327f09e219 (diff) | |
download | linux-29d7769055a21968c0bbfe866affe1640d90bd1d.tar.xz |
scsi: libsas: Add sas_lu_reset()
Add a generic implementation of LU reset TMF handler, and use in LLDDs.
Link: https://lore.kernel.org/r/1645112566-115804-16-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 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index ac669215c3bc..d6f29e13204e 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -1063,6 +1063,16 @@ int sas_clear_task_set(struct domain_device *dev, u8 *lun) } EXPORT_SYMBOL_GPL(sas_clear_task_set); +int sas_lu_reset(struct domain_device *dev, u8 *lun) +{ + struct sas_tmf_task tmf_task = { + .tmf = TMF_LU_RESET, + }; + + return sas_execute_ssp_tmf(dev, lun, &tmf_task); +} +EXPORT_SYMBOL_GPL(sas_lu_reset); + /* * Tell an upper layer that it needs to initiate an abort for a given task. * This should only ever be called by an LLDD. |