Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137648
b: refs/heads/master
c: e3d9a73
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent f43a73c commit 697b641
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 22 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: 5e76acd588c125fbd37390e44868dcb07cadbe4a
refs/heads/master: e3d9a73a83d98fc466dabdcfe4f4e7e4419e3f8e
3 changes: 0 additions & 3 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
task.tf_flags |= IDE_TFLAG_WRITE;

ide_tf_set_cmd(drive, &task, dma);
if (!dma)
hwif->data_phase = task.data_phase;
task.rq = rq;

rc = do_rw_taskfile(drive, &task);
Expand All @@ -170,7 +168,6 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
/* fallback to PIO */
task.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK;
ide_tf_set_cmd(drive, &task, 0);
hwif->data_phase = task.data_phase;
ide_init_sg_cmd(drive, rq);
rc = do_rw_taskfile(drive, &task);
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,10 @@ EXPORT_SYMBOL_GPL(ide_init_sg_cmd);
static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
struct request *rq)
{
ide_hwif_t *hwif = drive->hwif;
ide_task_t *task = rq->special;

if (task) {
hwif->data_phase = task->data_phase;

switch (hwif->data_phase) {
switch (task->data_phase) {
case TASKFILE_MULTI_OUT:
case TASKFILE_OUT:
case TASKFILE_MULTI_IN:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-park.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)

task.tf_flags |= IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
task.rq = rq;
drive->hwif->data_phase = task.data_phase = TASKFILE_NO_DATA;
task.data_phase = TASKFILE_NO_DATA;
return do_rw_taskfile(drive, &task);
}

Expand Down
18 changes: 8 additions & 10 deletions trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,18 @@ static void ide_pio_multi(ide_drive_t *drive, struct request *rq,
static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
unsigned int write)
{
ide_task_t *task = &drive->hwif->task;
u8 saved_io_32bit = drive->io_32bit;

if (rq->bio) /* fs request */
rq->errors = 0;

if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
ide_task_t *task = rq->special;

if (task->tf_flags & IDE_TFLAG_IO_16BIT)
drive->io_32bit = 0;
}
if (task->tf_flags & IDE_TFLAG_IO_16BIT)
drive->io_32bit = 0;

touch_softlockup_watchdog();

switch (drive->hwif->data_phase) {
switch (task->data_phase) {
case TASKFILE_MULTI_IN:
case TASKFILE_MULTI_OUT:
ide_pio_multi(drive, rq, write);
Expand All @@ -297,9 +294,10 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
{
if (rq->bio) {
ide_hwif_t *hwif = drive->hwif;
ide_task_t *task = &hwif->task;
int sectors = hwif->nsect - hwif->nleft;

switch (hwif->data_phase) {
switch (task->data_phase) {
case TASKFILE_IN:
if (hwif->nleft)
break;
Expand Down Expand Up @@ -431,14 +429,14 @@ static ide_startstop_t task_out_intr (ide_drive_t *drive)

static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq)
{
ide_hwif_t *hwif = drive->hwif;
ide_task_t *task = &drive->hwif->task;
ide_startstop_t startstop;

if (ide_wait_stat(&startstop, drive, ATA_DRQ,
drive->bad_wstat, WAIT_DRQ)) {
printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n",
drive->name,
hwif->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "",
task->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "",
(drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : "");
return startstop;
}
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,6 @@ typedef struct hwif_s {
int orig_sg_nents;
int sg_dma_direction; /* dma transfer direction */

/* data phase of the active command (currently only valid for PIO/DMA) */
int data_phase;

struct ide_task_s task; /* current command */

unsigned int nsect;
Expand Down

0 comments on commit 697b641

Please sign in to comment.