lkml.org 
[lkml]   [2021]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: earlyprintk=xdbc seems broken
Date
On 17.12.2021 15.55, Peter Zijlstra wrote:
> On Fri, Dec 17, 2021 at 01:01:43PM +0200, Mathias Nyman wrote:
>> I can reproduce this.
>> Looks like problems started when driver converted to readl_poll_timeout_atomic() in:
>>
>> 796eed4b2342 usb: early: convert to readl_poll_timeout_atomic()
>
> I can confirm, reverting that solves the boot hang, things aren't quite
> working for me though.
>
>> Seems to hang when read_poll_timeout_atomic() calls ktime_* functions.
>> Maybe it's too early for ktime.
>
> It certainly is, using ktime for delay loops sounds daft to me anyhow.
>
>> After reverting that patch it works again for me.
>
> [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.16.0-rc3+ root=UUID=a652986c-fbc6-4341-85c3-b4ad4402f130 ro debug ignore_loglevel sysrq_always_enabled usbcore.autosuspend=-1 earlyprintk=xdbc force_early_printk sched_verbose ftrace=nop mitigations=off nokaslr
> ...
> [ 0.000000] xhci_dbc:early_xdbc_parse_parameter: dbgp_num: 0
> ...
> [ 3.161367] xhci_dbc:early_xdbc_setup_hardware: failed to setup the connection to host

Ok, this is some other issue. I got the boot messages over USB
(running minicom at the other end, listening to ttyUSB0)

>
> The machine does boot.. but I *am* getting tons of:
>
> [ 485.546898] usb usb4-port4: Cannot enable. Maybe the USB cable is bad?
> [ 485.546963] usb usb4-port4: config error

This is expected when xhci driver takes over after the early dbc driver,
xhci driver resets xHC controller, and all ports turn to normal host ports again.

Because of the special cable you now have two hosts connected to each other,
both trying to enumerate a device.

This whole transition from earlyprintk xdbc to normal xhci driver is
not very userfriendly.

>
> However, when I do:
>
> $ echo enable > /sys/bus/pci/devices/0000:00:14.0/dbc
>

Yes, this works as it turns on the DbC feature on in xHC hardware,
which turns the first USB port into a usb device.

Thanks
-Mathias

\
 
 \ /
  Last update: 2021-12-20 15:33    [W:0.825 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site