summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pdc202xx_old.c
diff options
context:
space:
mode:
authorTejun Heo2007-01-03 09:30:39 +0100
committerJeff Garzik2007-02-09 23:39:31 +0100
commit726f0785b608d09bdd64bdbadc09217ebbf9920e (patch)
treecefc97e9d5fefb2735b1b7a5ca22d3b3cc742b13 /drivers/ata/pata_pdc202xx_old.c
parent[libata] sata_vsc: build fix after PCI MSI feature addition (diff)
downloadkernel-qcow2-linux-726f0785b608d09bdd64bdbadc09217ebbf9920e.tar.gz
kernel-qcow2-linux-726f0785b608d09bdd64bdbadc09217ebbf9920e.tar.xz
kernel-qcow2-linux-726f0785b608d09bdd64bdbadc09217ebbf9920e.zip
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/pata_pdc202xx_old.c')
-rw-r--r--drivers/ata/pata_pdc202xx_old.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index ad691b9e7743..ba982ba68ad5 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -189,10 +189,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
/* Cases the state machine will not complete correctly without help */
if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA)
{
- if (tf->flags & ATA_TFLAG_LBA48)
- len = qc->nsect * 512;
- else
- len = qc->nbytes;
+ len = qc->nbytes;
if (tf->flags & ATA_TFLAG_WRITE)
len |= 0x06000000;