Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1408
b: refs/heads/master
c: 41bb4c4
h: refs/heads/master
v: v3
  • Loading branch information
Stuart Hayes authored and Bartlomiej Zolnierkiewicz committed May 26, 2005
1 parent 93b468b commit 4579eb5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 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: 8604affde9d4f52f04342d6a37c77d95fa167e7a
refs/heads/master: 41bb4c43b34bcde7eb62cf19acdcf9f2eb13801d
28 changes: 24 additions & 4 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,18 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne
return;
}
count = min(pc->sg->length - pc->b_count, bcount);
buf = page_address(pc->sg->page) + pc->sg->offset;
drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count);
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;
if (pc->b_count == pc->sg->length) {
pc->sg++;
Expand All @@ -201,8 +211,18 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
return;
}
count = min(pc->sg->length - pc->b_count, bcount);
buf = page_address(pc->sg->page) + pc->sg->offset;
drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
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;
if (pc->b_count == pc->sg->length) {
pc->sg++;
Expand Down

0 comments on commit 4579eb5

Please sign in to comment.