Module Name:    src
Committed By:   kiyohara
Date:           Tue Jun  8 05:15:52 UTC 2010

Modified Files:
        src/sys/dev/marvell: gtidmacreg.h

Log Message:
Support big endian machines.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/marvell/gtidmacreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/marvell/gtidmacreg.h
diff -u src/sys/dev/marvell/gtidmacreg.h:1.1 src/sys/dev/marvell/gtidmacreg.h:1.2
--- src/sys/dev/marvell/gtidmacreg.h:1.1	Wed Apr 28 13:51:56 2010
+++ src/sys/dev/marvell/gtidmacreg.h	Tue Jun  8 05:15:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmacreg.h,v 1.1 2010/04/28 13:51:56 kiyohara Exp $	*/
+/*	$NetBSD: gtidmacreg.h,v 1.2 2010/06/08 05:15:52 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -226,6 +226,7 @@
 
 
 struct gtidmac_desc {
+#if BYTE_ORDER == LITTLE_ENDIAN
 	union {
 		struct {
 			uint16_t rbc;	/* Remind BC */
@@ -238,6 +239,20 @@
 	uint32_t srcaddr;	/* Source Address */
 	uint32_t dstaddr;	/* Destination Address */
 	uint32_t nextdp;	/* Next Descriptor Pointer */
+#else
+	uint32_t srcaddr;	/* Source Address */
+	union {
+		struct {
+			uint16_t rbc;	/* Remind BC */
+			uint16_t bcnt;
+		} mode64k;
+		struct {
+			uint32_t bcnt;
+		} mode16m;
+	} bc;			/* Byte Count */
+	uint32_t nextdp;	/* Next Descriptor Pointer */
+	uint32_t dstaddr;	/* Destination Address */
+#endif
 } __packed;
 
 #define GTIDMAC_DESC_BYTECOUNT_MASK	0x00ffffff

Reply via email to