diff options
author | Tejun Heo <tj@kernel.org> | 2010-10-15 05:00:08 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-10-21 21:17:00 -0400 |
commit | 6ad601955315b010a117306b994f2204fae85fdc (patch) | |
tree | d10eadcbb064c463a413823b9cccd018ae1a94e8 /drivers/ata/ahci.h | |
parent | f7a437dda2b5c104a897405cbff678aa1eb37897 (diff) |
libahci: fix result_tf handling after an ATA PIO data-in command
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>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/ahci.h')
-rw-r--r-- | drivers/ata/ahci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 1a2aacfdebc5..329cbbb91284 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
@@ -72,6 +72,7 @@ enum { | |||
72 | AHCI_CMD_RESET = (1 << 8), | 72 | AHCI_CMD_RESET = (1 << 8), |
73 | AHCI_CMD_CLR_BUSY = (1 << 10), | 73 | AHCI_CMD_CLR_BUSY = (1 << 10), |
74 | 74 | ||
75 | RX_FIS_PIO_SETUP = 0x20, /* offset of PIO Setup FIS data */ | ||
75 | RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */ | 76 | RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */ |
76 | RX_FIS_SDB = 0x58, /* offset of SDB FIS data */ | 77 | RX_FIS_SDB = 0x58, /* offset of SDB FIS data */ |
77 | RX_FIS_UNK = 0x60, /* offset of Unknown FIS data */ | 78 | RX_FIS_UNK = 0x60, /* offset of Unknown FIS data */ |