Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137666
b: refs/heads/master
c: 04d09b0
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent 61f460e commit 8e5861b
Show file tree
Hide file tree
Showing 2 changed files with 10 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: b6308ee0c55acd2e943d849773c9f0a49c516317
refs/heads/master: 04d09b0e62f2180a7e3fa8578ed778eca0c454fd
13 changes: 9 additions & 4 deletions trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,14 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
if (req_task->in_flags.b.data)
cmd.ftf_flags |= IDE_FTFLAG_IN_DATA;

switch(req_task->data_phase) {
if (req_task->req_cmd == IDE_DRIVE_TASK_RAW_WRITE) {
/* fixup data phase if needed */
if (req_task->data_phase == TASKFILE_IN_DMAQ ||
req_task->data_phase == TASKFILE_IN_DMA)
cmd.data_phase = TASKFILE_OUT_DMA;
}

switch (cmd.data_phase) {
case TASKFILE_MULTI_OUT:
if (!drive->mult_count) {
/* (hs): give up if multcount is not set */
Expand All @@ -601,6 +608,7 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
/* fall through */
case TASKFILE_OUT_DMAQ:
case TASKFILE_OUT_DMA:
cmd.tf_flags |= IDE_TFLAG_WRITE;
nsect = taskout / SECTOR_SIZE;
data_buf = outbuf;
break;
Expand Down Expand Up @@ -641,9 +649,6 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
}
}

if (req_task->req_cmd == IDE_DRIVE_TASK_RAW_WRITE)
cmd.tf_flags |= IDE_TFLAG_WRITE;

err = ide_raw_taskfile(drive, &cmd, data_buf, nsect);

memcpy(req_task->hob_ports, &cmd.tf_array[0],
Expand Down

0 comments on commit 8e5861b

Please sign in to comment.