linux/drivers/scsi/libsas
John Garry 001ec7f89b scsi: libsas: Add sas_execute_tmf()
Drivers using libsas have to issue their own TMFs, and the code to do this
is duplicated between drivers.

Add a common function to handle TMFs. This will be also used for sending
ATA commands, but use name "tmf" as the purpose is similar between SCSI and
ATA in the usage.

The force_phy_id argument will be used for a hisi_sas HW bug workaround.

We check the sas task status stat field against TMF codes, as according to
the SAS v1.1 spec 9.2.2.5.3, if response_data is in datapres, then the
response code should be a TMF code - see table 128.

Link: https://lore.kernel.org/r/1645112566-115804-10-git-send-email-john.garry@huawei.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>
2022-02-19 15:59:35 -05:00
..
Kconfig scsi: libsas: Drop BLK_DEV_BSGLIB selection 2021-07-27 00:06:42 -04:00
Makefile scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_ata.c scsi: libsas: Delete SAS_SG_ERR 2022-02-19 15:59:34 -05:00
sas_discover.c scsi: libsas: Use void for sas_discover_event() return code 2022-02-11 17:13:29 -05:00
sas_event.c scsi: libsas: Keep host active while processing events 2021-12-22 23:38:31 -05:00
sas_expander.c scsi: libsas: Move SMP task handlers to core 2022-02-19 15:59:34 -05:00
sas_host_smp.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_init.c scsi: libsas: Defer works of new phys during suspend 2021-12-22 23:38:30 -05:00
sas_internal.h scsi: libsas: Add sas_execute_tmf() 2022-02-19 15:59:35 -05:00
sas_phy.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_port.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_scsi_host.c scsi: libsas: Add sas_execute_tmf() 2022-02-19 15:59:35 -05:00
sas_task.c scsi: libsas: Use enum for response frame DATAPRES field 2022-02-19 15:59:34 -05:00