Bug 219562

Summary: [BISECTED] UCSI patch breaks lunar lake boot on 6.13-rc1
Product: Drivers Reporter: Todd Brandt (todd.e.brandt)
Component: USBAssignee: Default virtual assignee for Drivers/USB (drivers_usb)
Status: NEW ---    
Severity: high CC: heikki.krogerus, sfle
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 6.13-rc1 Subsystem:
Regression: Yes Bisected commit-id: 226ff2e681d006eada59a9693aa1976d4c15a7d4
Bug Depends on:    
Bug Blocks: 178231    
Attachments: otcpl-lnl-m-9-bad-commit-console-log.txt

Description Todd Brandt 2024-12-04 23:51:00 UTC
Created attachment 307321 [details]
otcpl-lnl-m-9-bad-commit-console-log.txt

Our lunar lake machines are not booting as of 6.13-rc1. I've bisectedf it to this commit:

commit 226ff2e681d006eada59a9693aa1976d4c15a7d4 (refs/bisect/bad)
Author: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date:   Wed Nov 6 17:06:05 2024 +0200

    usb: typec: ucsi: Convert connector specific commands to bitmaps
    
    That allows the fields in those command data structures to
    be easily validated. If an unsupported field is accessed, a
    warning is generated.
    
    This will not force UCSI version checks to be made in every
    place where these data structures are accessed, but it will
    make it easier to pinpoint issues that are caused by the
    unconditional accesses to those fields, and perhaps more
    importantly, allow those issues to be noticed immediately.
    
    Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Link: https://lore.kernel.org/r/20241106150605.1017744-1-heikki.krogerus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

I've attached the console output of the fail
Comment 1 Todd Brandt 2024-12-04 23:52:12 UTC
I've seen a potential fix patch on the mailing list:

https://lore.kernel.org/linux-usb/20241203200010.2821132-1-lucas.demarchi@intel.com/

I've just tested it it and it appears to work.
Comment 2 Stefan Fleischmann 2024-12-05 14:46:50 UTC
I can confirm the problem. My machine (Asus Expertbook laptop) can still boot but I see several of these protection faults in the kernel log, and it cannot detect the battery status or shut down properly.

The patch works for me too.