Module Name: src
Committed By: matt
Date: Mon May 7 23:04:22 UTC 2012
Modified Files:
src/sys/arch/powerpc/booke/dev: pq3etsec.c
src/sys/arch/powerpc/include/booke: etsecreg.h
Log Message:
Preserve some MACCFG2 bits
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/booke/etsecreg.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/arch/powerpc/booke/dev/pq3etsec.c
diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.12 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.13
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.12 Fri Apr 20 13:51:48 2012
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Mon May 7 23:04:22 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pq3etsec.c,v 1.12 2012/04/20 13:51:48 matt Exp $ */
+/* $NetBSD: pq3etsec.c,v 1.13 2012/05/07 23:04:22 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.12 2012/04/20 13:51:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.13 2012/05/07 23:04:22 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -503,7 +503,7 @@ pq3etsec_attach(device_t parent, device_
sc->sc_rctrl = RCTRL_DEFAULT;
sc->sc_ecntrl = etsec_read(sc, ECNTRL);
sc->sc_maccfg1 = etsec_read(sc, MACCFG1);
- sc->sc_maccfg2 = MACCFG2_DEFAULT;
+ sc->sc_maccfg2 = etsec_read(sc, MACCFG2) | MACCFG2_DEFAULT;
if (sc->sc_macstnaddr1 == 0 && sc->sc_macstnaddr2 == 0) {
size_t len;
Index: src/sys/arch/powerpc/include/booke/etsecreg.h
diff -u src/sys/arch/powerpc/include/booke/etsecreg.h:1.3 src/sys/arch/powerpc/include/booke/etsecreg.h:1.4
--- src/sys/arch/powerpc/include/booke/etsecreg.h:1.3 Thu Jun 9 19:11:06 2011
+++ src/sys/arch/powerpc/include/booke/etsecreg.h Mon May 7 23:04:22 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: etsecreg.h,v 1.3 2011/06/09 19:11:06 matt Exp $ */
+/* $NetBSD: etsecreg.h,v 1.4 2012/05/07 23:04:22 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -371,7 +371,7 @@ struct rxfcb {
#define MACCFG2_PADCRC __PPCBIT(29)
#define MACCFG2_CRCEN __PPCBIT(30)
#define MACCFG2_FD __PPCBIT(31)
-#define MACCFG2_DEFAULT (MACCFG2_FD|MACCFG2_PADCRC|MACCFG2_IFMODE_GMII|MACCFG2_PRELEN_DEFAULT)
+#define MACCFG2_DEFAULT (MACCFG2_FD|MACCFG2_PADCRC|MACCFG2_PRELEN_DEFAULT)
#define IPGIFG 0x508 /* Inter-packet/inter-frame gap register */
#define HAFDUP 0x50C /* Half-duplex control */
#define MAXFRM 0x510 /* Maximum frame length */