Preserve some MACCFG2 bits

This commit is contained in:
matt 2012-05-07 23:04:22 +00:00
parent 12bb5f8f0a
commit 12ca21c5bb
2 changed files with 5 additions and 5 deletions

View File

@ -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_t self, void *aux)
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;

View File

@ -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 */