diff options
author | Mark Lord <liml@rtr.ca> | 2008-04-24 04:36:25 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-25 07:11:37 +0200 |
commit | a6116c9e60978a6deaa20691c67ffed727e50df1 (patch) | |
tree | 39d51e37b3d953ae9573e7418293ba8696efa133 /drivers/ata/libata-eh.c | |
parent | make sata_set_spd_needed() static (diff) | |
download | linux-a6116c9e60978a6deaa20691c67ffed727e50df1.tar.xz linux-a6116c9e60978a6deaa20691c67ffed727e50df1.zip |
libata-eh set tf flags in NCQ EH result_tf
Fix mis-reporting of NCQ errors by ensuring that result_tf->flags
is properly initialized in libata-eh. This allows ata_gen_ata_sense()
to report the failed block number correctly to SCSI after a media error
during NCQ.
This patch may also be a candidate for backporting to earlier kernels.
Without this fix, SCSI will fail I/O on the entire request rather
than just the bad sector. That can be bad for a request that was
merged from many independent read reads from different tasks.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index d94359a24d41..61dcd0026c64 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1402,6 +1402,7 @@ static void ata_eh_analyze_ncq_error(struct ata_link *link) /* we've got the perpetrator, condemn it */ qc = __ata_qc_from_tag(ap, tag); memcpy(&qc->result_tf, &tf, sizeof(tf)); + qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48; qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ; ehc->i.err_mask &= ~AC_ERR_DEV; } |