lkml.org 
[lkml]   [2005]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2.6.11-rc2 15/29] ide: flagged_taskfile() data byte order fix
> 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 <tj@home-tj.org>


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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.305 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site