Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sergey Shtylyov and committed by
Damien Le Moal
efcef265 f7220eac

+90 -84
+1 -1
drivers/ata/acard-ahci.c
··· 265 265 if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE && 266 266 !(qc->flags & ATA_QCFLAG_FAILED)) { 267 267 ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf); 268 - qc->result_tf.command = (rx_fis + RX_FIS_PIO_SETUP)[15]; 268 + qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15]; 269 269 } else 270 270 ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf); 271 271
+2 -2
drivers/ata/ahci.c
··· 739 739 740 740 /* clear D2H reception area to properly wait for D2H FIS */ 741 741 ata_tf_init(link->device, &tf); 742 - tf.command = ATA_BUSY; 742 + tf.status = ATA_BUSY; 743 743 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 744 744 745 745 rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context), ··· 808 808 809 809 /* clear D2H reception area to properly wait for D2H FIS */ 810 810 ata_tf_init(link->device, &tf); 811 - tf.command = ATA_BUSY; 811 + tf.status = ATA_BUSY; 812 812 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 813 813 814 814 rc = sata_link_hardreset(link, timing, deadline, &online,
+1 -1
drivers/ata/ahci_qoriq.c
··· 123 123 124 124 /* clear D2H reception area to properly wait for D2H FIS */ 125 125 ata_tf_init(link->device, &tf); 126 - tf.command = ATA_BUSY; 126 + tf.status = ATA_BUSY; 127 127 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 128 128 129 129 rc = sata_link_hardreset(link, timing, deadline, &online,
+1 -1
drivers/ata/ahci_xgene.c
··· 365 365 do { 366 366 /* clear D2H reception area to properly wait for D2H FIS */ 367 367 ata_tf_init(link->device, &tf); 368 - tf.command = ATA_BUSY; 368 + tf.status = ATA_BUSY; 369 369 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 370 370 rc = sata_link_hardreset(link, timing, deadline, online, 371 371 ahci_check_ready);
+2 -2
drivers/ata/libahci.c
··· 1561 1561 1562 1562 /* clear D2H reception area to properly wait for D2H FIS */ 1563 1563 ata_tf_init(link->device, &tf); 1564 - tf.command = ATA_BUSY; 1564 + tf.status = ATA_BUSY; 1565 1565 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 1566 1566 1567 1567 rc = sata_link_hardreset(link, timing, deadline, online, ··· 2033 2033 if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE && 2034 2034 !(qc->flags & ATA_QCFLAG_FAILED)) { 2035 2035 ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf); 2036 - qc->result_tf.command = (rx_fis + RX_FIS_PIO_SETUP)[15]; 2036 + qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15]; 2037 2037 } else 2038 2038 ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf); 2039 2039
+4 -4
drivers/ata/libata-acpi.c
··· 546 546 547 547 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 548 548 tf->protocol = ATA_PROT_NODATA; 549 - tf->feature = gtf->tf[0]; /* 0x1f1 */ 549 + tf->error = gtf->tf[0]; /* 0x1f1 */ 550 550 tf->nsect = gtf->tf[1]; /* 0x1f2 */ 551 551 tf->lbal = gtf->tf[2]; /* 0x1f3 */ 552 552 tf->lbam = gtf->tf[3]; /* 0x1f4 */ 553 553 tf->lbah = gtf->tf[4]; /* 0x1f5 */ 554 554 tf->device = gtf->tf[5]; /* 0x1f6 */ 555 - tf->command = gtf->tf[6]; /* 0x1f7 */ 555 + tf->status = gtf->tf[6]; /* 0x1f7 */ 556 556 } 557 557 558 558 static int ata_acpi_filter_tf(struct ata_device *dev, ··· 679 679 "(%s) rejected by device (Stat=0x%02x Err=0x%02x)", 680 680 tf.command, tf.feature, tf.nsect, tf.lbal, 681 681 tf.lbam, tf.lbah, tf.device, descr, 682 - rtf.command, rtf.feature); 682 + rtf.status, rtf.error); 683 683 rc = 0; 684 684 break; 685 685 ··· 689 689 "(%s) failed (Emask=0x%x Stat=0x%02x Err=0x%02x)", 690 690 tf.command, tf.feature, tf.nsect, tf.lbal, 691 691 tf.lbam, tf.lbah, tf.device, descr, 692 - err_mask, rtf.command, rtf.feature); 692 + err_mask, rtf.status, rtf.error); 693 693 rc = -EIO; 694 694 break; 695 695 }
+6 -6
drivers/ata/libata-core.c
··· 1171 1171 ata_dev_warn(dev, 1172 1172 "failed to read native max address (err_mask=0x%x)\n", 1173 1173 err_mask); 1174 - if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED)) 1174 + if (err_mask == AC_ERR_DEV && (tf.error & ATA_ABORTED)) 1175 1175 return -EACCES; 1176 1176 return -EIO; 1177 1177 } ··· 1235 1235 "failed to set max address (err_mask=0x%x)\n", 1236 1236 err_mask); 1237 1237 if (err_mask == AC_ERR_DEV && 1238 - (tf.feature & (ATA_ABORTED | ATA_IDNF))) 1238 + (tf.error & (ATA_ABORTED | ATA_IDNF))) 1239 1239 return -EACCES; 1240 1240 return -EIO; 1241 1241 } ··· 1584 1584 1585 1585 /* perform minimal error analysis */ 1586 1586 if (qc->flags & ATA_QCFLAG_FAILED) { 1587 - if (qc->result_tf.command & (ATA_ERR | ATA_DF)) 1587 + if (qc->result_tf.status & (ATA_ERR | ATA_DF)) 1588 1588 qc->err_mask |= AC_ERR_DEV; 1589 1589 1590 1590 if (!qc->err_mask) ··· 1593 1593 if (qc->err_mask & ~AC_ERR_OTHER) 1594 1594 qc->err_mask &= ~AC_ERR_OTHER; 1595 1595 } else if (qc->tf.command == ATA_CMD_REQ_SENSE_DATA) { 1596 - qc->result_tf.command |= ATA_SENSE; 1596 + qc->result_tf.status |= ATA_SENSE; 1597 1597 } 1598 1598 1599 1599 /* finish up */ ··· 1813 1813 return 0; 1814 1814 } 1815 1815 1816 - if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) { 1816 + if ((err_mask == AC_ERR_DEV) && (tf.error & ATA_ABORTED)) { 1817 1817 /* Device or controller might have reported 1818 1818 * the wrong device class. Give a shot at the 1819 1819 * other IDENTIFY if the current one is ··· 4375 4375 /* A clean abort indicates an original or just out of spec drive 4376 4376 and we should continue as we issue the setup based on the 4377 4377 drive reported working geometry */ 4378 - if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED)) 4378 + if (err_mask == AC_ERR_DEV && (tf.error & ATA_ABORTED)) 4379 4379 err_mask = 0; 4380 4380 4381 4381 return err_mask;
+21 -21
drivers/ata/libata-eh.c
··· 1386 1386 1387 1387 err_mask = ata_exec_internal(dev, &tf, cdb, DMA_NONE, NULL, 0, 0); 1388 1388 if (err_mask == AC_ERR_DEV) 1389 - *r_sense_key = tf.feature >> 4; 1389 + *r_sense_key = tf.error >> 4; 1390 1390 return err_mask; 1391 1391 } 1392 1392 ··· 1429 1429 1430 1430 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); 1431 1431 /* Ignore err_mask; ATA_ERR might be set */ 1432 - if (tf.command & ATA_SENSE) { 1432 + if (tf.status & ATA_SENSE) { 1433 1433 ata_scsi_set_sense(dev, cmd, tf.lbah, tf.lbam, tf.lbal); 1434 1434 qc->flags |= ATA_QCFLAG_SENSE_VALID; 1435 1435 } else { 1436 1436 ata_dev_warn(dev, "request sense failed stat %02x emask %x\n", 1437 - tf.command, err_mask); 1437 + tf.status, err_mask); 1438 1438 } 1439 1439 } 1440 1440 ··· 1557 1557 const struct ata_taskfile *tf) 1558 1558 { 1559 1559 unsigned int tmp, action = 0; 1560 - u8 stat = tf->command, err = tf->feature; 1560 + u8 stat = tf->status, err = tf->error; 1561 1561 1562 1562 if ((stat & (ATA_BUSY | ATA_DRQ | ATA_DRDY)) != ATA_DRDY) { 1563 1563 qc->err_mask |= AC_ERR_HSM; ··· 1594 1594 if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) { 1595 1595 tmp = atapi_eh_request_sense(qc->dev, 1596 1596 qc->scsicmd->sense_buffer, 1597 - qc->result_tf.feature >> 4); 1597 + qc->result_tf.error >> 4); 1598 1598 if (!tmp) 1599 1599 qc->flags |= ATA_QCFLAG_SENSE_VALID; 1600 1600 else ··· 2360 2360 cmd->hob_feature, cmd->hob_nsect, 2361 2361 cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah, 2362 2362 cmd->device, qc->tag, data_buf, cdb_buf, 2363 - res->command, res->feature, res->nsect, 2363 + res->status, res->error, res->nsect, 2364 2364 res->lbal, res->lbam, res->lbah, 2365 2365 res->hob_feature, res->hob_nsect, 2366 2366 res->hob_lbal, res->hob_lbam, res->hob_lbah, ··· 2368 2368 qc->err_mask & AC_ERR_NCQ ? " <F>" : ""); 2369 2369 2370 2370 #ifdef CONFIG_ATA_VERBOSE_ERROR 2371 - if (res->command & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | 2372 - ATA_SENSE | ATA_ERR)) { 2373 - if (res->command & ATA_BUSY) 2371 + if (res->status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | 2372 + ATA_SENSE | ATA_ERR)) { 2373 + if (res->status & ATA_BUSY) 2374 2374 ata_dev_err(qc->dev, "status: { Busy }\n"); 2375 2375 else 2376 2376 ata_dev_err(qc->dev, "status: { %s%s%s%s%s}\n", 2377 - res->command & ATA_DRDY ? "DRDY " : "", 2378 - res->command & ATA_DF ? "DF " : "", 2379 - res->command & ATA_DRQ ? "DRQ " : "", 2380 - res->command & ATA_SENSE ? "SENSE " : "", 2381 - res->command & ATA_ERR ? "ERR " : ""); 2377 + res->status & ATA_DRDY ? "DRDY " : "", 2378 + res->status & ATA_DF ? "DF " : "", 2379 + res->status & ATA_DRQ ? "DRQ " : "", 2380 + res->status & ATA_SENSE ? "SENSE " : "", 2381 + res->status & ATA_ERR ? "ERR " : ""); 2382 2382 } 2383 2383 2384 2384 if (cmd->command != ATA_CMD_PACKET && 2385 - (res->feature & (ATA_ICRC | ATA_UNC | ATA_AMNF | 2386 - ATA_IDNF | ATA_ABORTED))) 2385 + (res->error & (ATA_ICRC | ATA_UNC | ATA_AMNF | ATA_IDNF | 2386 + ATA_ABORTED))) 2387 2387 ata_dev_err(qc->dev, "error: { %s%s%s%s%s}\n", 2388 - res->feature & ATA_ICRC ? "ICRC " : "", 2389 - res->feature & ATA_UNC ? "UNC " : "", 2390 - res->feature & ATA_AMNF ? "AMNF " : "", 2391 - res->feature & ATA_IDNF ? "IDNF " : "", 2392 - res->feature & ATA_ABORTED ? "ABRT " : ""); 2388 + res->error & ATA_ICRC ? "ICRC " : "", 2389 + res->error & ATA_UNC ? "UNC " : "", 2390 + res->error & ATA_AMNF ? "AMNF " : "", 2391 + res->error & ATA_IDNF ? "IDNF " : "", 2392 + res->error & ATA_ABORTED ? "ABRT " : ""); 2393 2393 #endif 2394 2394 } 2395 2395 }
+5 -5
drivers/ata/libata-sata.c
··· 191 191 192 192 void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf) 193 193 { 194 - tf->command = fis[2]; /* status */ 195 - tf->feature = fis[3]; /* error */ 194 + tf->status = fis[2]; 195 + tf->error = fis[3]; 196 196 197 197 tf->lbal = fis[4]; 198 198 tf->lbam = fis[5]; ··· 1406 1406 1407 1407 *tag = buf[0] & 0x1f; 1408 1408 1409 - tf->command = buf[2]; 1410 - tf->feature = buf[3]; 1409 + tf->status = buf[2]; 1410 + tf->error = buf[3]; 1411 1411 tf->lbal = buf[4]; 1412 1412 tf->lbam = buf[5]; 1413 1413 tf->lbah = buf[6]; ··· 1482 1482 qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48; 1483 1483 qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ; 1484 1484 if (dev->class == ATA_DEV_ZAC && 1485 - ((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary)) { 1485 + ((qc->result_tf.status & ATA_SENSE) || qc->result_tf.auxiliary)) { 1486 1486 char sense_key, asc, ascq; 1487 1487 1488 1488 sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;
+11 -11
drivers/ata/libata-scsi.c
··· 680 680 */ 681 681 static void ata_dump_status(struct ata_port *ap, struct ata_taskfile *tf) 682 682 { 683 - u8 stat = tf->command, err = tf->feature; 683 + u8 stat = tf->status, err = tf->error; 684 684 685 685 if (stat & ATA_BUSY) { 686 686 ata_port_warn(ap, "status=0x%02x {Busy} ", stat); ··· 871 871 * onto sense key, asc & ascq. 872 872 */ 873 873 if (qc->err_mask || 874 - tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 875 - ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, 874 + tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 875 + ata_to_sense_error(qc->ap->print_id, tf->status, tf->error, 876 876 &sense_key, &asc, &ascq, verbose); 877 877 ata_scsi_set_sense(qc->dev, cmd, sense_key, asc, ascq); 878 878 } else { ··· 901 901 * Copy registers into sense buffer. 902 902 */ 903 903 desc[2] = 0x00; 904 - desc[3] = tf->feature; /* == error reg */ 904 + desc[3] = tf->error; 905 905 desc[5] = tf->nsect; 906 906 desc[7] = tf->lbal; 907 907 desc[9] = tf->lbam; 908 908 desc[11] = tf->lbah; 909 909 desc[12] = tf->device; 910 - desc[13] = tf->command; /* == status reg */ 910 + desc[13] = tf->status; 911 911 912 912 /* 913 913 * Fill in Extend bit, and the high order bytes ··· 922 922 } 923 923 } else { 924 924 /* Fixed sense format */ 925 - desc[0] = tf->feature; 926 - desc[1] = tf->command; /* status */ 925 + desc[0] = tf->error; 926 + desc[1] = tf->status; 927 927 desc[2] = tf->device; 928 928 desc[3] = tf->nsect; 929 929 desc[7] = 0; ··· 972 972 * onto sense key, asc & ascq. 973 973 */ 974 974 if (qc->err_mask || 975 - tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 976 - ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, 975 + tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 976 + ata_to_sense_error(qc->ap->print_id, tf->status, tf->error, 977 977 &sense_key, &asc, &ascq, verbose); 978 978 ata_scsi_set_sense(dev, cmd, sense_key, asc, ascq); 979 979 } else { 980 980 /* Could not decode error */ 981 981 ata_dev_warn(dev, "could not decode error status 0x%x err_mask 0x%x\n", 982 - tf->command, qc->err_mask); 982 + tf->status, qc->err_mask); 983 983 ata_scsi_set_sense(dev, cmd, ABORTED_COMMAND, 0, 0); 984 984 return; 985 985 } ··· 2473 2473 2474 2474 /* fill these in, for the case where they are -not- overwritten */ 2475 2475 cmd->sense_buffer[0] = 0x70; 2476 - cmd->sense_buffer[2] = qc->tf.feature >> 4; 2476 + cmd->sense_buffer[2] = qc->tf.error >> 4; 2477 2477 2478 2478 ata_qc_reinit(qc); 2479 2479
+3 -3
drivers/ata/libata-sff.c
··· 449 449 { 450 450 struct ata_ioports *ioaddr = &ap->ioaddr; 451 451 452 - tf->command = ata_sff_check_status(ap); 453 - tf->feature = ioread8(ioaddr->error_addr); 452 + tf->status = ata_sff_check_status(ap); 453 + tf->error = ioread8(ioaddr->error_addr); 454 454 tf->nsect = ioread8(ioaddr->nsect_addr); 455 455 tf->lbal = ioread8(ioaddr->lbal_addr); 456 456 tf->lbam = ioread8(ioaddr->lbam_addr); ··· 1825 1825 memset(&tf, 0, sizeof(tf)); 1826 1826 1827 1827 ap->ops->sff_tf_read(ap, &tf); 1828 - err = tf.feature; 1828 + err = tf.error; 1829 1829 if (r_err) 1830 1830 *r_err = err; 1831 1831
+2 -2
drivers/ata/pata_ep93xx.c
··· 416 416 { 417 417 struct ep93xx_pata_data *drv_data = ap->host->private_data; 418 418 419 - tf->command = ep93xx_pata_check_status(ap); 420 - tf->feature = ep93xx_pata_read_reg(drv_data, IDECTRL_ADDR_FEATURE); 419 + tf->status = ep93xx_pata_check_status(ap); 420 + tf->error = ep93xx_pata_read_reg(drv_data, IDECTRL_ADDR_FEATURE); 421 421 tf->nsect = ep93xx_pata_read_reg(drv_data, IDECTRL_ADDR_NSECT); 422 422 tf->lbal = ep93xx_pata_read_reg(drv_data, IDECTRL_ADDR_LBAL); 423 423 tf->lbam = ep93xx_pata_read_reg(drv_data, IDECTRL_ADDR_LBAM);
+2 -2
drivers/ata/pata_ns87415.c
··· 264 264 { 265 265 struct ata_ioports *ioaddr = &ap->ioaddr; 266 266 267 - tf->command = ns87560_check_status(ap); 268 - tf->feature = ioread8(ioaddr->error_addr); 267 + tf->status = ns87560_check_status(ap); 268 + tf->error = ioread8(ioaddr->error_addr); 269 269 tf->nsect = ioread8(ioaddr->nsect_addr); 270 270 tf->lbal = ioread8(ioaddr->lbal_addr); 271 271 tf->lbam = ioread8(ioaddr->lbam_addr);
+2 -2
drivers/ata/pata_octeon_cf.c
··· 382 382 void __iomem *base = ap->ioaddr.data_addr; 383 383 384 384 blob = __raw_readw(base + 0xc); 385 - tf->feature = blob >> 8; 385 + tf->error = blob >> 8; 386 386 387 387 blob = __raw_readw(base + 2); 388 388 tf->nsect = blob & 0xff; ··· 394 394 395 395 blob = __raw_readw(base + 6); 396 396 tf->device = blob & 0xff; 397 - tf->command = blob >> 8; 397 + tf->status = blob >> 8; 398 398 399 399 if (tf->flags & ATA_TFLAG_LBA48) { 400 400 if (likely(ap->ioaddr.ctl_addr)) {
+1 -1
drivers/ata/pata_samsung_cf.c
··· 213 213 { 214 214 struct ata_ioports *ioaddr = &ap->ioaddr; 215 215 216 - tf->feature = ata_inb(ap->host, ioaddr->error_addr); 216 + tf->error = ata_inb(ap->host, ioaddr->error_addr); 217 217 tf->nsect = ata_inb(ap->host, ioaddr->nsect_addr); 218 218 tf->lbal = ata_inb(ap->host, ioaddr->lbal_addr); 219 219 tf->lbam = ata_inb(ap->host, ioaddr->lbam_addr);
+1 -1
drivers/ata/sata_highbank.c
··· 400 400 401 401 /* clear D2H reception area to properly wait for D2H FIS */ 402 402 ata_tf_init(link->device, &tf); 403 - tf.command = ATA_BUSY; 403 + tf.status = ATA_BUSY; 404 404 ata_tf_to_fis(&tf, 0, 0, d2h_fis); 405 405 406 406 do {
+5 -5
drivers/ata/sata_inic162x.c
··· 557 557 { 558 558 void __iomem *port_base = inic_port_base(ap); 559 559 560 - tf->feature = readb(port_base + PORT_TF_FEATURE); 560 + tf->error = readb(port_base + PORT_TF_FEATURE); 561 561 tf->nsect = readb(port_base + PORT_TF_NSECT); 562 562 tf->lbal = readb(port_base + PORT_TF_LBAL); 563 563 tf->lbam = readb(port_base + PORT_TF_LBAM); 564 564 tf->lbah = readb(port_base + PORT_TF_LBAH); 565 565 tf->device = readb(port_base + PORT_TF_DEVICE); 566 - tf->command = readb(port_base + PORT_TF_COMMAND); 566 + tf->status = readb(port_base + PORT_TF_COMMAND); 567 567 } 568 568 569 569 static bool inic_qc_fill_rtf(struct ata_queued_cmd *qc) ··· 580 580 */ 581 581 inic_tf_read(qc->ap, &tf); 582 582 583 - if (!(tf.command & ATA_ERR)) 583 + if (!(tf.status & ATA_ERR)) 584 584 return false; 585 585 586 - rtf->command = tf.command; 587 - rtf->feature = tf.feature; 586 + rtf->status = tf.status; 587 + rtf->error = tf.error; 588 588 return true; 589 589 } 590 590
+2 -2
drivers/ata/sata_rcar.c
··· 394 394 { 395 395 struct ata_ioports *ioaddr = &ap->ioaddr; 396 396 397 - tf->command = sata_rcar_check_status(ap); 398 - tf->feature = ioread32(ioaddr->error_addr); 397 + tf->status = sata_rcar_check_status(ap); 398 + tf->error = ioread32(ioaddr->error_addr); 399 399 tf->nsect = ioread32(ioaddr->nsect_addr); 400 400 tf->lbal = ioread32(ioaddr->lbal_addr); 401 401 tf->lbam = ioread32(ioaddr->lbam_addr);
+5 -5
drivers/ata/sata_svw.c
··· 194 194 static void k2_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf) 195 195 { 196 196 struct ata_ioports *ioaddr = &ap->ioaddr; 197 - u16 nsect, lbal, lbam, lbah, feature; 197 + u16 nsect, lbal, lbam, lbah, error; 198 198 199 - tf->command = k2_stat_check_status(ap); 199 + tf->status = k2_stat_check_status(ap); 200 200 tf->device = readw(ioaddr->device_addr); 201 - feature = readw(ioaddr->error_addr); 201 + error = readw(ioaddr->error_addr); 202 202 nsect = readw(ioaddr->nsect_addr); 203 203 lbal = readw(ioaddr->lbal_addr); 204 204 lbam = readw(ioaddr->lbam_addr); 205 205 lbah = readw(ioaddr->lbah_addr); 206 206 207 - tf->feature = feature; 207 + tf->error = error; 208 208 tf->nsect = nsect; 209 209 tf->lbal = lbal; 210 210 tf->lbam = lbam; 211 211 tf->lbah = lbah; 212 212 213 213 if (tf->flags & ATA_TFLAG_LBA48) { 214 - tf->hob_feature = feature >> 8; 214 + tf->hob_feature = error >> 8; 215 215 tf->hob_nsect = nsect >> 8; 216 216 tf->hob_lbal = lbal >> 8; 217 217 tf->hob_lbam = lbam >> 8;
+5 -5
drivers/ata/sata_vsc.c
··· 183 183 static void vsc_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf) 184 184 { 185 185 struct ata_ioports *ioaddr = &ap->ioaddr; 186 - u16 nsect, lbal, lbam, lbah, feature; 186 + u16 nsect, lbal, lbam, lbah, error; 187 187 188 - tf->command = ata_sff_check_status(ap); 188 + tf->status = ata_sff_check_status(ap); 189 189 tf->device = readw(ioaddr->device_addr); 190 - feature = readw(ioaddr->error_addr); 190 + error = readw(ioaddr->error_addr); 191 191 nsect = readw(ioaddr->nsect_addr); 192 192 lbal = readw(ioaddr->lbal_addr); 193 193 lbam = readw(ioaddr->lbam_addr); 194 194 lbah = readw(ioaddr->lbah_addr); 195 195 196 - tf->feature = feature; 196 + tf->error = error; 197 197 tf->nsect = nsect; 198 198 tf->lbal = lbal; 199 199 tf->lbam = lbam; 200 200 tf->lbah = lbah; 201 201 202 202 if (tf->flags & ATA_TFLAG_LBA48) { 203 - tf->hob_feature = feature >> 8; 203 + tf->hob_feature = error >> 8; 204 204 tf->hob_nsect = nsect >> 8; 205 205 tf->hob_lbal = lbal >> 8; 206 206 tf->hob_lbam = lbam >> 8;
+8 -2
include/linux/libata.h
··· 518 518 u8 hob_lbam; 519 519 u8 hob_lbah; 520 520 521 - u8 feature; 521 + union { 522 + u8 error; 523 + u8 feature; 524 + }; 522 525 u8 nsect; 523 526 u8 lbal; 524 527 u8 lbam; ··· 529 526 530 527 u8 device; 531 528 532 - u8 command; /* IO operation */ 529 + union { 530 + u8 status; 531 + u8 command; 532 + }; 533 533 534 534 u32 auxiliary; /* auxiliary field */ 535 535 /* from SATA 3.1 and */