diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
commit | 45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch) | |
tree | 3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/scsi/gdth.c | |
parent | 78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff) |
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/gdth.c')
-rw-r--r-- | drivers/scsi/gdth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 3ac080ee6e2f..5ab3ce762485 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -2374,18 +2374,18 @@ static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, | |||
2374 | if (cpsum+cpnow > cpcount) | 2374 | if (cpsum+cpnow > cpcount) |
2375 | cpnow = cpcount - cpsum; | 2375 | cpnow = cpcount - cpsum; |
2376 | cpsum += cpnow; | 2376 | cpsum += cpnow; |
2377 | if (!sl->page) { | 2377 | if (!sg_page(sl)) { |
2378 | printk("GDT-HA %d: invalid sc/gt element in gdth_copy_internal_data()\n", | 2378 | printk("GDT-HA %d: invalid sc/gt element in gdth_copy_internal_data()\n", |
2379 | ha->hanum); | 2379 | ha->hanum); |
2380 | return; | 2380 | return; |
2381 | } | 2381 | } |
2382 | local_irq_save(flags); | 2382 | local_irq_save(flags); |
2383 | address = kmap_atomic(sl->page, KM_BIO_SRC_IRQ) + sl->offset; | 2383 | address = kmap_atomic(sg_page(sl), KM_BIO_SRC_IRQ) + sl->offset; |
2384 | if (to_buffer) | 2384 | if (to_buffer) |
2385 | memcpy(buffer, address, cpnow); | 2385 | memcpy(buffer, address, cpnow); |
2386 | else | 2386 | else |
2387 | memcpy(address, buffer, cpnow); | 2387 | memcpy(address, buffer, cpnow); |
2388 | flush_dcache_page(sl->page); | 2388 | flush_dcache_page(sg_page(sl)); |
2389 | kunmap_atomic(address, KM_BIO_SRC_IRQ); | 2389 | kunmap_atomic(address, KM_BIO_SRC_IRQ); |
2390 | local_irq_restore(flags); | 2390 | local_irq_restore(flags); |
2391 | if (cpsum == cpcount) | 2391 | if (cpsum == cpcount) |