Bug 1192091

Summary: 5.14.14 assumes USB controller as dead
Product: [openSUSE] openSUSE Tumbleweed Reporter: Nicolas FORMICHELLA <stigpro>
Component: KernelAssignee: openSUSE Kernel Bugs <kernel-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: oneukum, stigpro, tiwai
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Log from custom kernel

Description Nicolas FORMICHELLA 2021-10-27 14:40:26 UTC
Description :

No USB(-C) at all when running `5.14.14` on a Lenovo Thinkpad X1 Yoga Gen 6

Steps to reproduce :
1. Boot `5.14.14`

Excpected : 
Working USB like in `5.14.11`

Result :

Kernel assumes the USB contoller as dead

System info :
https://paste.opensuse.org/5d9b92f7

Log :
https://paste.opensuse.org/f5553d43

Other info :

The assumption of the USB controller being dead is at line 1005 (xhci error), it works with no issue on both `5.14.11` and `5.15.0-rc3-next-20210930-1.gd782f60-vanilla`
Comment 1 Takashi Iwai 2021-10-27 15:05:15 UTC
Could you use Bugzilla attachments?  It's more persistent and better to get files.

Also, please give the dmesg output from the working case (5.14.11), too.
Comment 2 Takashi Iwai 2021-10-28 08:35:11 UTC
Also I'm building a test kernel with the revert of a few USB patches that are included between 5.14.12 and 5.14.14.  It's being built in OBS home:tiwai:bsc1192091 repo.  Please give it a try later.
Comment 3 Takashi Iwai 2021-11-02 16:54:44 UTC
FWIW, the test kernel is available at
   http://download.opensuse.org/repositories/home:/tiwai:/bsc1192091/standard/

It's be appreciated if you can test it quickly.
Comment 4 Nicolas FORMICHELLA 2021-11-03 06:36:00 UTC
Some updates, HEAD kernel (5.15.0-2.1.ge9c94fc) from Kernel:HEAD has the same issues, only linux-next (`5.15.0-rc3-next-20210930-1.gd782f60-vanilla`) worked for me after `5.14.11`, will try your kernel
Comment 5 Nicolas FORMICHELLA 2021-11-03 06:43:49 UTC
Created attachment 853486 [details]
Log from custom kernel
Comment 6 Nicolas FORMICHELLA 2021-11-03 06:44:52 UTC
Your `5.14.15-1.g6917cb6-default` works, just joined the log
Comment 7 Takashi Iwai 2021-11-03 07:06:08 UTC
Thanks.  So the situation looks like:
- Some USB-related patches in 5.15 made things broken, and those are backported between 5.14.11 and 5.14.14
- It's fixed eventually in linux-next for 5.16-rc1

FWIW, the patches I disabled are:
  patches.kernel.org/5.14.12-001-Partially-revert-usb-Kconfig-using-select-for.patch
  patches.kernel.org/5.14.12-002-usb-cdc-wdm-Fix-check-for-WWAN.patch
  patches.kernel.org/5.14.12-003-usb-chipidea-ci_hdrc_imx-Also-search-for-phys.patch
  patches.kernel.org/5.14.12-004-usb-gadget-f_uac2-fixed-EP-IN-wMaxPacketSize.patch
  patches.kernel.org/5.14.12-005-USB-cdc-acm-fix-racy-tty-buffer-accesses.patch
  patches.kernel.org/5.14.12-006-USB-cdc-acm-fix-break-reporting.patch
  patches.kernel.org/5.14.12-007-usb-typec-tcpci-don-t-handle-vSafe0V-event-if.patch
  patches.kernel.org/5.14.12-008-usb-typec-tcpm-handle-SRC_STARTUP-state-if-cc.patch
  patches.kernel.org/5.14.12-009-usb-typec-tipd-Remove-dependency-on-connector.patch
  patches.kernel.org/5.14.14-048-usb-musb-dsps-Fix-the-probe-error-path.patch
Comment 8 Nicolas FORMICHELLA 2021-11-04 06:25:22 UTC
Thanks for that info, will try compiling my kernel from scratch and post upstream if it is still broken
Comment 9 Takashi Iwai 2021-11-04 11:04:02 UTC
(In reply to Nicolas FORMICHELLA from comment #8)
> Thanks for that info, will try compiling my kernel from scratch and post
> upstream if it is still broken

Thanks!

Meanwhile, I'm building three kernels to identify which patch breaks.
OBS home:tiwai:bsc1192091-1 repo is with the revert of
   patches.kernel.org/5.14.12-007-usb-typec-tcpci-don-t-handle-vSafe0V-event-if.patch,
OBS home:tiwai:bsc1192091-2 repo is with the revert of
   patches.kernel.org/5.14.12-008-usb-typec-tcpm-handle-SRC_STARTUP-state-if-cc.patch,
OBS home:tiwai:bsc1192091-3 repo is with the revert of
  patches.kernel.org/5.14.12-009-usb-typec-tipd-Remove-dependency-on-connector.patch.

Once when those get ready, please try one by one.
Comment 10 Nicolas FORMICHELLA 2021-11-04 12:24:16 UTC
Sure, will do
Comment 11 Takashi Iwai 2021-12-03 13:52:37 UTC
Do still have the problem with the latest TW kernel?

If yes, it might be fixed by the test kernel in OBS home:tiwai:bsc1192569 repo.
The package will be available later at:
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1192569/standard/
Comment 12 Nicolas FORMICHELLA 2022-01-28 10:12:50 UTC
5.16.x resolved the issue, thanks anyways for the effort