From 726f0785b608d09bdd64bdbadc09217ebbf9920e Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 3 Jan 2007 17:30:39 +0900 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/ata/libata-eh.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/ata/libata-eh.c') diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 748435807d6..52c85af7fe9 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) }; struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; - unsigned int nbytes; if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) continue; - nbytes = qc->nbytes; - if (!nbytes) - nbytes = qc->nsect << 9; - ata_dev_printk(qc->dev, KERN_ERR, "cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " "tag %d cdb 0x%x data %u %s\n " @@ -1461,7 +1456,7 @@ static void ata_eh_report(struct ata_port *ap) cmd->lbal, cmd->lbam, cmd->lbah, cmd->hob_feature, cmd->hob_nsect, cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah, - cmd->device, qc->tag, qc->cdb[0], nbytes, + cmd->device, qc->tag, qc->cdb[0], qc->nbytes, dma_str[qc->dma_dir], res->command, res->feature, res->nsect, res->lbal, res->lbam, res->lbah, -- cgit v1.2.3