Re: [PATCH v2] thunderbolt: fix PCI device class after powering up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> On Tue, Aug 02, 2022 at 02:27:30PM +0200, Łukasz Bartosik wrote:
> > >
> > > Hi,
> > >
> > > On Fri, Jul 29, 2022 at 11:40:22AM +0200, Łukasz Bartosik wrote:
> > > > A thunderbolt
> > > > lspci -d 8086:9a1b -vmmknn
> > > > Slot: 00:0d.2
> > > > Class:        System peripheral [0880]
> > > > Vendor:       Intel Corporation [8086]
> > > > Device:       Tiger Lake-LP Thunderbolt 4 NHI #0 [9a1b]
> > > >
> > > > presents itself with PCI class 0x088000 after Chromebook boots.
> > > > lspci -s 00:0d.2 -xxx
> > > > 00:0d.2 System peripheral: Intel Corporation Tiger Lake-LP Thunderbolt 4
> > > > NHI #0 (rev 01)
> > > > 00: 86 80 1b 9a 00 00 10 00 01 00 80 08 00 00 00 00
> > > > ...
> > > >
> > > > However after thunderbolt is powered up in nhi_probe()
> > > > its class changes to 0x0c0340
> > > > lspci -s 00:0d.2 -xxx
> > > > 00:0d.2 System peripheral: Intel Corporation Tiger Lake-LP Thunderbolt 4
> > > > NHI #0 (rev 01)
> > > > 00: 86 80 1b 9a 06 04 10 00 01 40 03 0c 00 00 00 00
> > > > ...
> > > >
> > > > which leaves pci_dev structure with old class value
> > > > cat /sys/bus/pci/devices/0000:00:0d.2/class
> > > > 0x088000
> > >
> > > This is completely unexpected. Which Chromebook this is and have you
> > > tried to upgrade it to the latest?
> > >
> >
> > This happens on a Tiger Lake based reference Chromebook platform.
> > The issue also happens on the latest ChromeOS image available for that platform.
>
> Is this something available for purchase? I'm asking because I have Acer
> Tiger Lake based Chromebook (740 spin or something) here and the TBT
> controller class is "USB controller" all the time, and this is what is
> expected. It should not change the class at any point.

Sorry this platform is not available on the market.

I compared the platform where I see the issue with another platform
where thunderbolt is "usb controller" all the time
and I noticed one difference in function icl_nhi_force_power() in
drivers/thunderbolt/nhi_ops.c I observed the value of VS_CAP_22
after being read and before being written again with additional bits
set. And on the platform where thunderbolt is "usb controller" all the
time
this value was 0x22061002 after reading and 0x22061002 before being
written. The value has not changed
which suggest that thunderbolt was already powered up during probe.

On the platform where I observe the issue where thunderbolt class
changes the observed
read value was 0x6061000 and then 0x22061002 before being written.
That's the difference I spotted.

Anyway I can provide logs or run experiments to shed more light on the
issue. Just need
to know what might be useful ?

Thanks,
Lukasz




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux