summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sata.c
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-02-15 21:49:26 +0300
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-20 09:06:05 +0900
commitefcef265fd83d9a68a68926abecb3e1dd3e260a8 (patch)
tree197ab192056f0bcc040fe57c82855f686c6fb023 /drivers/ata/libata-sata.c
parentf7220eac752f2c96a1b6e0830cbf427ca908e511 (diff)
downloadlinux-efcef265fd83d9a68a68926abecb3e1dd3e260a8.tar.gz
linux-efcef265fd83d9a68a68926abecb3e1dd3e260a8.tar.bz2
linux-efcef265fd83d9a68a68926abecb3e1dd3e260a8.zip
ata: add/use ata_taskfile::{error|status} fields
Add the explicit error and status register fields to 'struct ata_taskfile' using the anonymous *union*s ('struct ide_taskfile' had that for ages!) and update the libata taskfile code accordingly. There should be no object code changes resulting from that... Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/libata-sata.c')
-rw-r--r--drivers/ata/libata-sata.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c
index 071158c0c44c..044a16daa2d4 100644
--- a/drivers/ata/libata-sata.c
+++ b/drivers/ata/libata-sata.c
@@ -191,8 +191,8 @@ EXPORT_SYMBOL_GPL(ata_tf_to_fis);
void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf)
{
- tf->command = fis[2]; /* status */
- tf->feature = fis[3]; /* error */
+ tf->status = fis[2];
+ tf->error = fis[3];
tf->lbal = fis[4];
tf->lbam = fis[5];
@@ -1406,8 +1406,8 @@ static int ata_eh_read_log_10h(struct ata_device *dev,
*tag = buf[0] & 0x1f;
- tf->command = buf[2];
- tf->feature = buf[3];
+ tf->status = buf[2];
+ tf->error = buf[3];
tf->lbal = buf[4];
tf->lbam = buf[5];
tf->lbah = buf[6];
@@ -1482,7 +1482,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ;
if (dev->class == ATA_DEV_ZAC &&
- ((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary)) {
+ ((qc->result_tf.status & ATA_SENSE) || qc->result_tf.auxiliary)) {
char sense_key, asc, ascq;
sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;