> 15_ide_flagged_taskfile_data_byte_order_fix.patch
> 
>       In flagged_taskfile(), when writing data register,
>       taskfile->data goes to the lower byte and hobfile->data goes
>       to the upper byte on little endian machines and the opposite
>       happens on big endian machines.  This patch make
>       taskfile->data always go to the lower byte regardless of
>       endianess.


Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>


Index: linux-ide-export/drivers/ide/ide-taskfile.c
===================================================================
--- linux-ide-export.orig/drivers/ide/ide-taskfile.c    2005-02-02 
10:28:03.518474705 +0900
+++ linux-ide-export/drivers/ide/ide-taskfile.c 2005-02-02 10:28:05.093219204 
+0900
@@ -823,7 +823,9 @@ ide_startstop_t flagged_taskfile (ide_dr
 
        if (task->tf_out_flags.b.data) {
                u16 data =  taskfile->data + (hobfile->data << 8);
-               hwif->OUTW(data, IDE_DATA_REG);
+               /* We want hobfile->data to go to the upper address,
+                  so the cpu_to_le16(). - tj */
+               hwif->OUTW(cpu_to_le16(data), IDE_DATA_REG);
        }
 
        /* (ks) send hob registers first */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to