Improve decisions regarding command retry worthiness by calling the funtion scsi_zbc_noretry_cmd() in ata_eh_worth_retry() if the command target is a ZAC device. Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> --- drivers/ata/libata-eh.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 11c3137d7b0a..504272b18e75 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2139,6 +2139,10 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev, */ static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc) { + if (qc->dev->flags & ATA_DFLAG_ZAC && + qc->flags & ATA_QCFLAG_SENSE_VALID && + scsi_zbc_noretry_cmd(qc->scsicmd)) + return 0; /* retrying will fail again */ if (qc->err_mask & AC_ERR_MEDIA) return 0; /* don't retry media errors */ if (qc->flags & ATA_QCFLAG_IO) -- 2.14.3