ahci/sata: Fix FIS setup.
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 14 Jul 2011 14:23:59 +0000 (16:23 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 25 Jul 2011 03:28:57 +0000 (23:28 -0400)
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>
src/ahci.c

index fb4b70c3767033eccb58cfb4752b9bb72b1d2077..058416cba974741978da94fce9bbf94a5c25d1df 100644 (file)
@@ -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);