NetBSD Problem Report #30193

From www@netbsd.org  Wed May 11 08:57:27 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 89E8763B104; Wed, 11 May 2005 08:57:27 +0000 (UTC)
Message-Id: <20050511085727.89E8763B104@narn.netbsd.org>
Date: Wed, 11 May 2005 08:57:27 +0000 (UTC)
From: umezawa@iij.ad.jp
Reply-To: umezawa@iij.ad.jp
To: gnats-bugs@netbsd.org
Subject: Activity LED on wm(4) does not blink.
X-Send-Pr-Version: www-1.0

>Number:         30193
>Category:       kern
>Synopsis:       Activity LED on wm(4) does not blink.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 11 08:58:00 +0000 2005
>Originator:     UMEZAWA Takeshi
>Release:        1.6.2
>Organization:
Internet Initiative Japan
>Environment:
NetBSD idgw07.iij.ad.jp 1.6.2_STABLE NetBSD 1.6.2_STABLE (GENERIC) #0: Mon May  2 11:40:58 JST 2005     root@idgw07.iij.ad.jp:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
Activity LEDs on all of my i8254x cards don't blink even though tx/rx occurs.
This is a driver's problem because they blink under FreeBSD.

I'm not sure whether there is no i8254x card which blinks its activity LED.
>How-To-Repeat:
always repeat. (see description)
>Fix:
A patch follows. It enables LED blinking in wm_init().

diff -u orig/if_wm.c new/if_wm.c
--- orig/if_wm.c	Wed May 11 17:36:19 2005
+++ new/if_wm.c	Wed May 11 17:34:23 2005
@@ -2162,6 +2162,11 @@
 	/* Set the receive filter. */
 	wm_set_filter(sc);

+	/* Enable activity LED. */
+	CSR_WRITE(sc, WMREG_LEDCTL,
+	    (CSR_READ(sc, WMREG_LEDCTL) & LEDCTL_ACTIVITY_MASK) |
+	    LEDCTL_ACTIVITY_ENABLE);
+
 	/* Start the one second link check clock. */
 	callout_reset(&sc->sc_tick_ch, hz, wm_tick, sc);

diff -u orig/if_wmreg.h new/if_wmreg.h
--- orig/if_wmreg.h	Wed May 11 17:36:19 2005
+++ new/if_wmreg.h	Wed May 11 17:34:23 2005
@@ -500,6 +500,10 @@
 #define	WM_MC_TABSIZE	128
 #define	WM_VLAN_TABSIZE	128

+#define	WMREG_LEDCTL	0x0e00	/* LED control */
+#define	LEDCTL_ACTIVITY_MASK 0xfffff0ff
+#define	LEDCTL_ACTIVITY_ENABLE 0x00000300
+
 #define	WMREG_PBA	0x1000	/* Packet Buffer Allocation */

 #define	WMREG_TXDMAC	0x3000	/* Transfer DMA Control */

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.