Re: earlyprintk=xdbc seems broken

From: Mathias Nyman
Date: Fri Dec 17 2021 - 06:00:09 EST


On 3.12.2021 17.29, Greg KH wrote:
> On Fri, Dec 03, 2021 at 07:22:57AM -0800, Dave Hansen wrote:
>> On 12/3/21 6:31 AM, Mathias Nyman wrote:
>>>>> Can you please see if you can repro and fix this?
>>>>>
>>>>> This all was with current 5.16-rc3 on a tigerlake nuc.
>>>>>
>>>>> Also, perhaps you can update the guide on what sort of setup/cables
>>>>> etc.. you need when either the host or the client is a usb3.1 usb-c only
>>>>> device.
>>>>>
>>>> + Mathias, maybe he still has a USB 3.0 debugging cable.
>>>>
>>> Should have at the office, I'll pick it up next week and try it out.
>>
>> Is someone at Intel responsible for this thing? get_maintainer.pl
>> doesn't think so:
>>
>>> $ perl scripts/get_maintainer.pl ./drivers/usb/early/xhci-dbc.c
>>> Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> (supporter:USB SUBSYSTEM)
>>> Mike Rapoport <rppt@xxxxxxxxxx> (commit_signer:1/1=100%,authored:1/1=100%,added_lines:5/5=100%,removed_lines:5/5=100%)
>>> Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> (commit_signer:1/1=100%)
>>> linux-usb@xxxxxxxxxxxxxxx (open list:USB SUBSYSTEM)
>>> linux-kernel@xxxxxxxxxxxxxxx (open list)
>
> Intel is the only one that has this hardware :(
>
>

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()

Seems to hang when read_poll_timeout_atomic() calls ktime_* functions.
Maybe it's too early for ktime.

After reverting that patch it works again for me.

-Mathias