Skip to content

Commit

Permalink
libata,pata_via: revert ata_wait_idle() removal from ata_sff/via_tf_l…
Browse files Browse the repository at this point in the history
…oad()

Commit 978c066 (libata: Remove excess delay in the tf_load path)
removed ata_wait_idle() from ata_sff_tf_load() and via_tf_load().
This caused obscure detection problems in sata_sil.

  https://bugzilla.kernel.org/show_bug.cgi?id=16606

The commit was pure performance optimization.  Revert it for now.

Reported-by: Dieter Plaetinck <dieter@plaetinck.be>
Reported-by: Jan Beulich <JBeulich@novell.com>
Bisected-by: gianluca <gianluca@sottospazio.it>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Sep 10, 2010
1 parent f1f5a80 commit 40c6023
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
if (ioaddr->ctl_addr)
iowrite8(tf->ctl, ioaddr->ctl_addr);
ap->last_ctl = tf->ctl;
ata_wait_idle(ap);
}

if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
Expand Down Expand Up @@ -453,6 +454,8 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
iowrite8(tf->device, ioaddr->device_addr);
VPRINTK("device 0x%X\n", tf->device);
}

ata_wait_idle(ap);
}
EXPORT_SYMBOL_GPL(ata_sff_tf_load);

Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
tf->lbam,
tf->lbah);
}

ata_wait_idle(ap);
}

static int via_port_start(struct ata_port *ap)
Expand Down

0 comments on commit 40c6023

Please sign in to comment.