aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-07-14 16:23:59 +0200
committerKevin O'Connor <kevin@koconnor.net>2011-07-24 23:28:57 -0400
commita8c6a4e820d214e03ab591b11f0fdf5803718378 (patch)
tree2bef8538a6dfd9e143b46ba7835945f8f2529906
parent7fc039e9c262b4199fab497f3e12f4e425c37560 (diff)
downloadseabios-a8c6a4e820d214e03ab591b11f0fdf5803718378.tar.gz
ahci/sata: Fix FIS setup.
FIS setup does't follow the SATA specs, fix it. Credits go to Jonathan Kollasch and Scott Duplichan for finding those. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--src/ahci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ahci.c b/src/ahci.c
index fb4b70c..058416c 100644
--- a/src/ahci.c
+++ b/src/ahci.c
@@ -125,12 +125,11 @@ static int ahci_command(struct ahci_port_s *port, int iswrite, int isatapi,
return -1;
flags = ((1 << 16) | /* one prd entry */
- (1 << 10) | /* clear busy on ok */
(iswrite ? (1 << 6) : 0) |
(isatapi ? (1 << 5) : 0) |
- (4 << 0)); /* fis length (dwords) */
- SET_FLATPTR(list[0].flags, flags);
- SET_FLATPTR(list[0].bytes, bsize);
+ (5 << 0)); /* fis length (dwords) */
+ SET_FLATPTR(list[0].flags, flags);
+ SET_FLATPTR(list[0].bytes, 0);
SET_FLATPTR(list[0].base, ((u32)(cmd)));
SET_FLATPTR(list[0].baseu, 0);