NetBSD Problem Report #57531

From www@netbsd.org  Tue Jul 18 13:24:01 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 24C431A923D
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 Jul 2023 13:24:01 +0000 (UTC)
Message-Id: <20230718132358.2AC401A923E@mollari.NetBSD.org>
Date: Tue, 18 Jul 2023 13:23:58 +0000 (UTC)
From: abs@absd.org
Reply-To: abs@absd.org
To: gnats-bugs@NetBSD.org
Subject: Realtek EHCI prevents suspend on ThinkPad T495
X-Send-Pr-Version: www-1.0

>Number:         57531
>Category:       kern
>Synopsis:       Realtek EHCI prevents suspend on ThinkPad T495
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 18 13:25:00 +0000 2023
>Last-Modified:  Tue Jul 18 14:50:01 +0000 2023
>Originator:     David Brownlee
>Release:        NetBSD-10
>Organization:
>Environment:
NetBSD forsaken.absd.org 10.0_BETA NetBSD 10.0_BETA (GENERIC) #1: Tue Jul 18 13:21:15 BST 2023  abs@iris.absd.org:/opt/netbsd/10/sys/arch/amd64/compile/GENERIC amd64

>Description:
The Realtek EHCI controller (dmesg):

ehci0 at pci3 dev 0 function 4: Realtek Semiconductor product 816d (rev. 0x0e)
ehci0: 32-bit DMA
ehci0: interrupting at msix2 vec 0
ehci0: pre-2.0 USB rev, device ignored

prevents suspend:

acpi0: entering state S3
Devices without power management support: ehci0
acpi0: autoconfiguration error: aborting suspend

output of "pcictl pci3 dump -d 0 -f 4":

PCI configuration registers:
  Common header:
    0x00: 0x816d10ec 0x00100006 0x0c03200e 0x00800008

    Vendor Name: Realtek Semiconductor (0x10ec)
    Device ID: 0x816d
    Command register: 0x0006
      I/O space accesses: off
      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: serial bus (0x0c)
    Subclass Name: USB (0x03)
    Interface Name: EHCI (0x20)
    Revision ID: 0x0e
    BIST: 0x00
    Header Type: 0x00+multifunction (0x80)
    Latency Timer: 0x00
    Cache Line Size: 32bytes (0x08)

  Type 0 ("normal" device) header:
    0x10: 0xd0818000 0x00000000 0xd0810004 0x00000000
    0x20: 0x00000000 0x00000000 0x00000000 0x512517aa
    0x30: 0x00000000 0x00000040 0x00000000 0x000004ff

    Base address register at 0x10
      type: 32-bit nonprefetchable memory
      base: 0xd0818000
    Base address register at 0x14
      not implemented
    Base address register at 0x18
      type: 64-bit nonprefetchable memory
      base: 0x00000000d0810000
    Base address register at 0x20
      not implemented
    Base address register at 0x24
      not implemented
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0x17aa
    Subsystem ID: 0x5125
    Expansion ROM Base Address Register: 0x00000000
      base: 0x00000000
      Expansion ROM Enable: off
      Validation Status: Validation not supported
      Validation Details: 0x0
    Capability list pointer: 0x40
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x00
    Minimum Grant: 0x00
    Interrupt pin: 0x04 (pin D)
    Interrupt line: 0xff

  Capability register at 0x40
    type: 0x01 (Power Management)
  Capability register at 0x50
    type: 0x05 (MSI)
  Capability register at 0x70
    type: 0x10 (PCI Express)
  Capability register at 0xb0
    type: 0x11 (MSI-X)
  Capability register at 0xd0
    type: 0x03 (VPD)

  PCI Power Management Capabilities Register
    Capabilities register: 0x89c3
      Version: 1.2
      PME# clock: off
      Device specific initialization: off
      3.3V auxiliary current: 375 mA
      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: off
      PME# support D3 cold: on
    Control/status register: 0x00000008
      Power state: D0
      PCI Express reserved: off
      No soft reset: on
      PME# assertion: disabled
      Data Select: 0
      Data Scale: 0
      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: 0x0080
      MSI Enabled: off
      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: 0x00000000
    Message Address (upper) register: 0x00000000
    Message Data register: 0x0000

  PCI Express Capabilities Register
    Capability register: 0x0202
      Capability version: 2
      Device type: PCI Express Endpoint device
      Slot implemented: off
      Interrupt Message Number: 0x01
    Device Capabilities Register: 0x00008dc0
      Max Payload Size Supported: 128 bytes max
      Phantom Functions Supported: not available
      Extended Tag Field Supported: 5bit
      Endpoint L0 Acceptable Latency: More than 4us
      Endpoint L1 Acceptable Latency: 32us - 64us
      Attention Button Present: off
      Attention Indicator Present: off
      Power Indicator Present: off
      Role-Based Error Report: on
      Captured Slot Power Limit: 0W
      Function-Level Reset Capability: off
    Device Control Register: 0x2010
      Correctable Error Reporting Enable: off
      Non Fatal Error Reporting Enable: off
      Fatal Error Reporting Enable: off
      Unsupported Request Reporting Enable: off
      Enable Relaxed Ordering: on
      Max Payload Size: 128 byte
      Extended Tag Field Enable: off
      Phantom Functions Enable: off
      Aux Power PM Enable: off
      Enable No Snoop: off
      Max Read Request Size: 512 byte
    Device Status Register: 0x001b
      Correctable Error Detected: on
      Non Fatal Error Detected: on
      Fatal Error Detected: off
      Unsupported Request Detected: on
      Aux Power Detected: on
      Transaction Pending: off
      Emergency Power Reduction Detected: off
    Link Capabilities Register: 0x00477c11
      Maximum Link Speed: 2.5GT/s
      Maximum Link Width: x1 lanes
      Active State PM Support: L0s and L1 supported
      L0 Exit Latency: More than 4us
      L1 Exit Latency: 32us - 64us
      Port Number: 0
      Clock Power Management: on
      Surprise Down Error Report: off
      Data Link Layer Link Active: off
      Link BW Notification Capable: off
      ASPM Optionally Compliance: on
    Link Control Register: 0x0142
      Active State PM Control: L1 Entry Enabled
      Read Completion Boundary Control: 64bytes
      Link Disable: off
      Retrain Link: off
      Common Clock Configuration: on
      Extended Synch: off
      Enable Clock Power Management: on
      Hardware Autonomous Width Disable: off
      Link Bandwidth Management Interrupt Enable: off
      Link Autonomous Bandwidth Interrupt Enable: off
      DRS Signaling Control: not reported
    Link Status Register: 0x1011
      Negotiated Link Speed: 2.5GT/s
      Negotiated Link Width: x1 lanes
      Training Error: off
      Link Training: off
      Slot Clock Configuration: on
      Data Link Layer Link Active: off
      Link Bandwidth Management Status: off
      Link Autonomous Bandwidth Status: off
    Device Capabilities 2: 0x000c081f
      Completion Timeout Ranges Supported: ABCD
      Completion Timeout Disable Supported: on
      ARI Forwarding Supported: off
      AtomicOp Routing Supported: off
      32bit AtomicOp Completer Supported: off
      64bit AtomicOp Completer Supported: off
      128-bit CAS Completer Supported: off
      No RO-enabled PR-PR passing: off
      LTR Mechanism Supported: on
      TPH Completer Supported: Not supported
      LN System CLS: Not supported or not in effect
      10-bit Tag Completer Supported: off
      10-bit Tag Requester Supported: off
      OBFF Supported: Both
      Extended Fmt Field Supported: off
      End-End TLP Prefix Supported: off
      Max End-End TLP Prefixes: 4
      Emergency Power Reduction Supported: Not supported
      Emergency Power Reduction Initialization Required: off
      FRS Supported: off
    Device Control 2: 0x0000
      Completion Timeout Value: 50us to 50ms
      Completion Timeout Disabled: off
      ARI Forwarding Enabled: off
      AtomicOp Requester Enabled: off
      AtomicOp Egress Blocking: off
      IDO Request Enabled: off
      IDO Completion Enabled: off
      LTR Mechanism Enabled: off
      Emergency Power Reduction Request: off
      10-bit Tag Requester Enabled: off
      OBFF: Disabled
      End-End TLP Prefix Blocking on: off
    Link Capabilities 2: 0x00000002
      Supported Link Speeds Vector: 2.5GT/s
      Crosslink Supported: off
      Lower SKP OS Generation Supported Speed Vector:
      Lower SKP OS Reception Supported Speed Vector:
      Retimer Presence Detect Supported: off
      DRS Supported: off
    Link Control 2: 0x0000
      Target Link Speed: 2.5GT/s
      Enter Compliance Enabled: off
      HW Autonomous Speed Disabled: off
      Selectable De-emphasis: -6dB
      Transmit Margin: 0
      Enter Modified Compliance: off
      Compliance SOS: off
      Compliance Preset/De-emphasis: Preshoot 0.0dB, De-emphasis -6.0+-1.5dB
    Link Status 2: 0x0000
      Current De-emphasis Level: -6dB
      Equalization Complete: off
      Equalization Phase 1 Successful: off
      Equalization Phase 2 Successful: off
      Equalization Phase 3 Successful: off
      Link Equalization Request: off
      Retimer Presence Detected: off

  MSI-X Capability Register
    Message Control register: 0x0003
      Table Size: 4
      Function Mask: off
      MSI-X Enable: on
    Table offset register: 0x00000002
      Table offset: 0x00000000
      BIR: 0x2
    Pending bit array register: 0x00000802
      Pending bit array offset: 0x00000800
      BIR: 0x2

  Device-dependent header:
    0x40: 0x89c35001 0x00000008 0x00000000 0x00000000
    0x50: 0x00807005 0x00000000 0x00000000 0x00000000
    0x60: 0x00000000 0x00000000 0x00000000 0x00000000
    0x70: 0x0202b010 0x00008dc0 0x001b2010 0x00477c11
    0x80: 0x10110142 0x00000000 0x00000000 0x00000000
    0x90: 0x00000000 0x000c081f 0x00000000 0x00000002
    0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb0: 0x8003d011 0x00000002 0x00000802 0x00000000
    0xc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd0: 0x00000003 0x00000000 0x00000000 0x00000000
    0xe0: 0x00000000 0x00000001 0xc0000000 0x00000000
    0xf0: 0x00000000 0x00000000 0x00000000 0x00000000

  Extended Capability Register at 0x100
    type: 0x0001 (Advanced Error Reporting)
    version: 2
  Extended Capability Register at 0x160
    type: 0x0003 (Device Serial Number)
    version: 1
  Extended Capability Register at 0x170
    type: 0x0018 (Latency Tolerance Reporting)
    version: 1
  Extended Capability Register at 0x178
    type: 0x001e (L1 PM Substates)
    version: 1

  Advanced Error Reporting Register
    Uncorrectable Error Status register: 0x00100000
      Undefined: off
      Data Link Protocol Error: off
      Surprise Down Error: off
      Poisoned TLP Received: off
      Flow Control Protocol Error: off
      Completion Timeout: off
      Completer Abort: off
      Unexpected Completion: off
      Receiver Overflow: off
      Malformed TLP: off
      ECRC Error: off
      Unsupported Request Error: on
      ACS Violation: off
      Uncorrectable Internal Error: off
      MC Blocked TLP: off
      AtomicOp Egress BLK: off
      TLP Prefix Blocked Error: off
      Poisoned TLP Egress Blocked: off
    Uncorrectable Error Mask register: 0x00400000
      Undefined: off
      Data Link Protocol Error: off
      Surprise Down Error: off
      Poisoned TLP Received: off
      Flow Control Protocol Error: off
      Completion Timeout: off
      Completer Abort: off
      Unexpected Completion: off
      Receiver Overflow: off
      Malformed TLP: off
      ECRC Error: off
      Unsupported Request Error: off
      ACS Violation: off
      Uncorrectable Internal Error: on
      MC Blocked TLP: off
      AtomicOp Egress BLK: off
      TLP Prefix Blocked Error: off
      Poisoned TLP Egress Blocked: off
    Uncorrectable Error Severity register: 0x00462030
      Undefined: off
      Data Link Protocol Error: on
      Surprise Down Error: on
      Poisoned TLP Received: off
      Flow Control Protocol Error: on
      Completion Timeout: off
      Completer Abort: off
      Unexpected Completion: off
      Receiver Overflow: on
      Malformed TLP: on
      ECRC Error: off
      Unsupported Request Error: off
      ACS Violation: off
      Uncorrectable Internal Error: on
      MC Blocked TLP: off
      AtomicOp Egress BLK: off
      TLP Prefix Blocked Error: off
      Poisoned TLP Egress Blocked: off
    Correctable Error Status register: 0x00002000
      Receiver Error: off
      Bad TLP: off
      Bad DLLP: off
      REPLAY_NUM Rollover: off
      Replay Timer Timeout: off
      Advisory Non-Fatal Error: on
      Corrected Internal Error: off
      Header Log Overflow: off
    Correctable Error Mask register: 0x00006000
      Receiver Error: off
      Bad TLP: off
      Bad DLLP: off
      REPLAY_NUM Rollover: off
      Replay Timer Timeout: off
      Advisory Non-Fatal Error: on
      Corrected Internal Error: on
      Header Log Overflow: off
    Advanced Error Capabilities and Control register: 0x000000b4
      First Error Pointer: 0x0014
      ECRC Generation Capable: on
      ECRC Generation Enable: off
      ECRC Check Capable: on
      ECRC Check Enable: off
      Multiple Header Recording Capable: off
      Multiple Header Recording Enable: off
      Completion Timeout Prefix/Header Log Capable: off
      TLP Prefix Log Present: off
    Header Log register:
    0x11c: 0x40001001
    0x120: 0x0000000f 0xd0814074 0x00000000

  Device Serial Number Register
    Serial Number: 00-00-00-00-00-00-00-00

  Latency Tolerance Reporting
    Max Snoop Latency Register: 0x1001
      Max Snoop Latency: 1048576ns
    Max No-Snoop Latency Register: 0x1001
      Max No-Snoop Latency: 1048576ns

  L1 PM Substates
    L1 PM Substates Capability register: 0x0079961f
      PCI-PM L1.2 Supported: on
      PCI-PM L1.1 Supported: on
      ASPM L1.2 Supported: on
      ASPM L1.1 Supported: on
      L1 PM Substates Supported: on
      Port Common Mode Restore Time: 150us
      Port T_POWER_ON: 150us
    L1 PM Substates Control register 1: 0x6001001f
      PCI-PM L1.2 Enable: on
      PCI-PM L1.1 Enable: on
      ASPM L1.2 Enable: on
      ASPM L1.1 Enable: on
      Link Activation Interrupt Enable: on
      Link Activation Control: off
      Common Mode Restore Time: 0us
      LTR L1.2 THRESHOLD: 32768us
    L1 PM Substates Control register 2: 0x00000079
      T_POWER_ON: 150us

  Extended Configuration Space:
    0x100: 0x16020001 0x00100000 0x00400000 0x00462030
    0x110: 0x00002000 0x00006000 0x000000b4 0x40001001
    0x120: 0x0000000f 0xd0814074 0x00000000 0x00000000
    0x130: 0x00000000 0x00000000 0x00000000 0x00000000
    0x140: 0x00000000 0x00000000 0x00000000 0x00000000
    0x150: 0x00000000 0x00000000 0x00000000 0x00000000
    0x160: 0x17010003 0x00000000 0x00000000 0x00000000
    0x170: 0x17810018 0x10011001 0x0001001e 0x0079961f
    0x180: 0x6001001f 0x00000079 0x00000000 0x00000000
    0x190: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x1f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x200: 0x00000000 0x00000000 0x00000000 0x00000000
    0x210: 0x00000000 0x00000000 0x00000000 0x00000000
    0x220: 0x00000000 0x00000000 0x00000000 0x00000000
    0x230: 0x00000000 0x00000000 0x00000000 0x00000000
    0x240: 0x00000000 0x00000000 0x00000000 0x00000000
    0x250: 0x00000000 0x00000000 0x00000000 0x00000000
    0x260: 0x00000000 0x00000000 0x00000000 0x00000000
    0x270: 0x00000000 0x00000000 0x00000000 0x00000000
    0x280: 0x00000000 0x00000000 0x00000000 0x00000000
    0x290: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x2f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x300: 0x00000000 0x00000000 0x00000000 0x00000000
    0x310: 0x00000000 0x00000000 0x00000000 0x00000000
    0x320: 0x00000000 0x00000000 0x00000000 0x00000000
    0x330: 0x00000000 0x00000000 0x00000000 0x00000000
    0x340: 0x00000000 0x00000000 0x00000000 0x00000000
    0x350: 0x00000000 0x00000000 0x00000000 0x00000000
    0x360: 0x00000000 0x00000000 0x00000000 0x00000000
    0x370: 0x00000000 0x00000000 0x00000000 0x00000000
    0x380: 0x00000000 0x00000000 0x00000000 0x00000000
    0x390: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x3f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x400: 0x00000000 0x00000000 0x00000000 0x00000000
    0x410: 0x00000000 0x00000000 0x00000000 0x00000000
    0x420: 0x00000000 0x00000000 0x00000000 0x00000000
    0x430: 0x00000000 0x00000000 0x00000000 0x00000000
    0x440: 0x00000000 0x00000000 0x00000000 0x00000000
    0x450: 0x00000000 0x00000000 0x00000000 0x00000000
    0x460: 0x00000000 0x00000000 0x00000000 0x00000000
    0x470: 0x00000000 0x00000000 0x00000000 0x00000000
    0x480: 0x00000000 0x00000000 0x00000000 0x00000000
    0x490: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x4f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x500: 0x00000000 0x00000000 0x00000000 0x00000000
    0x510: 0x00000000 0x00000000 0x00000000 0x00000000
    0x520: 0x00000000 0x00000000 0x00000000 0x00000000
    0x530: 0x00000000 0x00000000 0x00000000 0x00000000
    0x540: 0x00000000 0x00000000 0x00000000 0x00000000
    0x550: 0x00000000 0x00000000 0x00000000 0x00000000
    0x560: 0x00000000 0x00000000 0x00000000 0x00000000
    0x570: 0x00000000 0x00000000 0x00000000 0x00000000
    0x580: 0x00000000 0x00000000 0x00000000 0x00000000
    0x590: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x5f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x600: 0x00000000 0x00000000 0x00000000 0x00000000
    0x610: 0x00000000 0x00000000 0x00000000 0x00000000
    0x620: 0x00000000 0x00000000 0x00000000 0x00000000
    0x630: 0x00000000 0x00000000 0x00000000 0x00000000
    0x640: 0x00000000 0x00000000 0x00000000 0x00000000
    0x650: 0x00000000 0x00000000 0x00000000 0x00000000
    0x660: 0x00000000 0x00000000 0x00000000 0x00000000
    0x670: 0x00000000 0x00000000 0x00000000 0x00000000
    0x680: 0x00000000 0x00000000 0x00000000 0x00000000
    0x690: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x6f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x700: 0x01630076 0xffffffff 0x07000004 0x13ffff01
    0x710: 0x00010120 0x00000000 0x00020004 0x20000280
    0x720: 0x00000000 0x00000000 0x038e5c51 0x08000310
    0x730: 0x00008020 0x00008fff 0x000fffff 0x00000001
    0x740: 0x0000000f 0x00000000 0x40204008 0x00204004
    0x750: 0x00800000 0x00000000 0x00000000 0x00000000
    0x760: 0x00000000 0x00000000 0x00000000 0x00000000
    0x770: 0x00000000 0x00000000 0x00000000 0x00000000
    0x780: 0x00000000 0x00000000 0x00000000 0x00000000
    0x790: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x7f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x800: 0x00000000 0x00000000 0x00000000 0x00000100
    0x810: 0x00000000 0x00000000 0x00000000 0x00000000
    0x820: 0x00000000 0x00000000 0x00000000 0x00000000
    0x830: 0x00000000 0x00000000 0x00000000 0x00000000
    0x840: 0x00000000 0x00000000 0x00000000 0x00000000
    0x850: 0x00000000 0x00000000 0x00000000 0x00000000
    0x860: 0x00000000 0x00000000 0x00000000 0x00000000
    0x870: 0x00000000 0x00000000 0x00000000 0x00000000
    0x880: 0x00000000 0x00000000 0x00000000 0x00000000
    0x890: 0x00000000 0x00000000 0x00000000 0x00000000
    0x8a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x8b0: 0x00000000 0x00000000 0x00000000 0x00000001
    0x8c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x8d0: 0x00000000 0x00000032 0x00000000 0x00000000
    0x8e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x8f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x900: 0x00000000 0x00000000 0x00000000 0x00000000
    0x910: 0x00000000 0x00000000 0x00000000 0x00000000
    0x920: 0x00000000 0x00000000 0x00000000 0x00000000
    0x930: 0x00000000 0x00000000 0x00000000 0x00000000
    0x940: 0x00000000 0x00000000 0x00000000 0x00000000
    0x950: 0x00000000 0x00000000 0x00000000 0x00000000
    0x960: 0x00000000 0x00000000 0x00000000 0x00000000
    0x970: 0x00000000 0x00000000 0x00000000 0x00000000
    0x980: 0x00000000 0x00000000 0x00000000 0x00000000
    0x990: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9a0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9b0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9c0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9d0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9e0: 0x00000000 0x00000000 0x00000000 0x00000000
    0x9f0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa40: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xaa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xab0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xac0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xad0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xae0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xaf0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb40: 0x00000019 0x000000d3 0x00000000 0x00000000
    0xb50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xba0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xbb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xbc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xbd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xbe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xbf0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc40: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xca0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xcb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xcc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xcd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xce0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xcf0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd40: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xda0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xdb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xdc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xdd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xde0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xdf0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe40: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xea0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xeb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xec0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xed0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xee0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xef0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf00: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf10: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf20: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf30: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf40: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf50: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf60: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf70: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf80: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xfa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xfb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xfc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xfd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xfe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xff0: 0x00000000 0x00000000 0x00000000 0x00000000

>How-To-Repeat:
Run "sysctl -w hw.acpi.sleep.state=3" on a ThinkPad T495
>Fix:

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: abs@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/57531: Realtek EHCI prevents suspend on ThinkPad T495
Date: Tue, 18 Jul 2023 13:42:14 +0000

 This is a multi-part message in MIME format.
 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy

 Can you please try the attached patch and see if anything goes haywire
 with the affected EHCI device?

 The affected one should show something like:

 ehciN: unknown USB rev: 0x00000000

 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy
 Content-Type: text/plain; charset="ISO-8859-1"; name="pr57531"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="pr57531.patch"

 From 5a5cf7431df1ff845975e92df13befa70c1cc924 Mon Sep 17 00:00:00 2001
 From: Taylor R Campbell <riastradh@NetBSD.org>
 Date: Tue, 18 Jul 2023 13:39:54 +0000
 Subject: [PATCH] ehci(4): Accept `pre-1.0' PCI revisions in SBRA config
  register 0x60.

 PR kern/57531
 ---
  sys/dev/pci/ehci_pci.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

 diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c
 index 96d22be0dc5b..9fc7eb51e33c 100644
 --- a/sys/dev/pci/ehci_pci.c
 +++ b/sys/dev/pci/ehci_pci.c
 @@ -212,17 +212,20 @@ ehci_pci_attach(device_t parent, device_t self, void =
 *aux)
  	aprint_normal_dev(self, "interrupting at %s\n", intrstr);
 =20
  	switch (pci_conf_read(pc, tag, PCI_USBREV) & PCI_USBREV_MASK) {
 -	case PCI_USBREV_PRE_1_0:
  	case PCI_USBREV_1_0:
  	case PCI_USBREV_1_1:
  		sc->sc.sc_bus.ub_revision =3D USBREV_UNKNOWN;
 -		aprint_verbose_dev(self, "pre-2.0 USB rev, device ignored\n");
 +		aprint_verbose_dev(self, "pre-2.0 USB rev: 0x%08x\n",
 +		    pci_conf_read(pc, tag, PCI_USBREV));
  		goto fail;
  	case PCI_USBREV_2_0:
  		sc->sc.sc_bus.ub_revision =3D USBREV_2_0;
  		break;
 +	case PCI_USBREV_PRE_1_0: /* some recent EHCIs set this inexplicably */
  	default:
  		sc->sc.sc_bus.ub_revision =3D USBREV_UNKNOWN;
 +		aprint_verbose_dev(self, "unknown USB rev: 0x%08x\n",
 +		    pci_conf_read(pc, tag, PCI_USBREV));
  		break;
  	}
 =20

 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy--

From: David Brownlee <abs@netbsd.org>
To: Taylor R Campbell <riastradh@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/57531: Realtek EHCI prevents suspend on ThinkPad T495
Date: Tue, 18 Jul 2023 15:46:01 +0100

 On Tue, 18 Jul 2023 at 14:42, Taylor R Campbell <riastradh@netbsd.org> wrote:
 >
 > Can you please try the attached patch and see if anything goes haywire
 > with the affected EHCI device?

 with the patch, netbsd-10 boot messages changes:

 -ehci0: pre-2.0 USB rev, device ignored
 +ehci0: unknown USB rev: 0x00000000
 +ehci0: EHCI version 1.0
 +ehci0: Using DMA subregion for control data structures
 +usb0 at ehci0: USB revision 2.0

 Ignoring the cascading "X is now +1 for every usbX message" the other change was

 +uhub4 at usb0: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev
 2.00/1.00, addr 1
 +uhub4: 1 port with 1 removable, self powered

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.