diff options
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r-- | drivers/scsi/ips.c | 6 |
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); |