aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-01-03 03:30:39 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 17:39:31 -0500
commit726f0785b608d09bdd64bdbadc09217ebbf9920e (patch)
treecefc97e9d5fefb2735b1b7a5ca22d3b3cc742b13 /drivers/ata/libata-scsi.c
parent16454445e1f0ca21ca2f29accb58478a7ff765a2 (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-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 6a99c0824751..9b5088ab2742 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1359,7 +1359,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
1359 goto nothing_to_do; 1359 goto nothing_to_do;
1360 1360
1361 qc->flags |= ATA_QCFLAG_IO; 1361 qc->flags |= ATA_QCFLAG_IO;
1362 qc->nsect = n_block; 1362 qc->nbytes = n_block * ATA_SECT_SIZE;
1363 1363
1364 rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags, 1364 rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags,
1365 qc->tag); 1365 qc->tag);
@@ -2660,7 +2660,7 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
2660 * TODO: find out if we need to do more here to 2660 * TODO: find out if we need to do more here to
2661 * cover scatter/gather case. 2661 * cover scatter/gather case.
2662 */ 2662 */
2663 qc->nsect = scmd->request_bufflen / ATA_SECT_SIZE; 2663 qc->nbytes = scmd->request_bufflen;
2664 2664
2665 /* request result TF */ 2665 /* request result TF */
2666 qc->flags |= ATA_QCFLAG_RESULT_TF; 2666 qc->flags |= ATA_QCFLAG_RESULT_TF;