Re: [PATCH v2] platform/x86: p2sb: Defer P2SB device scan when P2SB device has func 0

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

 



Hi Andy,

On 3/4/24 3:09 PM, Andy Shevchenko wrote:
> On Mon, Mar 04, 2024 at 02:59:57PM +0100, Hans de Goede wrote:
>> On 3/4/24 1:13 PM, Shinichiro Kawasaki wrote:
>>> On Mar 04, 2024 / 12:04, Hans de Goede wrote:
> 
> ...
> 
>>> Thanks for sharing the insights.
>>
>> Looking closer at the actual unhiding I don't think accessing func 0
>> is the problem. The unhiding is always done on function 0 even when
>> retreiving the bar for function 2 (the SPI function).
>>
>> So taking that into account, as mentioned in the bugzilla, I think
>> the problem is probing the other functions (1, 3-7) by calling
>> pci_scan_single_device() on them.
> 
> So, why we can't simply call pci_dev_present() on the function in a loop?
> 
> Will be even simpler fix, no?

pci_dev_present takes a set of ids and then looks for those in already
detected devices. That will not work for devices which we have just unhidden.

Also it is unclear what exactly is tripping the hw up. We already have
a separate code-path for Goldmont, on other platforms only the P2SB
itself is scanned instead of all functions on the PCI slot.

This patch makes the Goldmont code closer to the other platforms by
only scanning the one extra function instead of scanning all functions.

As such this patch also mostly removes code :)

Regards,

Hans





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux