aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ips.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
commit45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch)
tree3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/scsi/ips.c
parent78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff)
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r--drivers/scsi/ips.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index edaac2714c5a..5c5a9b2628fc 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -1515,7 +1515,7 @@ static int ips_is_passthru(struct scsi_cmnd *SC)
1515 /* kmap_atomic() ensures addressability of the user buffer.*/ 1515 /* kmap_atomic() ensures addressability of the user buffer.*/
1516 /* local_irq_save() protects the KM_IRQ0 address slot. */ 1516 /* local_irq_save() protects the KM_IRQ0 address slot. */
1517 local_irq_save(flags); 1517 local_irq_save(flags);
1518 buffer = kmap_atomic(sg->page, KM_IRQ0) + sg->offset; 1518 buffer = kmap_atomic(sg_page(sg), KM_IRQ0) + sg->offset;
1519 if (buffer && buffer[0] == 'C' && buffer[1] == 'O' && 1519 if (buffer && buffer[0] == 'C' && buffer[1] == 'O' &&
1520 buffer[2] == 'P' && buffer[3] == 'P') { 1520 buffer[2] == 'P' && buffer[3] == 'P') {
1521 kunmap_atomic(buffer - sg->offset, KM_IRQ0); 1521 kunmap_atomic(buffer - sg->offset, KM_IRQ0);
@@ -3523,7 +3523,7 @@ ips_scmd_buf_write(struct scsi_cmnd *scmd, void *data, unsigned int count)
3523 /* kmap_atomic() ensures addressability of the data buffer.*/ 3523 /* kmap_atomic() ensures addressability of the data buffer.*/
3524 /* local_irq_save() protects the KM_IRQ0 address slot. */ 3524 /* local_irq_save() protects the KM_IRQ0 address slot. */
3525 local_irq_save(flags); 3525 local_irq_save(flags);
3526 buffer = kmap_atomic(sg[i].page, KM_IRQ0) + sg[i].offset; 3526 buffer = kmap_atomic(sg_page(&sg[i]), KM_IRQ0) + sg[i].offset;
3527 memcpy(buffer, &cdata[xfer_cnt], min_cnt); 3527 memcpy(buffer, &cdata[xfer_cnt], min_cnt);
3528 kunmap_atomic(buffer - sg[i].offset, KM_IRQ0); 3528 kunmap_atomic(buffer - sg[i].offset, KM_IRQ0);
3529 local_irq_restore(flags); 3529 local_irq_restore(flags);
@@ -3556,7 +3556,7 @@ ips_scmd_buf_read(struct scsi_cmnd *scmd, void *data, unsigned int count)
3556 /* kmap_atomic() ensures addressability of the data buffer.*/ 3556 /* kmap_atomic() ensures addressability of the data buffer.*/
3557 /* local_irq_save() protects the KM_IRQ0 address slot. */ 3557 /* local_irq_save() protects the KM_IRQ0 address slot. */
3558 local_irq_save(flags); 3558 local_irq_save(flags);
3559 buffer = kmap_atomic(sg[i].page, KM_IRQ0) + sg[i].offset; 3559 buffer = kmap_atomic(sg_page(&sg[i]), KM_IRQ0) + sg[i].offset;
3560 memcpy(&cdata[xfer_cnt], buffer, min_cnt); 3560 memcpy(&cdata[xfer_cnt], buffer, min_cnt);
3561 kunmap_atomic(buffer - sg[i].offset, KM_IRQ0); 3561 kunmap_atomic(buffer - sg[i].offset, KM_IRQ0);
3562 local_irq_restore(flags); 3562 local_irq_restore(flags);