Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29329
b: refs/heads/master
c: 7282aa4
h: refs/heads/master
i:
  29327: 9cdeb45
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Oct 9, 2005
1 parent 525768f commit fa8dd80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f58f8be7f65312f602f7970e7da47a6413e692b0
refs/heads/master: 7282aa4b49d08254ff1dcefdf3a2fb01b02ebbe2
33 changes: 16 additions & 17 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2763,22 +2763,21 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
local_irq_save(flags);
buf = kmap_atomic(page, KM_IRQ0) + offset;

qc->cursect++;
qc->cursg_ofs++;

if ((qc->cursg_ofs * ATA_SECT_SIZE) == (&sg[qc->cursg])->length) {
qc->cursg++;
qc->cursg_ofs = 0;
}

DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");

/* do the actual data transfer */
do_write = (qc->tf.flags & ATA_TFLAG_WRITE);
ata_data_xfer(ap, buf, ATA_SECT_SIZE, do_write);

kunmap_atomic(buf - offset, KM_IRQ0);
local_irq_restore(flags);

qc->cursect++;
qc->cursg_ofs++;

if ((qc->cursg_ofs * ATA_SECT_SIZE) == (&sg[qc->cursg])->length) {
qc->cursg++;
qc->cursg_ofs = 0;
}
}

/**
Expand Down Expand Up @@ -2956,6 +2955,14 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
local_irq_save(flags);
buf = kmap_atomic(page, KM_IRQ0) + offset;

DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");

/* do the actual data transfer */
ata_data_xfer(ap, buf, count, do_write);

kunmap_atomic(buf - offset, KM_IRQ0);
local_irq_restore(flags);

bytes -= count;
qc->curbytes += count;
qc->cursg_ofs += count;
Expand All @@ -2965,14 +2972,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
qc->cursg_ofs = 0;
}

DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");

/* do the actual data transfer */
ata_data_xfer(ap, buf, count, do_write);

kunmap_atomic(buf - offset, KM_IRQ0);
local_irq_restore(flags);

if (bytes)
goto next_sg;
}
Expand Down

0 comments on commit fa8dd80

Please sign in to comment.