NetBSD Problem Report #31041

From salo@Xtrmntr.org  Mon Aug 22 14:43:42 2005
Return-Path: <salo@Xtrmntr.org>
Received: from otaku.Xtrmntr.org (sauna.silcnet.org [147.175.66.205])
	by narn.netbsd.org (Postfix) with ESMTP id CAAA163B104
	for <gnats-bugs@gnats.netbsd.org>; Mon, 22 Aug 2005 14:43:41 +0000 (UTC)
Message-Id: <20050822144305.7BCBB4A4C@otaku.Xtrmntr.org>
Date: Mon, 22 Aug 2005 16:43:05 +0200 (CEST)
From: Lubomir Sedlacik <salo@Xtrmntr.org>
Reply-To: salo@xtrmntr.org
To: gnats-bugs@netbsd.org
Subject: wm(4) sometimes can't attach phy, igphy(4): MDIC read timed out
X-Send-Pr-Version: 3.95

>Number:         31041
>Category:       kern
>Synopsis:       wm(4) sometimes can't attach phy, igphy(4): MDIC read timed out
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    msaitoh
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 22 14:44:00 +0000 2005
>Last-Modified:  Wed Jun 12 02:20:17 +0000 2013
>Originator:     Lubomir Sedlacik
>Release:        NetBSD 3.99.7, Fri Aug 19 21:40:21 CEST 2005
>Organization:

>Environment:
System: NetBSD 3.99.7
Architecture: i386
Machine: i386
Model: IBM ThinkPad X40
>Description:
wm(4) sometimes (very irregularly) fails to attach its native phy, igphy(4)
on ThinkPad X40:

 wm0 at pci1 dev 1 function 0: Intel i82541GI Mobile 1000BASE-T Ethernet, rev. 0
 wm0: interrupting at irq 4
 wm0: 32-bit 33MHz PCI bus
 wm0: 64 word (6 address bits) MicroWire EEPROM
 wm0: Ethernet address 00:0a:e4:2d:4d:21
 ukphy0 at wm0 phy 1: Generic IEEE 802.3u media interface
 ukphy0: OUI 0x005500, model 0x002a, rev. 8
 wm0: MDIC read timed out: phy 1 reg 0
 wm0: MDIC read timed out: phy 1 reg 1
 ukphy0: no media present
 ukphy1 at wm0 phy 2: Generic IEEE 802.3u media interface
 ukphy1: OUI 0x000000, model 0x0000, rev. 0
 ukphy1: no media present
 ifmedia_set: no match for 0x20/0xfffffff

ifconfig then reports no media available and the network runs very slowly,
feels like simplex 10baseT and i have to reboot to make it behave properly.

 wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=2bf80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Tx,UDP6CSUM_Tx>
         enabled=0
         address: 00:0a:e4:2d:4d:21
         media: Ethernet none

the normal operation looks like this:

 wm0 at pci1 dev 1 function 0: Intel i82541GI Mobile 1000BASE-T Ethernet, rev. 0
 wm0: interrupting at irq 4
 wm0: 32-bit 33MHz PCI bus
 wm0: 64 word (6 address bits) MicroWire EEPROM
 wm0: Ethernet address 00:0a:e4:2d:4d:21
 igphy0 at wm0 phy 1: Intel IGP01E1000 Gigabit PHY, rev. 0
 igphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

 wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=2bf80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Tx,UDP6CSUM_Tx>
         enabled=0
         address: 00:0a:e4:2d:4d:21
         media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,txpause)
         status: active
         supported Ethernet media:
                 media none
                 media 10baseT
                 media 10baseT mediaopt full-duplex
                 media 100baseTX
                 media 100baseTX mediaopt full-duplex
                 media 1000baseT
                 media 1000baseT mediaopt full-duplex
                 media autoselect


 $NetBSD: if_wm.c,v 1.107 2005/08/10 12:59:43 yamt Exp $
 $NetBSD: mii.c,v 1.37 2004/09/13 12:55:48 drochner Exp $
 $NetBSD: mii_bitbang.c,v 1.9 2005/08/09 19:26:24 chris Exp $
 $NetBSD: mii_physubr.c,v 1.44 2005/02/27 00:27:31 perry Exp $
 $NetBSD: mii_physubr.c,v 1.44 2005/02/27 00:27:31 perry Exp $
 $NetBSD: ukphy_subr.c,v 1.8 2004/05/17 00:17:28 thorpej Exp $
 $NetBSD: igphy.c,v 1.5 2004/10/05 20:20:00 thorpej Exp $
 $NetBSD: ukphy.c,v 1.24 2004/08/23 06:16:07 thorpej Exp $

dmesg:

 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.

 NetBSD 3.99.7 (AURORA-SURREALIS) #1: Fri Aug 19 21:40:21 CEST 2005
 salo@aurora-surrealis:/opt/obj/sys/arch/i386/compile/AURORA-SURREALIS
 total memory = 502 MB
 avail memory = 486 MB
 BIOS32 rev. 0 found at 0xfd740
 PCI BIOS rev. 2.1 found at 0xfd8c8
 PCI IRQ Routing Table rev. 1.0 found at 0xfdeb0, size 256 bytes (14 entries)
 PCI Interrupt Router at 000:31:0 (Intel 82371FB (PIIX) PCI-ISA Bridge compatible)
 mainbus0 (root)
 cpu0 at mainbus0: (uniprocessor)
 cpu0: Intel Pentium M (Dothan) (686-class), 1395.52 MHz, id 0x6d6
 cpu0: features afe9fbbf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR>
 cpu0: features afe9fbbf<PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX>
 cpu0: features afe9fbbf<FXSR,SSE,SSE2,SS,TM,SBF>
 cpu0: features2 180<EST,TM2>
 cpu0: "Intel(R) Pentium(R) M processor 1.40GHz"
 cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
 cpu0: L2 cache 2 MB 64B/line 8-way
 cpu0: using thermal monitor 2
 cpu0: Enhanced SpeedStep running at 1400 MHz (1116 mV)
 cpu0: Enhanced SpeedStep frequencies available (MHz): 1400 1300 1200 1100 1000 900 800 600
 cpu0: 64 page colors
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 pchb0 at pci0 dev 0 function 0
 pchb0: Intel 82855GM Host-Hub Controller (rev. 0x02)
 agp0 at pchb0: detected 8060k stolen memory
 agp0: aperture at 0xe0000000, size 0x8000000
 Intel 82855GM GMCH Memory Controller (miscellaneous system, revision 0x02) at pci0 dev 0 function 1 not configured
 Intel 82855GM GMCH Configuration Process (miscellaneous system, revision 0x02) at pci0 dev 0 function 3 not configured
 vga0 at pci0 dev 2 function 0: Intel 82855GM GMCH Integrated Graphics Device (rev. 0x02)
 wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
 wsmux1: connecting to wsdisplay0
 Intel 82855GM GMCH Integrated Graphics Device (miscellaneous display, revision 0x02) at pci0 dev 2 function 1 not configured
 uhci0 at pci0 dev 29 function 0: Intel 82801DB USB UHCI Controller (rev. 0x01)
 uhci0: interrupting at irq 9
 usb0 at uhci0: USB revision 1.0
 uhub0 at usb0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhci1 at pci0 dev 29 function 1: Intel 82801DB USB UHCI Controller (rev. 0x01)
 uhci1: interrupting at irq 11
 usb1 at uhci1: USB revision 1.0
 uhub1 at usb1
 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 uhci2 at pci0 dev 29 function 2: Intel 82801DB USB UHCI Controller (rev. 0x01)
 uhci2: interrupting at irq 10
 usb2 at uhci2: USB revision 1.0
 uhub2 at usb2
 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 ehci0 at pci0 dev 29 function 7: Intel 82801DB USB EHCI Controller (rev. 0x01)
 ehci0: interrupting at irq 9
 ehci0: EHCI version 1.0
 ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
 usb3 at ehci0: USB revision 2.0
 uhub3 at usb3
 uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub3: 6 ports with 6 removable, self powered
 ppb0 at pci0 dev 30 function 0: Intel 82801BAM Hub-PCI Bridge (rev. 0x81)
 pci1 at ppb0 bus 2
 pci1: i/o space, memory space enabled
 cbb0 at pci1 dev 0 function 0: Ricoh 5C476 PCI-CardBus bridge (rev. 0x8d)
 Ricoh product 0x0822 (system subclass 0x05, revision 0x13) at pci1 dev 0 function 1 not configured
 wm0 at pci1 dev 1 function 0: Intel i82541GI Mobile 1000BASE-T Ethernet, rev. 0
 wm0: interrupting at irq 4
 wm0: 32-bit 33MHz PCI bus
 wm0: 64 word (6 address bits) MicroWire EEPROM
 wm0: Ethernet address 00:0a:e4:2d:4d:21
 ukphy0 at wm0 phy 1: Generic IEEE 802.3u media interface
 ukphy0: OUI 0x005500, model 0x002a, rev. 8
 wm0: MDIC read timed out: phy 1 reg 0
 wm0: MDIC read timed out: phy 1 reg 1
 ukphy0: no media present
 ukphy1 at wm0 phy 2: Generic IEEE 802.3u media interface
 ukphy1: OUI 0x000000, model 0x0000, rev. 0
 ukphy1: no media present
 ifmedia_set: no match for 0x20/0xfffffff
 iwi0 at pci1 dev 2 function 0: Intel PRO/Wireless LAN 2200BG Mini-PCI Adapter (rev. 0x05)
 iwi0: interrupting at irq 6
 iwi0: 802.11 address 00:0e:35:f1:2b:9a
 iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 cbb0: interrupting at irq 9
 cardslot0 at cbb0 slot 0 flags 0
 cardbus0 at cardslot0: bus 3 device 0
 pcmcia0 at cardslot0
 ichlpcib0 at pci0 dev 31 function 0
 ichlpcib0: Intel 82801DB ISA Bridge (rev. 0x01)
 ichlpcib0: TCO (watchdog) timer configured.
 ichlpcib0: SpeedStep enabled
 piixide0 at pci0 dev 31 function 1
 piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x01)
 piixide0: bus-master DMA support present
 piixide0: primary channel configured to compatibility mode
 piixide0: primary channel interrupting at irq 14
 atabus0 at piixide0 channel 0
 piixide0: secondary channel configured to compatibility mode
 piixide0: secondary channel interrupting at irq 15
 atabus1 at piixide0 channel 1
 Intel 82801DB SMBus Controller (SMBus serial bus, revision 0x01) at pci0 dev 31 function 3 not configured
 auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
 auich0: interrupting at irq 5
 auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
 auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
 Intel 82801DB AC97 Modem Controller (modem communications, revision 0x01) at pci0 dev 31 function 6 not configured
 isa0 at ichlpcib0
 com0 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
 pckbc0 at isa0 port 0x60-0x64
 pckbd0 at pckbc0 (kbd slot)
 pckbc0: using irq 1 for kbd slot
 wskbd0 at pckbd0: console keyboard, using wsdisplay0
 pms0 at pckbc0 (aux slot)
 pckbc0: using irq 12 for aux slot
 wsmouse0 at pms0 mux 0
 attimer0 at isa0 port 0x40-0x43: AT Timer
 pcppi0 at isa0 port 0x61
 midi0 at pcppi0: PC speaker
 spkr0 at pcppi0
 sysbeep0 at pcppi0
 npx0 at isa0 port 0xf0-0xff: using exception 16
 pcppi0: attached to attimer0
 apm0 at mainbus0: Power Management spec V1.2
 apm0: battery life expectancy: 99%
 apm0: A/C state: on
 apm0: battery charge state: high
 auich0: measured ac97 link rate at 48003 Hz, will use 48000 Hz
 audio0 at auich0: full duplex, mmap, independent
 md0: internal 3000 KB image area
 IPsec: Initialized Security Association Processing.
 wd0 at atabus0 drive 0: <HITACHI_DK13FA-40B>
 wd0: drive supports 16-sector PIO transfers, LBA addressing
 wd0: 38154 MB, 77520 cyl, 16 head, 63 sec, 512 bytes/sect x 78140160 sectors
 wd0: 32-bit data port
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)

>How-To-Repeat:
boot NetBSD (-current, didn't test anything else) on a ThinkPad X40,
see igphy(4) failing to attach from time to time

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Lubomir Sedlacik <salo@Xtrmntr.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/31041: wm(4) sometimes can't attach phy, igphy(4): MDIC read timed out
Date: Wed, 21 Mar 2007 13:49:22 +0100

 the issue is still present.  the manifestation changed now, though.
 (i assume it's a consequence of msaitoh's recent changes)

 there aren't any MDIC messages printed now, nor is ukphy(4) attached.

 from my recent reboot:

 NetBSD 4.99.13 (AURORA-SURREALIS) #2: Tue Mar  6 00:32:24 CET 2007

 $NetBSD: if_wm.c,v 1.134 2007/02/23 08:22:06 msaitoh Exp $

 Mar  6 00:36:28 aurora-surrealis /netbsd: wm0 at pci1 dev 1 function 0: Intel i82541GI Mobile 1000BASE-T Ethernet, rev. 0
 Mar  6 00:36:28 aurora-surrealis /netbsd: wm0: interrupting at irq 11
 Mar  6 00:36:28 aurora-surrealis /netbsd: wm0: 32-bit 33MHz PCI bus
 Mar  6 00:36:28 aurora-surrealis /netbsd: wm0: 64 word (6 address bits) MicroWire EEPROM
 Mar  6 00:36:28 aurora-surrealis /netbsd: wm0: Ethernet address 00:0a:e4:36:df:b4

 > ifconfig -m wm0
 wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

 capabilities=2bf80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Tx,UDP6CSUM_Tx>
         enabled=0
         address: 00:0a:e4:36:df:b4
         media: Ethernet none (none)
         supported Ethernet media:
                 media none

 -- 
 -- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

From: SAITOH Masanobu <masanobu@iij.ad.jp>
To: gnats-bugs@NetBSD.org, salo@Xtrmntr.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/31041: wm(4) sometimes can't attach phy, igphy(4): MDIC
 read timed out
Date: Tue, 27 Mar 2007 11:03:35 +0900 (JST)

 Hello.

  > From: Lubomir Sedlacik <salo@Xtrmntr.org>
  > To: gnats-bugs@netbsd.org
  > Cc: 
  > Subject: Re: kern/31041: wm(4) sometimes can't attach phy, igphy(4): MDIC read timed out
  > Date: Wed, 21 Mar 2007 13:49:22 +0100
  > 
  >  the issue is still present.  the manifestation changed now, though.
  >  (i assume it's a consequence of msaitoh's recent changes)
  >  
  >  there aren't any MDIC messages printed now, nor is ukphy(4) attached.

 I added the workaround code for i82541 and i82547 in if_wm.c rev. 1.136.

 I heard from salo that it work fine for him.

 Thanks.

 ----------------------------------------------------------
 		SAITOH Masanobu (masanobu@iij.ad.jp
 				  msaitoh@netbsd.org)

From: Lubomir Sedlacik <salo@Xtrmntr.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/31041: wm(4) sometimes can't attach phy, igphy(4): MDIC read timed out
Date: Tue, 1 May 2007 16:07:34 +0200

 unfortunatelly, this is still not fixed.  i happened to reboot this
 sunday again, without a cable plugged into the wm(4) interface and the
 PHY failed to attach, again:

 NetBSD 4.99.17 (AURORA-SURREALIS) #0: Wed Apr 11 15:44:17 CEST 2007

 $NetBSD: if_wm.c,v 1.138 2007/03/27 13:13:49 salo Exp $

 Apr 29 10:06:14 aurora-surrealis /netbsd: wm0 at pci1 dev 1 function 0: Intel i82541GI Mobile 1000BASE-T Ethernet, rev. 0
 Apr 29 10:06:14 aurora-surrealis /netbsd: wm0: interrupting at irq 11
 Apr 29 10:06:14 aurora-surrealis /netbsd: wm0: 32-bit 33MHz PCI bus
 Apr 29 10:06:14 aurora-surrealis /netbsd: wm0: 64 word (6 address bits) MicroWire EEPROM
 Apr 29 10:06:14 aurora-surrealis /netbsd: wm0: Ethernet address 00:0a:e4:36:df:b4

 > ifconfig -m wm0
 wm0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=2bf80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Tx,UDP6CSUM_Tx>
         enabled=0
         address: 00:0a:e4:36:df:b4
         media: Ethernet none (none)
         supported Ethernet media:
                 media none

 i think it's easier to trigger the issue when the cable is unplugged.

 -- 
 -- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Wed, 12 Jun 2013 02:20:17 +0000
Responsible-Changed-Why:
mine


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