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/sata_qstor.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/sata_qstor.c')
-rw-r--r-- | drivers/ata/sata_qstor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 710909df4eaf..0292a79f9747 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
@@ -325,7 +325,7 @@ static void qs_qc_prep(struct ata_queued_cmd *qc) | |||
325 | /* host control block (HCB) */ | 325 | /* host control block (HCB) */ |
326 | buf[ 0] = QS_HCB_HDR; | 326 | buf[ 0] = QS_HCB_HDR; |
327 | buf[ 1] = hflags; | 327 | buf[ 1] = hflags; |
328 | *(__le32 *)(&buf[ 4]) = cpu_to_le32(qc->nsect * ATA_SECT_SIZE); | 328 | *(__le32 *)(&buf[ 4]) = cpu_to_le32(qc->nbytes); |
329 | *(__le32 *)(&buf[ 8]) = cpu_to_le32(nelem); | 329 | *(__le32 *)(&buf[ 8]) = cpu_to_le32(nelem); |
330 | addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES; | 330 | addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES; |
331 | *(__le64 *)(&buf[16]) = cpu_to_le64(addr); | 331 | *(__le64 *)(&buf[16]) = cpu_to_le64(addr); |