NetBSD Problem Report #30880

From www@netbsd.org  Sun Jul 31 01:02:09 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 330EB63B116; Sun, 31 Jul 2005 01:02:09 +0000 (UTC)
Message-Id: <20050731010209.330EB63B116@narn.netbsd.org>
Date: Sun, 31 Jul 2005 01:02:09 +0000 (UTC)
From: ross@netbsd.org
Reply-To: ross@netbsd.org
To: gnats-bugs@netbsd.org
Subject: wm(4) on fiber boots up with media inactive
X-Send-Pr-Version: www-1.0

>Number:         30880
>Category:       kern
>Synopsis:       wm(4) on fiber boots up with media inactive
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    msaitoh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 31 01:03:00 +0000 2005
>Closed-Date:    Fri Dec 26 23:36:14 +0000 2014
>Last-Modified:  Thu Apr 30 20:05:02 +0000 2015
>Originator:     Ross Harvey
>Release:        NetBSD-current circa 2005-7-30
>Organization:
>Environment:
NetBSD random 3.99.7 NetBSD 3.99.7 (bkb) #29: Thu Jul 28 16:26:44 PDT 2005  ross@batbox:/usr/ross/bkb i386


>Description:
After a reboot, media state is inactive. I have tried various 
ifconfig(8) commands with no success. (Manual media setting doesn't
help.)

However, it links up just fine if you simply unplug and replug the
fiber, or if you power cycle the switch.

This problem occurs with a Netgear GS504. I have not tried any
other switches.

The problem does _not_ occur if I just plug the two wm(4) devices in
back-to-back with no switch.

This may be related to kern/30490.

wm1 at pci2 dev 8 function 0: Intel i82544EI 1000BASE-X Ethernet, rev. 2
wm1: interrupting at irq 10
wm1: 32-bit 33MHz PCI bus
wm1: 64 word (6 address bits) MicroWire EEPROM
wm1: Ethernet address 00:07:e9:17:69:90
wm1: 1000baseSX, 1000baseSX-FDX, auto


>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Jason Thorpe <thorpej@shagadelic.org>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/30880: wm(4) on fiber boots up with media inactive
Date: Sun, 31 Jul 2005 11:48:51 -0700

 On Jul 30, 2005, at 6:03 PM, ross@netbsd.org wrote:

 > After a reboot, media state is inactive. I have tried various
 > ifconfig(8) commands with no success. (Manual media setting doesn't
 > help.)
 >
 > However, it links up just fine if you simply unplug and replug the
 > fiber, or if you power cycle the switch.
 >
 > This problem occurs with a Netgear GS504. I have not tried any
 > other switches.
 >
 > The problem does _not_ occur if I just plug the two wm(4) devices in
 > back-to-back with no switch.
 >
 > This may be related to kern/30490.

 Almost certainly not related -- in 30490, we're talking about a  
 copper connection, which uses a totally different media selection  
 path (makphy driver).

 >
 > wm1 at pci2 dev 8 function 0: Intel i82544EI 1000BASE-X Ethernet,  
 > rev. 2
 > wm1: interrupting at irq 10
 > wm1: 32-bit 33MHz PCI bus
 > wm1: 64 word (6 address bits) MicroWire EEPROM
 > wm1: Ethernet address 00:07:e9:17:69:90
 > wm1: 1000baseSX, 1000baseSX-FDX, auto
 >
 >
 >
 >> How-To-Repeat:
 >>
 >
 >
 >> Fix:
 >

 -- thorpej

Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Fri, 14 Jun 2013 07:23:07 +0000
Responsible-Changed-Why:
mine.


From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/30880 CVS commit: src/sys/dev/pci
Date: Thu, 31 Jul 2014 03:50:09 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Thu Jul 31 03:50:09 UTC 2014

 Modified Files:
 	src/sys/dev/pci: if_wm.c if_wmreg.h

 Log Message:
  Fix fiber link problem (PR#44776 and PR#30880). Tested with 82543GC, 82544EI,
 82545EM, 82546GB 82571EB and 82572EI fiber cards.
 - Don't use the RXCFG interrupt. It's not required and the interrupt is very
   heavy (a lot of interrupts). Same as {Free,Open}BSD.
 - Modify wm_tbi_mediachange() to be close to em_setup_fiber_serdes_link()
   of {Free,Open}BSD. At least, don't forget to set duplex setting.
 - WM_T_82545 is not 1000base-SX but 1000base-LX. Same as FreeBSD. Tested with
   my own 82545EM card.


 To generate a diff of this commit:
 cvs rdiff -u -r1.284 -r1.285 src/sys/dev/pci/if_wm.c
 cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_wmreg.h

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

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/30880 CVS commit: [netbsd-6] src/sys/dev/pci
Date: Thu, 4 Dec 2014 06:04:07 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Dec  4 06:04:07 UTC 2014

 Modified Files:
 	src/sys/dev/pci [netbsd-6]: if_wm.c if_wmreg.h if_wmvar.h

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1203):
 	sys/dev/pci/if_wm.c: revisions 1.271, 1.273-1.274, 1.277-1.278,
 				       1.280, 1.282, 1.284-1.285, 1.287,
 				       1.293-1.294, 1.297-1.298,
 				       1.300-1.301, 1.305-1.307 via patch
 	sys/dev/pci/if_wmreg.h: revisions 1.57-1.62, 1.64-1.65 via patch
 	sys/dev/pci/if_wmvar.h: revisions 1.19, 1.21 via patch
 - Acquire SW semaphore in wm_get_swsm_semaphore().
 - Fix some bugs realted to semaphore. This change fixes a problem which
   was exposed in if_wm.c rev. 1.271. Tested by riastradh@.
   - Clear the SMBI bit in SWSM register before accessing NVM and PHY in
     wm_attach(). Same as FreeBSD.
   - Fix a bug that 82573 doesn't put the hardware semaphore. Same as
     FreeBSD r256200.
 - Call wm_set_pcie_completion_timeout() on I350, I354, I210 and I211, too.
   Same as FreeBSD and OpenBSD.
 - Drop PHPM_GO_LINK_D bit in WMREG_PHPM on some chips. From FreeBSD.
 - Fix fiber link problem (PR#44776 and PR#30880). Tested with 82543GC, 82544EI,
   82545EM, 82546GB 82571EB and 82572EI fiber cards.
   - Don't use the RXCFG interrupt. It's not required and the interrupt is very
     heavy (a lot of interrupts). Same as {Free,Open}BSD.
   - Modify wm_tbi_mediachange() to be close to em_setup_fiber_serdes_link()
     of {Free,Open}BSD. At least, don't forget to set duplex setting.
   - WM_T_82545 is not 1000base-SX but 1000base-LX. Same as FreeBSD.
 - Don't check SWSM_SMBI bit if WM_F_LOCK_SWSM isn't set. Fix a problem when
   using vmware with e1000"e". With e1000e which is regarded as 82574L,
   wm_gmii_init() fails with "could not acquire SWSM SMBI" message without
   this change. This problem doesn't occur with real 82574L card.
 - Fix a bug that wm_get_swsm_semaphore() timed out when attaching device on
   some machines.
   - Calculate NVM word size correctly.
   - Determine timeout value based on the NVM word size.
 - It's not required to print "failed to detect NVM bank" message.
   Only print while debugging. Same as {Free,Open}BSD.
 - Add some new I218 devices.
 - Delete 82580ER related code. It was from FreeBSD and was removed in r203049.
 - Fix a bug that the offset of alt MAC address is wrongly calculated to 0
   when alt MAC address function is really used. This bug does not appear
   as real bug if the same MAC address is written in the default location
   and alt MAC address's location.
 - Move some NVM related macros from if_wm.c to if_wmreg.h.
 - Sort definitions in if_wmreg.h
   - move NVM related values to the bottom.
   - sort in register's address' order.
 - Simplify wm_read_mac_addr().
 - Fix debug message.
 - Add missing prototypes.
 - Rename some functions for consistency and clarify.
 - Rename some macros for consistency.
 - Remove a duplicated error message.
 - Fix typo in comment.
 - Cleanup comments.
 - KNF.


 To generate a diff of this commit:
 cvs rdiff -u -r1.227.2.13 -r1.227.2.14 src/sys/dev/pci/if_wm.c
 cvs rdiff -u -r1.46.2.6 -r1.46.2.7 src/sys/dev/pci/if_wmreg.h
 cvs rdiff -u -r1.12.10.4 -r1.12.10.5 src/sys/dev/pci/if_wmvar.h

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

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 26 Dec 2014 23:36:14 +0000
State-Changed-Why:
fixed (at last), thanks


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/30880 CVS commit: [netbsd-5] src/sys/dev/pci
Date: Thu, 30 Apr 2015 20:00:27 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Apr 30 20:00:27 UTC 2015

 Modified Files:
 	src/sys/dev/pci [netbsd-5]: if_wm.c if_wmreg.h if_wmvar.h pcidevs

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1962):
 	sys/dev/pci/if_wm.c: revisions 1.259-1.266, 1.269, 1.271, 1.273-1.274, 1.277-1.278, 1.282, 1.284-1.285, 1.287, 1.290, 1.294, 1.297-1.298, 1.300-1.301, 1.304-1.307, 1.310, 1.312-1.314, 1.316 via patch
 	sys/dev/pci/if_wmreg.c: revisions 1.54-1.57, 1.59-1.60, 1.62, 1.64-1.66 via patch
 	sys/dev/pci/if_wmvar.c: revisions 1.17, 1.20-1.21 via patch
 	sys/dev/pci/pcidevs: revisions 1.1172, 1.1195, 1.1201 via patch
 - Fix "MDIC write error" bug for 82574 and 82583. For those chips, the
   semaphore must be released after chip reset. Found and tested by
   Mark Davies.
 - Fix BMC related bugs.
 - Fix yet another NVM bank detect problem in wm(4). Use bank 0 if the detect
   function failed. It's the same as FreeBSD. Observed and tested with
   Asus P8P67 Deluxe motherboard and tested by jnemeth.
 - Add support for I354 DH89xxCC and some new I218 devices.
 - Fix definition of CTRL_GIO_M_DIS bit.
 - Insert completion barrier between register write and delay().
 - Bump max TX DMA size to avoid pathological condition with TSO. From dyoung.
 - Fix semaphore related bugs.
 - Call wm_set_pcie_completion_timeout() on I350, I354, I210 and I211, too.
   Same as FreeBSD and OpenBSD.
 - Drop PHPM_GO_LINK_D bit in WMREG_PHPM on some chips. From FreeBSD.
 -  Fix fiber link problem (PR#44776 and PR#30880).
 - WM_T_82545 is not 1000base-SX but 1000base-LX. Same as FreeBSD.
 - Set the WM_F_ATTACHED flag if wm_attach() finished succesfully and check
   the flag in wm_detach(). It will avoid to panic in wm_detach().
   Fixes PR#49102.
 - It's not required to print "failed to detect NVM bank" with
   aprint_error_dev(). Use DPRINTF(). Same as {Free,Open}BSD.
 - Fix a bug that the offset of alt MAC address is wrongly calculated to 0
   when alt MAC address function is really used. This bug does not appear
   as real bug if the same MAC address is written in the default location
   and alt MAC address's location.
 - Initialize some hardware bits for 8257[1234], 82583, 80003, ICH* and PCH*.
   Some of them are workaround code. From other *BSDs, Linux and documents.
 - Fix a bug that wm_sgmii_writereg() function doesn't pass the "val" argument
   to the I2CCMD register. Reported by Bernard Merindol in PR#49789.
 - Delete 82580ER related code. It was from FreeBSD and was removed
   in r203049.
 - Remove extra debug message.
 - Remove unused variable.
 - Remove a duplicated error message.
 - Cleanup comments.
 - Fix debug message.


 To generate a diff of this commit:
 cvs rdiff -u -r1.162.4.20 -r1.162.4.21 src/sys/dev/pci/if_wm.c
 cvs rdiff -u -r1.24.20.8 -r1.24.20.9 src/sys/dev/pci/if_wmreg.h
 cvs rdiff -u -r1.2.46.6 -r1.2.46.7 src/sys/dev/pci/if_wmvar.h
 cvs rdiff -u -r1.962.4.19 -r1.962.4.20 src/sys/dev/pci/pcidevs

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

>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.