Module Name:    src
Committed By:   riz
Date:           Thu May 17 18:09:45 UTC 2012

Modified Files:
        src/sys/arch/powerpc/booke/dev [netbsd-6]: pq3etsec.c
        src/sys/arch/powerpc/include/booke [netbsd-6]: etsecreg.h

Log Message:
Pull up following revision(s) (requested by matt in ticket #245):
        sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.13
        sys/arch/powerpc/include/booke/etsecreg.h: revision 1.4
        sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.11
        sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.12
Read maccfg1/maccfg2/ecntrl so we can preserve bits we don't change (like
GMII mode).
Don't use the current value of maccfg2.
Preserve some MACCFG2 bits


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.8.1 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.3 -r1.3.8.1 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.9 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.9.8.1
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.9	Thu Oct 13 19:53:30 2011
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c	Thu May 17 18:09:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3etsec.c,v 1.9 2011/10/13 19:53:30 matt Exp $	*/
+/*	$NetBSD: pq3etsec.c,v 1.9.8.1 2012/05/17 18:09:44 riz 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.9 2011/10/13 19:53:30 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.9.8.1 2012/05/17 18:09:44 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -501,7 +501,9 @@ pq3etsec_attach(device_t parent, device_
 	sc->sc_macstnaddr2 = etsec_read(sc, MACSTNADDR2);
 	sc->sc_macstnaddr1 = etsec_read(sc, MACSTNADDR1);
 	sc->sc_rctrl = RCTRL_DEFAULT;
-	sc->sc_maccfg2 = MACCFG2_DEFAULT;
+	sc->sc_ecntrl = etsec_read(sc, ECNTRL);
+	sc->sc_maccfg1 = etsec_read(sc, MACCFG1);
+	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.3.8.1
--- 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	Thu May 17 18:09:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: etsecreg.h,v 1.3 2011/06/09 19:11:06 matt Exp $	*/
+/*	$NetBSD: etsecreg.h,v 1.3.8.1 2012/05/17 18:09:44 riz 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 */

Reply via email to