Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112872
b: refs/heads/master
c: efa402d
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent e6b7720 commit 0880261
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 1a7809e3499921a016d203b9ee51a77d3cc1dc98
refs/heads/master: efa402d59e99b7940501ead18a11b3d6604ad720
14 changes: 5 additions & 9 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,13 +1164,12 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
if (rq->bio || ((rq->cmd_type == REQ_TYPE_ATA_PC) && rq->data_len)) {
struct request_queue *q = drive->queue;
unsigned int alignment;
unsigned long addr;
unsigned long stack_mask = ~(THREAD_SIZE - 1);
char *buf;

if (rq->bio)
addr = (unsigned long)bio_data(rq->bio);
buf = bio_data(rq->bio);
else
addr = (unsigned long)rq->data;
buf = rq->data;

info->dma = drive->using_dma;

Expand All @@ -1181,11 +1180,8 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
* separate masks.
*/
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
if (addr & alignment || rq->data_len & alignment)
info->dma = 0;

if (!((addr & stack_mask) ^
((unsigned long)current->stack & stack_mask)))
if ((unsigned long)buf & alignment || rq->data_len & alignment
|| object_is_on_stack(buf))
info->dma = 0;
}
}
Expand Down

0 comments on commit 0880261

Please sign in to comment.