NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/53286: hdaudio(4), iwm(4) and rtsx(4) detections fail in UEFI case



The following reply was made to PR port-amd64/53286; it has been noted by GNATS.

From: Frank Kardel <kardel%netbsd.org@localhost>
To: "Jonathan A. Kollasch" <jakllsch%netbsd.org@localhost>, gnats-bugs%NetBSD.org@localhost
Cc: Robert Elz <kre%munnari.OZ.AU@localhost>, port-amd64-maintainer%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: port-amd64/53286: hdaudio(4), iwm(4) and rtsx(4) detections fail
 in UEFI case
Date: Sun, 20 May 2018 10:48:03 +0200

 This change also made a significant part of my devices work.
 
 But a wmX interface fails to work properly - arp entries cannot be 
 added, TX seems stuck. named and ping get Invalid argument errors.
 
 symtoms:
 2018-05-20T10:06:07.336999+02:00 pip.kardel.name /netbsd - - - [ 
 279.4544771] wm1: device timeout (txfree 4090 txsfree 58 txnext 6)
 2018-05-20T10:06:07.338722+02:00 pip.kardel.name /netbsd - - - [ 
 280.1351987] arpresolve: failed to create llentry for w.x.y.z on wm1
 2018-05-20T10:06:06.109974+02:00 pip.kardel.name named 325 - - 
 /src/NetBSD/act/src/external/bsd/bind/dist/lib/isc/unix/socket.c:2138: 
 unexpected error: internal_send: 199.7.83.42#53: Invalid argument
 2018-05-20T10:06:07.338768+02:00 pip.kardel.name named 325 - - 
 /src/NetBSD/act/src/external/bsd/bind/dist/lib/isc/unix/socket.c:2138: 
 unexpected error: internal_send: 192.58.128.30#53: Invalid argument
 2018-05-20T10:06:07.338768+02:00 pip.kardel.name named 325 - - 
 /src/NetBSD/act/src/external/bsd/bind/dist/lib/isc/unix/socket.c:2138: 
 unexpected error: internal_send: 192.58.128.30#53: Invalid argument
 
 tcpdump shows only transmitted pakets - no received pakets on wm1 in 
 this case.
 
 The internal wm interface (wm0) is working - the PCIe interface (wm1) is 
 not working (yet):
 lspci diff CSM -> EFI *same kernel image* (8.99.18 - ~20180519170000Z)
 
 --- pci.8.99.18.CSM     2018-05-20 09:55:47.429494129 +0200
 +++ pci.8.99.18.EFI     2018-05-20 10:04:59.828713583 +0200
 
 20:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet 
 Controller (Copper) (rev 06)
          Subsystem: Intel Corporation PRO/1000 PT Server Adapter
          Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- 
 ParErr- Stepping- SERR- FastB2B- DisINTx-
          Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
 <TAbort- <MAbort- >SERR- <PERR- INTx-
          Latency: 0, Cache Line Size: 64 bytes
          Interrupt: pin A routed to IRQ 5
          Region 0: Memory at fcd40000 (32-bit, non-prefetchable)
          Region 1: Memory at fcd20000 (32-bit, non-prefetchable)
          Region 2: I/O ports at c000
          Expansion ROM at fcd00000 [disabled]
          Capabilities: [c8] Power Management version 2
                  Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA 
 PME(D0+,D1-,D2-,D3hot+,D3cold+)
                  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
          Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
                  Address: 0000000000000000  Data: 0000
          Capabilities: [e0] Express (v1) Endpoint, MSI 00
                  DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s 
 <512ns, L1 <64us
                          ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset- 
 SlotPowerLimit 0.000W
                  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
 Unsupported-
                          RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                          MaxPayload 256 bytes, MaxReadReq 512 bytes
 -               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ 
 TransPend-
 +               DevSta: CorrErr- UncorrErr+ FatalErr+ UnsuppReq- AuxPwr+ 
 TransPend+
                  LnkCap: Port #2, Speed 2.5GT/s, Width x1, ASPM L0s, 
 Exit Latency L0s <4us, L1 <64us
                          ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
                  LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                          ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                  LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
 DLActive- BWMgmt- ABWMgmt-
          Capabilities: [100 v1] Advanced Error Reporting
                  UESta:  DLP- SDES- TLP- FCP- CmpltTO+ CmpltAbrt- 
 UnxCmplt- RxOF- MalfTLP+ ECRC- UnsupReq+ ACSViol-
                  UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- 
 UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                  UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- 
 UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                  CESta:  RxErr+ BadTLP+ BadDLLP- Rollover- Timeout- 
 NonFatalErr-
                  CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- 
 NonFatalErr-
                  AERCap: First Error Pointer: 14, GenCap- CGenEn- 
 ChkCap- ChkEn-
          Capabilities: [140 v1] Device Serial Number xxx...
 
 Also there is a difference mainly on the BusMaster flag for Bridges and 
 Devices
 Examples:
 1d:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43b4 (rev 
 02) (prog-if 00 [Normal decode])
 -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- 
 ParErr- Stepping- SERR- FastB2B- DisINTx-
 +       Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- 
 ParErr- Stepping- SERR- FastB2B- DisINTx-
          Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
 <TAbort- <MAbort- >SERR- <PERR- INTx-
 -       Latency: 0, Cache Line Size: 64 bytes
          Interrupt: pin A routed to IRQ 5
          Bus: primary=1d, secondary=24, subordinate=24, sec-latency=0
          I/O behind bridge: 0000a000-0000afff [size=4K]
          Memory behind bridge: fcb00000-fcbfffff [size=1M]
          Prefetchable memory behind bridge: None
          Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- 
 <TAbort- <MAbort- <SERR- <PERR-
          BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                  PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
          Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
                  Address: 0000000000000000  Data: 0000
          Capabilities: [78] Power Management version 3
                  Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA 
 PME(D0-,D1-,D2-,D3hot+,D3cold+)
                  Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
          Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00
                  DevCap: MaxPayload 512 bytes, PhantFunc 0
                          ExtTag+ RBE+
                  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
 Unsupported-
                          RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                          MaxPayload 256 bytes, MaxReadReq 512 bytes
                  DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- 
 AuxPwr+ TransPend-
                  LnkCap: Port #6, Speed 5GT/s, Width x1, ASPM L0s L1, 
 Exit Latency L0s <2us, L1 unlimited
                          ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
                  LnkCtl: ASPM Disabled; Disabled- CommClk+
                          ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                  LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
 DLActive+ BWMgmt+ ABWMgmt-
                  SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- 
 HotPlug- Surprise-
                          Slot #1, PowerLimit 26.000W; Interlock- NoCompl-
                  SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- 
 HPIrq- LinkChg-
                          Control: AttnInd Unknown, PwrInd Unknown, 
 Power- Interlock-
                  SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- 
 PresDet+ Interlock-
 
   21:00.0 Serial controller: MosChip Semiconductor Technology Ltd. 
 4-Port PCIe Serial Adapter (prog-if 02 [16550])
          Subsystem: Device a000:1000
 -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- 
 ParErr- Stepping- SERR- FastB2B- DisINTx-
 +       Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- 
 ParErr- Stepping- SERR- FastB2B- DisINTx-
          Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
 <TAbort- <MAbort- >SERR- <PERR- INTx-
 -       Latency: 0, Cache Line Size: 64 bytes
          Interrupt: pin A routed to IRQ 11
          Region 0: I/O ports at b030
          Region 1: Memory at fcc07000 (32-bit, non-prefetchable)
          Region 5: Memory at fcc06000 (32-bit, non-prefetchable)
          Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
                  Address: 0000000000000000  Data: 0000
          Capabilities: [78] Power Management version 3
                  Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA 
 PME(D0-,D1-,D2-,D3hot+,D3cold+)
                  Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
          Capabilities: [80] Express (v1) Legacy Endpoint, MSI 00
                  DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s 
 <1us, L1 <2us
                          ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
 Unsupported-
                          RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                          MaxPayload 256 bytes, MaxReadReq 512 bytes
                  DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ 
 AuxPwr- TransPend-
                  LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, 
 Exit Latency L0s <64ns, L1 unlimited
                          ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                  LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
                          ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                  LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- 
 DLActive- BWMgmt- ABWMgmt-
          Capabilities: [100 v1] Virtual Channel
                  Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                  Arb:    Fixed- WRR32- WRR64- WRR128-
                  Ctrl:   ArbSelect=Fixed
                  Status: InProgress-
                  VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                          Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- 
 WRR256-
                          Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                          Status: NegoPending- InProgress-
                  VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                          Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- 
 WRR256-
                          Ctrl:   Enable- ID=1 ArbSelect=Fixed TC/VC=00
                          Status: NegoPending- InProgress-
          Capabilities: [800 v1] Advanced Error Reporting
                  UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- 
 UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                  UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- 
 UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                  UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- 
 UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                  CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- 
 NonFatalErr+
                  CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- 
 NonFatalErr+
                  AERCap: First Error Pointer: 00, GenCap- CGenEn- 
 ChkCap- ChkEn-
 
 The serial controllers seem to work though (at least data is being 
 received).
 
 So there is almost success, but the Ethernet device issue still needs to 
 be resolved.
 
 Best regards
    Frank
 
 On 05/19/18 17:36, Robert Elz wrote:
 > This change (from Wed May 16 19:02:00 UTC 2018):
 >
 >      Modified Files:
 > 	src/sys/dev/pci: pci_map.c
 >
 >      Log Message:
 >      Enable the appropriate memory or I/O space decode in the PCI
 >      Command/Status Register upon mapping a BAR.
 >
 >      This should fix PR #53286.  It's also possible there are other similar
 >      PRs that might be fixed by this.
 >
 > enables my laptop to boot (to multi-user mode) using UEFI boot rather than
 > legacy (BIOS) booting.
 >
 > I didn't manage to get X working, but that might just be a matter of playing
 > about with the xorg.conf file (which was also necessary to make X work on
 > this laptop with BIOS booting).
 >
 > I have a dmesg (from a boot -z) if anyone wants to see it.
 >
 > kre
 >
 


Home | Main Index | Thread Index | Old Index