aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 252d1806467f..8d0244c2e7d4 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -175,18 +175,18 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne
175 175
176 while (bcount) { 176 while (bcount) {
177 count = min(pc->sg->length - pc->b_count, bcount); 177 count = min(pc->sg->length - pc->b_count, bcount);
178 if (PageHighMem(pc->sg->page)) { 178 if (PageHighMem(sg_page(pc->sg))) {
179 unsigned long flags; 179 unsigned long flags;
180 180
181 local_irq_save(flags); 181 local_irq_save(flags);
182 buf = kmap_atomic(pc->sg->page, KM_IRQ0) + 182 buf = kmap_atomic(sg_page(pc->sg), KM_IRQ0) +
183 pc->sg->offset; 183 pc->sg->offset;
184 drive->hwif->atapi_input_bytes(drive, 184 drive->hwif->atapi_input_bytes(drive,
185 buf + pc->b_count, count); 185 buf + pc->b_count, count);
186 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0); 186 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
187 local_irq_restore(flags); 187 local_irq_restore(flags);
188 } else { 188 } else {
189 buf = page_address(pc->sg->page) + pc->sg->offset; 189 buf = sg_virt(pc->sg);
190 drive->hwif->atapi_input_bytes(drive, 190 drive->hwif->atapi_input_bytes(drive,
191 buf + pc->b_count, count); 191 buf + pc->b_count, count);
192 } 192 }
@@ -212,18 +212,18 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
212 212
213 while (bcount) { 213 while (bcount) {
214 count = min(pc->sg->length - pc->b_count, bcount); 214 count = min(pc->sg->length - pc->b_count, bcount);
215 if (PageHighMem(pc->sg->page)) { 215 if (PageHighMem(sg_page(pc->sg))) {
216 unsigned long flags; 216 unsigned long flags;
217 217
218 local_irq_save(flags); 218 local_irq_save(flags);
219 buf = kmap_atomic(pc->sg->page, KM_IRQ0) + 219 buf = kmap_atomic(sg_page(pc->sg), KM_IRQ0) +
220 pc->sg->offset; 220 pc->sg->offset;
221 drive->hwif->atapi_output_bytes(drive, 221 drive->hwif->atapi_output_bytes(drive,
222 buf + pc->b_count, count); 222 buf + pc->b_count, count);
223 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0); 223 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
224 local_irq_restore(flags); 224 local_irq_restore(flags);
225 } else { 225 } else {
226 buf = page_address(pc->sg->page) + pc->sg->offset; 226 buf = sg_virt(pc->sg);
227 drive->hwif->atapi_output_bytes(drive, 227 drive->hwif->atapi_output_bytes(drive,
228 buf + pc->b_count, count); 228 buf + pc->b_count, count);
229 } 229 }