aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index e4c400756b23..a0060cf31e0d 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2456,7 +2456,7 @@ static void ata_sg_clean(struct ata_queued_cmd *qc)
2456 struct scatterlist *psg = &qc->pad_sgent; 2456 struct scatterlist *psg = &qc->pad_sgent;
2457 void *addr = kmap_atomic(psg->page, KM_IRQ0); 2457 void *addr = kmap_atomic(psg->page, KM_IRQ0);
2458 memcpy(addr + psg->offset, pad_buf, qc->pad_len); 2458 memcpy(addr + psg->offset, pad_buf, qc->pad_len);
2459 kunmap_atomic(psg->page, KM_IRQ0); 2459 kunmap_atomic(addr, KM_IRQ0);
2460 } 2460 }
2461 } else { 2461 } else {
2462 if (sg_dma_len(&sg[0]) > 0) 2462 if (sg_dma_len(&sg[0]) > 0)
@@ -2730,7 +2730,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
2730 if (qc->tf.flags & ATA_TFLAG_WRITE) { 2730 if (qc->tf.flags & ATA_TFLAG_WRITE) {
2731 void *addr = kmap_atomic(psg->page, KM_IRQ0); 2731 void *addr = kmap_atomic(psg->page, KM_IRQ0);
2732 memcpy(pad_buf, addr + psg->offset, qc->pad_len); 2732 memcpy(pad_buf, addr + psg->offset, qc->pad_len);
2733 kunmap_atomic(psg->page, KM_IRQ0); 2733 kunmap_atomic(addr, KM_IRQ0);
2734 } 2734 }
2735 2735
2736 sg_dma_address(psg) = ap->pad_dma + (qc->tag * ATA_DMA_PAD_SZ); 2736 sg_dma_address(psg) = ap->pad_dma + (qc->tag * ATA_DMA_PAD_SZ);