lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v6 8/8] scsi: libsas: Update SATA dev FIS in sas_ata_task_done()
Date
In sas_ata_task_done(), for commands which complete with error we set
the SATA dev FIS status field with ATA_ERR. In ata_eh_analyze_tf() this
would be interpreted as a HSM error. Set ATA_DRDY, which will lead libata
to judge as a device error, which is a safer bet.

Signed-off-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/libsas/sas_ata.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 61f64d54e67d..78e6046fb55a 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -139,8 +139,8 @@ static void sas_ata_task_done(struct sas_task *task)
qc->flags |= ATA_QCFLAG_FAILED;
}

- dev->sata_dev.fis[3] = 0x04; /* status err */
- dev->sata_dev.fis[2] = ATA_ERR;
+ dev->sata_dev.fis[2] = ATA_ERR | ATA_DRDY; /* tf status */
+ dev->sata_dev.fis[3] = ATA_ABORTED; /* tf error */
}
}

--
2.35.3
\
 
 \ /
  Last update: 2022-10-17 10:52    [W:0.760 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site