NetBSD Problem Report #44433

From www@NetBSD.org  Fri Jan 21 18:59:05 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 10F9063B883
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 21 Jan 2011 18:59:05 +0000 (UTC)
Message-Id: <20110121185904.592F663B873@www.NetBSD.org>
Date: Fri, 21 Jan 2011 18:59:04 +0000 (UTC)
From: thierry.herbelot@free.fr
Reply-To: thierry.herbelot@free.fr
To: gnats-bugs@NetBSD.org
Subject: rtk cannot program a new MAC address
X-Send-Pr-Version: www-1.0

>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
>Closed-Date:    
>Last-Modified:  Mon Jun 20 05:19:02 +0000 2016
>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,

>Release-Note:

>Audit-Trail:
From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44433 CVS commit: src/sys/dev/ic
Date: Wed, 1 Jun 2016 12:40:03 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Wed Jun  1 12:40:03 UTC 2016

 Modified Files:
 	src/sys/dev/ic: rtl81x9.c

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

 From PR kern/44433


 To generate a diff of this commit:
 cvs rdiff -u -r1.97 -r1.98 src/sys/dev/ic/rtl81x9.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Wed, 01 Jun 2016 12:56:26 +0000
Responsible-Changed-Why:
I picked it up


State-Changed-From-To: open->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Wed, 01 Jun 2016 12:56:26 +0000
State-Changed-Why:
Suggested fix was committed.


State-Changed-From-To: closed->open
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Wed, 08 Jun 2016 22:26:41 +0000
State-Changed-Why:
The fix is reverted since it breaks working system for at least one user.


From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44433 CVS commit: src/sys/dev/ic
Date: Wed, 8 Jun 2016 22:25:35 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Wed Jun  8 22:25:35 UTC 2016

 Modified Files:
 	src/sys/dev/ic: rtl81x9.c

 Log Message:
 Revert previous (rev. 1.98).  It breaks at least one user's card.

 PR kern/44433


 To generate a diff of this commit:
 cvs rdiff -u -r1.98 -r1.99 src/sys/dev/ic/rtl81x9.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pgoyette->kern-bug-people
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Mon, 20 Jun 2016 05:19:02 +0000
Responsible-Changed-Why:
I don't have any hardware with which to experiment.  The proposed fix
breaks the device for other users so it was reverted.  I don't have
any more ideas on how to proceed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.