Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Enable writing to the EPROM before trying to chan...



details:   https://anonhg.NetBSD.org/src/rev/be436611a0ba
branches:  trunk
changeset: 345602:be436611a0ba
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Jun 01 12:40:03 2016 +0000

description:
Enable writing to the EPROM before trying to change our MAC address.

>From PR kern/44433

diffstat:

 sys/dev/ic/rtl81x9.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r f076db260710 -r be436611a0ba sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Wed Jun 01 12:14:08 2016 +0000
+++ b/sys/dev/ic/rtl81x9.c      Wed Jun 01 12:40:03 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.97 2016/02/09 08:32:10 ozaki-r Exp $     */
+/*     $NetBSD: rtl81x9.c,v 1.98 2016/06/01 12:40:03 pgoyette Exp $    */
 
 /*
  * Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.97 2016/02/09 08:32:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.98 2016/06/01 12:40:03 pgoyette Exp $");
 
 
 #include <sys/param.h>
@@ -1339,9 +1339,11 @@
        rtk_stop(ifp, 0);
 
        /* Init our MAC address */
+       CSR_WRITE_1(sc, RTK_EECMD, RTK_EEMODE_WRITECFG);
        for (i = 0; i < ETHER_ADDR_LEN; i++) {
                CSR_WRITE_1(sc, RTK_IDR0 + i, CLLADDR(ifp->if_sadl)[i]);
        }
+       CSR_WRITE_1(sc, RTK_EECMD, RTK_EEMODE_OFF);
 
        /* Init the RX buffer pointer register. */
        bus_dmamap_sync(sc->sc_dmat, sc->recv_dmamap, 0,



Home | Main Index | Thread Index | Old Index