NetBSD-Bugs archive

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

kern/44433: rtk cannot program a new MAC address



>Number:         44433
>Category:       kern
>Synopsis:       rtk cannot program a new MAC address
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 21 19:00:00 +0000 2011
>Originator:     thierry herbelot
>Release:        NetBSD-5.1
>Organization:
>Environment:
>Description:
the rtk driver is missing a command enabling actual writes to the configuration 
register when writing a new MAC address

(see comments in rl driver of FreeBSD)
also this commit :
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/pci/if_rl.c#rev1.101
>How-To-Repeat:

>Fix:
the following change corrects the problem :
~/Documents/LACP/NetBSD-5.1-usr/src$ git diff
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index a05d444..5d88df9 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1368,10 +1368,12 @@ rtk_init(struct ifnet *ifp)
          */
         rtk_stop(ifp, 0);

+       CSR_WRITE_1(sc, RTK_EECMD, RTK_EEMODE_WRITECFG);
         /* Init our MAC address */
         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