Bug 211377 - [MapleRidge]Failed to enter S3 with "xhci_hcd 0000:38:00.0: disabling already-disabled device"
Summary: [MapleRidge]Failed to enter S3 with "xhci_hcd 0000:38:00.0: disabling already...
Status: RESOLVED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-27 02:08 UTC by AceLan Kao
Modified: 2021-03-09 08:19 UTC (History)
2 users (show)

See Also:
Kernel Version: v5.11-rc4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg.log (158.04 KB, text/plain)
2021-01-27 02:08 UTC, AceLan Kao
Details

Description AceLan Kao 2021-01-27 02:08:26 UTC
Created attachment 294877 [details]
dmesg.log

A desktop machine with MapleRidge TBT card in it.
1. Boot the system up
2. Plug in tbt storage on MapleRidge TBT card
3. enter S3
If fails to enter S3 and sometimes got below message.
This issue could be reproduce with v5.11-rc4 mainline kernel.

A closer check and found that when plug in tbt storage, xhci_hcd 0000:38:00.0 keeps resuming from runpm suspended and then suspending immediately.
This kind of behavior only happens when the first time doing S3 with tbt storage is plugged in. The second time tries to enter S3 doesn't encounter this issue.
Also after tried S3 the first time, the DevSta UnsupReq+ flag of 0000:38:00.0 has been raised

[  232.276614] xhci_hcd 0000:38:00.0: disabling already-disabled device
[  232.276621] WARNING: CPU: 1 PID: 167 at drivers/pci/pci.c:2150 pci_disable_device+0x91/0xb0
[  232.276622] Modules linked in: joydev input_leds snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi ledtrig_audio snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec snd_hda_core snd_hwdep soundwire_bus intel_rapl_msr mei_hdcp snd_soc_core snd_compress intel_rapl_common ac97_bus x86_pkg_temp_thermal snd_pcm_dmaengine intel_powerclamp nls_iso8859_1 snd_pcm coretemp snd_seq_midi kvm_intel snd_seq_midi_event snd_rawmidi kvm snd_seq snd_seq_device crct10dif_pclmul ghash_clmulni_intel aesni_intel snd_timer dell_wmi crypto_simd dell_smbios cryptd dcdbas glue_helper mei_me snd mei efi_pstore ucsi_acpi typec_ucsi intel_cstate sparse_keymap ee1004 dell_wmi_descriptor intel_wmi_thunderbolt wmi_bmof soundcore typec dell_uart_backlight mac_hid
[  232.276645]  acpi_pad acpi_tad sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt crc32_pclmul fb_sys_fops cec rc_core e1000e i2c_i801 drm i2c_smbus thunderbolt nvme intel_lpss_pci ahci intel_lpss nvme_core idma64 libahci xhci_pci virt_dma xhci_pci_renesas wmi video pinctrl_tigerlake
[  232.276665] CPU: 1 PID: 167 Comm: irq/123-pciehp Not tainted 5.10.0-1008-oem #9-Ubuntu
[  232.276666] Hardware name: Dell Inc. Precision 3650 Tower/, BIOS 0.8.24 12/23/2020
[  232.276666] RIP: 0010:pci_disable_device+0x91/0xb0
[  232.276668] Code: 4d 85 e4 75 07 4c 8b a3 b8 00 00 00 48 8d bb b8 00 00 00 e8 41 b2 16 00 4c 89 e2 48 c7 c7 98 f8 bf b5 48 89 c6 e8 40 0f 55 00 <0f> 0b eb 8d 48 89 df e8 e3 fe ff ff 80 a3 e9 07 00 00 df 5b 41 5c
[  232.276668] RSP: 0018:ffffbffbc0497c40 EFLAGS: 00010286
[  232.276669] RAX: 0000000000000000 RBX: ffffa0ab01920000 RCX: 0000000000000027
[  232.276669] RDX: 0000000000000027 RSI: 0000000000000086 RDI: ffffa0ac89258a48
[  232.276670] RBP: ffffbffbc0497c50 R08: ffffa0ac89258a40 R09: 00000000ffffe4b2
[  232.276670] R10: 0000000000000001 R11: ffffffffb5e72cc8 R12: ffffa0ab018ce6c0
[  232.276670] R13: ffffa0ab00cb4000 R14: 0000000000000000 R15: ffffffffb4913ee0
[  232.276671] FS:  0000000000000000(0000) GS:ffffa0ac89240000(0000) knlGS:0000000000000000
[  232.276671] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  232.276672] CR2: 000055eb323c8fb0 CR3: 00000001ce410003 CR4: 0000000000770ee0
[  232.276672] PKRU: 55555554
[  232.276672] Call Trace:
[  232.276676]  usb_hcd_pci_remove+0xac/0x110
[  232.276678]  xhci_pci_remove+0x7e/0xd0 [xhci_pci]
[  232.276679]  pci_device_remove+0x3e/0xb0
[  232.276681]  device_release_driver_internal+0x103/0x1e0
[  232.276682]  device_release_driver+0x12/0x20
[  232.276683]  pci_stop_bus_device+0x70/0xa0
[  232.276684]  pci_stop_bus_device+0x30/0xa0
[  232.276684]  pci_stop_bus_device+0x41/0xa0
[  232.276685]  pci_stop_and_remove_bus_device+0x13/0x20
[  232.276687]  pciehp_unconfigure_device+0x80/0x130
[  232.276688]  pciehp_disable_slot+0x6e/0x100
[  232.276689]  pciehp_handle_presence_or_link_change+0xdd/0x2f0
[  232.276690]  pciehp_ist+0x11b/0x120
[  232.276691]  irq_thread_fn+0x28/0x60
[  232.276692]  irq_thread+0xda/0x170
[  232.276693]  ? irq_forced_thread_fn+0x80/0x80
[  232.276694]  kthread+0x114/0x150
[  232.276695]  ? irq_thread_check_affinity+0xf0/0xf0
[  232.276695]  ? kthread_park+0x90/0x90
[  232.276697]  ret_from_fork+0x1f/0x30
[  232.276698] ---[ end trace 859928c0dc07199d ]---
Comment 1 AceLan Kao 2021-03-05 08:29:01 UTC
This issue has been fixed by firmware
Comment 2 You-Sheng Yang 2021-03-09 08:19:42 UTC
Turns out firmware upgrades do not fix this issue but commit 319696aa8063 ("xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state")[1] does.

Kernel packages built with this patch included are available in https://launchpad.net/~vicamo/+archive/ubuntu/ppa-1916467 for oem-5.10/unstable.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?h=for-usb-linus&id=319696aa80630569a52b26d75c2056b6ba807535

Note You need to log in before you can comment on or make changes to this bug.