[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-vortex
Subject:    Re: 3c59x big endian patch
From:       Rob Hagopian <hagopiar () vuser ! vu ! union ! edu>
Date:       1998-11-04 19:24:38
[Download RAW message or body]

Attached is a patch to the 3c59x.c that fixes one endian problem and
allows the driver to work on my CHRP (PPC) box. While I'm not positive the
driver is otherwise endian clean, it works well for me.
								-Rob H.

On Sun, 20 Sep 1998, Rodolfo Delgado B. wrote:

> Date: Sun, 20 Sep 1998 02:45:24 -0400
> From: "Rodolfo Delgado B." <r.delgado@ieee.org>
> To: hagopiar@vuser.vu.union.edu
> Subject: 3c59x big endian patch
> 
> Rob:
> I guess I need to apply this patch to the driver but i hae failed to do
> it.
> Please could you let me know how could I do it with the source you sent
> to the vortex mailing list ?
> Thank you very much for your time.
> 
> Rodolfo Delgado
> 
> 
> 
> --
> IMail Server for Windows NT. Evaluation version.
> Copyright (c) 1995-98 Ipswitch, Inc. http://www.ipswitch.com/
> 



["3c59x.c.bigendianpatch" (TEXT/PLAIN)]

Index: 3c59x.c
===================================================================
RCS file: /cvsroot/linux/drivers/net/3c59x.c,v
retrieving revision 1.29
diff -u -r1.29 3c59x.c
--- 3c59x.c	1998/08/08 07:25:27	1.29
+++ 3c59x.c	1998/10/10 15:49:37
@@ -78,6 +78,8 @@
 #include <linux/bios32.h>
 #endif
 #include <linux/timer.h>
+
+#include <asm/byteorder.h>
 #include <asm/irq.h>			/* For NR_IRQS only. */
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -344,10 +346,20 @@
 union wn3_config {
 	int i;
 	struct w3_config_fields {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
 		unsigned int ram_size:3, ram_width:1, ram_speed:2, rom_size:2;
 		int pad8:8;
 		unsigned int ram_split:2, pad18:2, xcvr:4, autoselect:1;
 		int pad24:7;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+		unsigned int rom_size:2, ram_speed:2, ram_width:1, ram_size:3;
+		int pad8:8;
+		unsigned int xcvr:4, pad18:2, ram_split:2;
+		int pad24:7;
+		unsigned int autoselect:1;
+#else
+#error "Bitfield endianness not defined! Check your byteorder.h"
+#endif
 	} u;
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic