aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-10-09 09:47:31 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-09 09:47:31 -0400
commit083958d313f886dc7d00522f2972f90f55c40041 (patch)
tree1cc709fc4a4c2441cff1ce29b13a4d5e57a238dc
parent7282aa4b49d08254ff1dcefdf3a2fb01b02ebbe2 (diff)
[libata irq-pio] reorganize "buf + offset" in ata_pio_sector()
and __atapi_pio_bytes() - relocate DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); - buf + offset, buf - offset tidy up Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
-rw-r--r--drivers/scsi/libata-core.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index f89312654791..35ee35e176c0 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2760,15 +2760,15 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
2760 page = nth_page(page, (offset >> PAGE_SHIFT)); 2760 page = nth_page(page, (offset >> PAGE_SHIFT));
2761 offset %= PAGE_SIZE; 2761 offset %= PAGE_SIZE;
2762 2762
2763 local_irq_save(flags);
2764 buf = kmap_atomic(page, KM_IRQ0) + offset;
2765
2766 DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); 2763 DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");
2767 2764
2765 local_irq_save(flags);
2766 buf = kmap_atomic(page, KM_IRQ0);
2767
2768 /* do the actual data transfer */ 2768 /* do the actual data transfer */
2769 ata_data_xfer(ap, buf, ATA_SECT_SIZE, do_write); 2769 ata_data_xfer(ap, buf + offset, ATA_SECT_SIZE, do_write);
2770 2770
2771 kunmap_atomic(buf - offset, KM_IRQ0); 2771 kunmap_atomic(buf, KM_IRQ0);
2772 local_irq_restore(flags); 2772 local_irq_restore(flags);
2773 2773
2774 qc->cursect++; 2774 qc->cursect++;
@@ -2952,15 +2952,15 @@ next_sg:
2952 /* don't cross page boundaries */ 2952 /* don't cross page boundaries */
2953 count = min(count, (unsigned int)PAGE_SIZE - offset); 2953 count = min(count, (unsigned int)PAGE_SIZE - offset);
2954 2954
2955 local_irq_save(flags);
2956 buf = kmap_atomic(page, KM_IRQ0) + offset;
2957
2958 DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); 2955 DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");
2959 2956
2957 local_irq_save(flags);
2958 buf = kmap_atomic(page, KM_IRQ0);
2959
2960 /* do the actual data transfer */ 2960 /* do the actual data transfer */
2961 ata_data_xfer(ap, buf, count, do_write); 2961 ata_data_xfer(ap, buf + offset, count, do_write);
2962 2962
2963 kunmap_atomic(buf - offset, KM_IRQ0); 2963 kunmap_atomic(buf, KM_IRQ0);
2964 local_irq_restore(flags); 2964 local_irq_restore(flags);
2965 2965
2966 bytes -= count; 2966 bytes -= count;