NetBSD Problem Report #54373

From tsutsui@ceres.dti.ne.jp  Sat Jul 13 15:15:27 2019
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3A6217A15F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 13 Jul 2019 15:15:27 +0000 (UTC)
Message-Id: <201907131515.x6DFFM75007852@ceres.dti.ne.jp>
Date: Sun, 14 Jul 2019 00:15:22 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: wm(4) MDIC read/write error on Panasonic CF-NX3
X-Send-Pr-Version: 3.95

>Number:         54373
>Category:       kern
>Synopsis:       wm(4) MDIC read/write error on Panasonic CF-NX3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 13 15:20:00 +0000 2019
>Closed-Date:    Sat Jul 10 14:33:00 +0000 2021
>Last-Modified:  Sat Jul 10 14:33:00 +0000 2021
>Originator:     Izumi Tsutsui
>Release:        NetBSD 8.1
>Organization:
>Environment:
System: NetBSD mirage 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
After reboot from Windows 10 Pro 64bit 1903,
wm(4) driver on NetBSD/amd64 8.1 complains on attach:

---
NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019
        mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC
total memory = 3265 MB
avail memory = 3146 MB
cpu_rng: RDRAND
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
efi: systbl at pa dbf52f18
Panasonic Corporation CF-NX3RDJCS (002)
mainbus0 (root)

 :

wm0 at pci0 dev 25 function 0: I218 LM Ethernet Connection (rev. 0x04)
wm0: interrupting at msi1 vec 0
wm0: PCI-Express bus
wm0: 2048 words FLASH
wm0: Ethernet address xx:xx:xx:xx:xx:xx
wm0: 0xa4480<FLASH,IOH_VALID,PCIE,ASF_FIRM,AMT>
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 23
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 23
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 26
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 26
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 30
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 18
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 16
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 17
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC read timed out: phy 1 reg 25
wm0: MDIC write timed out: phy 1 reg 31
wm0: MDIC write timed out: phy 1 reg 25
wm0: MDIC read timed out: phy 2 reg 2
wm0: MDIC read timed out: phy 2 reg 2
XXX return with false
wm0: MDIC write error: phy 1 reg 23
ihphy0 at wm0 phy 2: i217 10/100/1000 media interface, rev. 5
ihphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
---

On the first power-on startup it's attached without errors.

>How-To-Repeat:
Boot NetBSD/amd64 8.1 after reboot from Windows 10 Pro 64 bit.

>Fix:
No idea. Some initialization missing?

>Release-Note:

>Audit-Trail:
From: SAITOH Masanobu <msaitoh@execsw.org>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: msaitoh@execsw.org
Subject: Re: kern/54373: wm(4) MDIC read/write error on Panasonic CF-NX3
Date: Sun, 14 Jul 2019 08:02:12 +0900

 On 2019/07/14 0:20, Izumi Tsutsui wrote:
 >> Number:         54373
 >> Category:       kern
 >> Synopsis:       wm(4) MDIC read/write error on Panasonic CF-NX3
 >> Confidential:   no
 >> Severity:       non-critical
 >> Priority:       medium
 >> Responsible:    kern-bug-people
 >> State:          open
 >> Class:          sw-bug
 >> Submitter-Id:   net
 >> Arrival-Date:   Sat Jul 13 15:20:00 +0000 2019
 >> Originator:     Izumi Tsutsui
 >> Release:        NetBSD 8.1
 >> Organization:
 >> Environment:
 > System: NetBSD mirage 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
 > Architecture: i386
 > Machine: i386
 >> Description:
 > After reboot from Windows 10 Pro 64bit 1903,
 > wm(4) driver on NetBSD/amd64 8.1 complains on attach:
 > 
 > ---
 > NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019
 >         mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC
 > total memory = 3265 MB
 > avail memory = 3146 MB
 > cpu_rng: RDRAND
 > timecounter: Timecounters tick every 10.000 msec
 > Kernelized RAIDframe activated
 > running cgd selftest aes-xts-256 aes-xts-512 done
 > timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 > efi: systbl at pa dbf52f18
 > Panasonic Corporation CF-NX3RDJCS (002)
 > mainbus0 (root)
 > 
 >  :
 > 
 > wm0 at pci0 dev 25 function 0: I218 LM Ethernet Connection (rev. 0x04)
 > wm0: interrupting at msi1 vec 0
 > wm0: PCI-Express bus
 > wm0: 2048 words FLASH
 > wm0: Ethernet address xx:xx:xx:xx:xx:xx
 > wm0: 0xa4480<FLASH,IOH_VALID,PCIE,ASF_FIRM,AMT>
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 23
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 23
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 26
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 26
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 30
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 18
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 16
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 17
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC read timed out: phy 1 reg 25
 > wm0: MDIC write timed out: phy 1 reg 31
 > wm0: MDIC write timed out: phy 1 reg 25
 > wm0: MDIC read timed out: phy 2 reg 2
 > wm0: MDIC read timed out: phy 2 reg 2
 > XXX return with false
 > wm0: MDIC write error: phy 1 reg 23
 > ihphy0 at wm0 phy 2: i217 10/100/1000 media interface, rev. 5
 > ihphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 > ---
 > 
 > On the first power-on startup it's attached without errors.
 > 
 >> How-To-Repeat:
 > Boot NetBSD/amd64 8.1 after reboot from Windows 10 Pro 64 bit.
 > 
 >> Fix:
 > No idea. Some initialization missing?
 > 

 Could you show me the output of "pcictl pci0 dump -b 0 -d 25 -f 0"
 on both NetBSD cold boot and warm boot from Windows 10?

 The problem seems like a problem I fixed in if_wm.c rev. 1.592.

 -- 
 -----------------------------------------------
                 SAITOH Masanobu (msaitoh@execsw.org
                                  msaitoh@netbsd.org)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: msaitoh@execsw.org
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: kern/54373: wm(4) MDIC read/write error on Panasonic CF-NX3
Date: Sun, 14 Jul 2019 23:11:01 +0900

 > Could you show me the output of "pcictl pci0 dump -b 0 -d 25 -f 0"
 > on both NetBSD cold boot and warm boot from Windows 10?

 No difference between coldboot (no error case) and warmboot (error case):
 ---
 PCI configuration registers:
   Common header:
     0x00: 0x155a8086 0x00100007 0x02000004 0x00000000

     Vendor Name: Intel (0x8086)
     Device Name: I218-LM Ethernet Connection (0x155a)
     Command register: 0x0007
       I/O space accesses: on
       Memory space accesses: on
       Bus mastering: on
       Special cycles: off
       MWI transactions: off
       Palette snooping: off
       Parity error checking: off
       Address/data stepping: off
       System error (SERR): off
       Fast back-to-back transactions: off
       Interrupt disable: off
     Status register: 0x0010
       Immediate Readiness: off
       Interrupt status: inactive
       Capability List support: on
       66 MHz capable: off
       User Definable Features (UDF) support: off
       Fast back-to-back capable: off
       Data parity error detected: off
       DEVSEL timing: fast (0x0)
       Slave signaled Target Abort: off
       Master received Target Abort: off
       Master received Master Abort: off
       Asserted System Error (SERR): off
       Parity error detected: off
     Class Name: network (0x02)
     Subclass Name: ethernet (0x00)
     Interface: 0x00
     Revision ID: 0x04
     BIST: 0x00
     Header Type: 0x00 (0x00)
     Latency Timer: 0x00
     Cache Line Size: 0bytes (0x00)

   Type 0 ("normal" device) header:
     0x10: 0xf7f00000 0xf7f44000 0x0000f081 0x00000000
     0x20: 0x00000000 0x00000000 0x00000000 0x833810f7
     0x30: 0x00000000 0x000000c8 0x00000000 0x00000105

     Base address register at 0x10
       type: 32-bit nonprefetchable memory
       base: 0xf7f00000
     Base address register at 0x14
       type: 32-bit nonprefetchable memory
       base: 0xf7f44000
     Base address register at 0x18
       type: I/O
       base: 0x0000f080
     Base address register at 0x1c
       not implemented
     Base address register at 0x20
       not implemented
     Base address register at 0x24
       not implemented
     Cardbus CIS Pointer: 0x00000000
     Subsystem vendor ID: 0x10f7
     Subsystem ID: 0x8338
     Expansion ROM Base Address Register: 0x00000000
       base: 0x00000000
       Expansion ROM Enable: off
       Validation Status: Validation not supported
       Validation Details: 0x0
     Capability list pointer: 0xc8
     Reserved @ 0x38: 0x00000000
     Maximum Latency: 0x00
     Minimum Grant: 0x00
     Interrupt pin: 0x01 (pin A)
     Interrupt line: 0x05

   Capability register at 0xc8
     type: 0x01 (Power Management)
   Capability register at 0xd0
     type: 0x05 (MSI)
   Capability register at 0xe0
     type: 0x13 (Advanced Features)

   PCI Power Management Capabilities Register
     Capabilities register: 0xc822
       Version: 1.1
       PME# clock: off
       Device specific initialization: on
       3.3V auxiliary current: self-powered
       D1 power management state support: off
       D2 power management state support: off
       PME# support D0: on
       PME# support D1: off
       PME# support D2: off
       PME# support D3 hot: on
       PME# support D3 cold: on
     Control/status register: 0x00002000
       Power state: D0
       PCI Express reserved: off
       No soft reset: off
       PME# assertion: disabled
       Data Select: 0
       Data Scale: 1
       PME# status: off
     Bridge Support Extensions register: 0x00
       B2/B3 support: off
       Bus Power/Clock Control Enable: off
     Data register: 0x00

   PCI Message Signaled Interrupt
     Message Control register: 0x0081
       MSI Enabled: on
       Multiple Message Capable: no (1 vector)
       Multiple Message Enabled: off (1 vector)
       64 Bit Address Capable: on
       Per-Vector Masking Capable: off
       Extended Message Data Capable: off
       Extended Message Data Enable: off
     Message Address (lower) register: 0xfee00000
     Message Address (upper) register: 0x00000000
     Message Data register: 0x0065

   Advanced Features Capability Register
     AF Capabilities register: 0x03
     AF Structure Length: 0x06
       Transaction Pending: on
       Function Level Reset: on
     AF Control register: 0x00
     AF Status register: 0x00
       Transaction Pending: off

   Device-dependent header:
     0x40: 0x00000000 0x00000000 0x00000000 0x00000000
     0x50: 0x00000000 0x00000000 0x00000000 0x00000000
     0x60: 0x00000000 0x00000000 0x00000000 0x00000000
     0x70: 0x00000000 0x00000000 0x00000000 0x00000000
     0x80: 0x00000000 0x00000000 0x00000000 0x00000000
     0x90: 0x00000000 0x00000000 0x00005404 0x800013c3
     0xa0: 0x00000000 0x00000000 0x00001003 0x00000000
     0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
     0xc0: 0x00000000 0x00000000 0xc822d001 0x07002000
     0xd0: 0x0081e005 0xfee00000 0x00000000 0x00000065
     0xe0: 0x03060013 0x00000000 0x00000000 0x00000000
     0xf0: 0x00000000 0x00000000 0x00000000 0x00000000
 ---

 > The problem seems like a problem I fixed in if_wm.c rev. 1.592.

 I'll check -current kernel later.

State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 10 Jul 2021 14:33:00 +0000
State-Changed-Why:
Not seen on 9.0 and later.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.