Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11799
b: refs/heads/master
c: 17fd47a
h: refs/heads/master
i:
  11797: b4cb6f1
  11795: 988883c
  11791: 555b1bc
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 31, 2005
1 parent aa86fbd commit fb2f6fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1fc78a8c7f3a784b9fd1e07cc1438a0ea569555
refs/heads/master: 17fd47ab4d33e764216b87006d8118fa050b4c92
38 changes: 12 additions & 26 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,12 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne
return;
}
count = min(pc->sg->length - pc->b_count, bcount);
if (PageHighMem(pc->sg->page)) {
unsigned long flags;

local_irq_save(flags);
buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offset;
drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count);
kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
local_irq_restore(flags);
} else {
buf = page_address(pc->sg->page) + pc->sg->offset;
drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count);
}
bcount -= count; pc->b_count += count;
buf = kmap_atomic(pc->sg->page, KM_IRQ0);
drive->hwif->atapi_input_bytes(drive,
buf + pc->b_count + pc->sg->offset, count);
kunmap_atomic(buf, KM_IRQ0);
bcount -= count;
pc->b_count += count;
if (pc->b_count == pc->sg->length) {
pc->sg++;
pc->b_count = 0;
Expand All @@ -212,19 +205,12 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
return;
}
count = min(pc->sg->length - pc->b_count, bcount);
if (PageHighMem(pc->sg->page)) {
unsigned long flags;

local_irq_save(flags);
buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offset;
drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
local_irq_restore(flags);
} else {
buf = page_address(pc->sg->page) + pc->sg->offset;
drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
}
bcount -= count; pc->b_count += count;
buf = kmap_atomic(pc->sg->page, KM_IRQ0);
drive->hwif->atapi_output_bytes(drive,
buf + pc->b_count + pc->sg->offset, count);
kunmap_atomic(buf, KM_IRQ0);
bcount -= count;
pc->b_count += count;
if (pc->b_count == pc->sg->length) {
pc->sg++;
pc->b_count = 0;
Expand Down

0 comments on commit fb2f6fe

Please sign in to comment.