]> git.karo-electronics.de Git - karo-tx-linux.git/commit
libahci: fix result_tf handling after an ATA PIO data-in command
authorTejun Heo <tj@kernel.org>
Fri, 15 Oct 2010 09:00:08 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 19:03:02 +0000 (11:03 -0800)
commit63b62824427fc946b1908687d2a5bc086fd6726a
tree774a03c0d1036a2ff9f3f537866cb2cff46c7efc
parent30d01aacb2ced4a54be35d650c73f2cf5ac235fa
libahci: fix result_tf handling after an ATA PIO data-in command

commit 6ad601955315b010a117306b994f2204fae85fdc upstream.

ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
command.  The host is supposed to take the TF and E_Status of the
preceding PIO Setup FIS.  Update ahci_qc_fill_rtf() such that it takes
TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
command.

Without this patch, result_tf for such a command is filled with the
content of the previous D2H Reg FIS which belongs to a previous
command, which can make the command incorrectly seen as failed.

* Patch updated to grab the whole TF + E_Status from PIO Setup FIS
  instead of just E_Status as suggested by Robert Hancock.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mark Lord <kernel@teksavvy.com>
Cc: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/ahci.h
drivers/ata/libahci.c