OSDN Git Service

scsi: libsas: Handle non-TMF codes in sas_scsi_find_task()
authorJohn Garry <john.garry@huawei.com>
Thu, 17 Feb 2022 15:42:29 +0000 (23:42 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 19 Feb 2022 20:59:34 +0000 (15:59 -0500)
commit9aacf6fe90592cc7f64d56505e42606b61b76f00
tree54b6ed7e12fca77981b81b8674cc8fdf6571aa49
parentac2beb4e3bd75b0049068516b9d42201bda0ded3
scsi: libsas: Handle non-TMF codes in sas_scsi_find_task()

LLDD TMF callbacks may return linux or other error codes instead of TMF
codes. This may cause problems in sas_scsi_find_task() ->
.lldd_query_task(), as only TMF codes are handled there. As such, we may
not return a task_disposition type from sas_scsi_find_task(). Function
sas_eh_handle_sas_errors() only handles that type, and will only progress
error handling for those recognised types.

Return TASK_ABORT_FAILED upon exit on the assumption that the command may
still be alive and error handling should be escalated.

Link: https://lore.kernel.org/r/1645112566-115804-2-git-send-email-john.garry@huawei.com
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_scsi_host.c