diff options
author | Tejun Heo <htejun@gmail.com> | 2007-01-03 03:30:39 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:31 -0500 |
commit | 726f0785b608d09bdd64bdbadc09217ebbf9920e (patch) | |
tree | cefc97e9d5fefb2735b1b7a5ca22d3b3cc742b13 /drivers/ata/libata-eh.c | |
parent | 16454445e1f0ca21ca2f29accb58478a7ff765a2 (diff) |
libata: kill qc->nsect and cursect
libata used two separate sets of variables to record request size and
current offset for ATA and ATAPI. This is confusing and fragile.
This patch replaces qc->nsect/cursect with qc->nbytes/curbytes and
kills them. Also, ata_pio_sector() is updated to use bytes for
qc->cursg_ofs instead of sectors. The field used to be used in bytes
for ATAPI and in sectors for ATA.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 748435807d68..52c85af7fe99 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1443,15 +1443,10 @@ static void ata_eh_report(struct ata_port *ap) | |||
1443 | }; | 1443 | }; |
1444 | struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); | 1444 | struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); |
1445 | struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; | 1445 | struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; |
1446 | unsigned int nbytes; | ||
1447 | 1446 | ||
1448 | if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) | 1447 | if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) |
1449 | continue; | 1448 | continue; |
1450 | 1449 | ||
1451 | nbytes = qc->nbytes; | ||
1452 | if (!nbytes) | ||
1453 | nbytes = qc->nsect << 9; | ||
1454 | |||
1455 | ata_dev_printk(qc->dev, KERN_ERR, | 1450 | ata_dev_printk(qc->dev, KERN_ERR, |
1456 | "cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " | 1451 | "cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " |
1457 | "tag %d cdb 0x%x data %u %s\n " | 1452 | "tag %d cdb 0x%x data %u %s\n " |
@@ -1461,7 +1456,7 @@ static void ata_eh_report(struct ata_port *ap) | |||
1461 | cmd->lbal, cmd->lbam, cmd->lbah, | 1456 | cmd->lbal, cmd->lbam, cmd->lbah, |
1462 | cmd->hob_feature, cmd->hob_nsect, | 1457 | cmd->hob_feature, cmd->hob_nsect, |
1463 | cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah, | 1458 | cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah, |
1464 | cmd->device, qc->tag, qc->cdb[0], nbytes, | 1459 | cmd->device, qc->tag, qc->cdb[0], qc->nbytes, |
1465 | dma_str[qc->dma_dir], | 1460 | dma_str[qc->dma_dir], |
1466 | res->command, res->feature, res->nsect, | 1461 | res->command, res->feature, res->nsect, |
1467 | res->lbal, res->lbam, res->lbah, | 1462 | res->lbal, res->lbam, res->lbah, |